Difference between revisions of "Custom Variables"

From AWBS Wiki
Jump to: navigation, search
(New page: ==Custom Variables in AWBS== AWBS is a very customizable system, as you can make your own themes, you can also add your custom data by placing variables and/or php scripts in your templat...)
 
Line 1: Line 1:
==Custom Variables in AWBS==
+
===About==
 
+
 
AWBS is a very customizable system, as you can make your own themes, you can also add your custom data by placing variables and/or php scripts in your template files.
 
AWBS is a very customizable system, as you can make your own themes, you can also add your custom data by placing variables and/or php scripts in your template files.
 
Sometimes you may need to place the same script or value over and over again in many pages, there comes the value of using custom variables.
 
Sometimes you may need to place the same script or value over and over again in many pages, there comes the value of using custom variables.
Line 7: Line 6:
  
 
Once you renamed the file, you can start placing your variables and php scripts there.
 
Once you renamed the file, you can start placing your variables and php scripts there.
 +
 +
 +
===Format==
 +
<pre><?php
 +
//Use the following format for additions:
 +
 +
//$template->set_var("template_variable", "your text");
 +
 +
?></pre>

Revision as of 08:01, April 23, 2008

=About

AWBS is a very customizable system, as you can make your own themes, you can also add your custom data by placing variables and/or php scripts in your template files. Sometimes you may need to place the same script or value over and over again in many pages, there comes the value of using custom variables.

Custom variables are stored in a file called gparser_user.php, this file can be found in the includes folder in your AWBS root directory if you installed AWBS to home/user/public_html/ on your server, gparser_user.php will be found in home/user/public_html/includes/gparser_user.php.sample - remove the sample fro the file name to so it starts taking effect.

Once you renamed the file, you can start placing your variables and php scripts there.


=Format

<?php
//Use the following format for additions:

//$template->set_var("template_variable", "your text"); 

?>