Web site translator - 356 CHAPTER 12 STYLING PHPBB you ll find
356 CHAPTER 12 STYLING PHPBB you ll find phpBB will generate template variables that have the same name on multiple pages. Don t confuse those with the global variables. When in doubt, consult phpBB.com s listing of template variables (http://www.phpbb.com/styles/listvars.php). In that listing, you can find which variable you want, and it will let you know the location appropriately. Some, but not all, template variables have prefixes corresponding to the type of information they represent. Table 12-5 explains the prefixes you ll encounter. Table 12-5. Common Template Variable Prefixes Prefix Description U_ Variables beginning with U_ are URLs, which are typically used inside hyperlinks in HTML. T_ Variables beginning with T_ are theme attributes, which correspond to the available cus tomization options in the Styles Administration panel. S_ Variables beginning with S_ are system variables. You ll rarely encounter these. L_ Variables beginning with L_ represent strings that are taken from the active language file. If you end up creating your own template variables, you ll want to make sure that the prefixes you use for your links and language strings are consistent with the prefixes shown in Table 12-5. This helps you know what a template variable represents without having to dig inside the phpBB code to find its definition. Blocks phpBB s template engine also supports blocks of code. Blocks are defined as HTML comments and are delineated with a BEGINto start the block and an ENDto finish the block. One purpose of blocks is to define repeating data, such as the tables on many pages index.php, viewforum.php, and viewtopic.php, to name a few. Here is an example of a repeating block:
{myblock.COUNTER} A repeating block is generally identified by the presence of block-specific template variables (the template variables prepended with blockname. before each variable name). These variables are local in scope to the block only, and they cannot be used outside the boundaries of the block. The other reason to use blocks is to display when a certain condition is met, such as whether or not the user is logged in. Here is an example of a conditional block:
Welcome back to our community!
You ll find that the names of conditional blocks generally start with the prefix switch_ and the condition for executing the command. phpBB s template engine does not necessarily make decisions. Instead, it relies on flags set by the phpBB script to determine whether a block of code should run.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.