| [ Index ] |
PHP Cross Reference of phpBB 3.0 Beta 3 |
[Source view] [Print]
(no description)
| Copyright: | (c) 2005 phpBB Group, sections (c) 2001 ispi of Lincoln Inc |
| License: | http://opensource.org/licenses/gpl-license.php GNU Public License |
| Version: | $Id: template.php,v 1.103 2006/10/22 13:30:45 acydburn Exp $ |
| File Size: | 515 lines (14 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
template:: (13 methods):
set_template()
set_custom_template()
set_filenames()
destroy()
destroy_block_vars()
display()
assign_display()
_tpl_load()
assign_vars()
assign_var()
assign_block_vars()
alter_block_array()
_tpl_include()
| set_template() X-Ref |
| Set template location |
| set_custom_template($template_path, $template_name) X-Ref |
| Set custom template location (able to use directory outside of phpBB) |
| set_filenames($filename_array) X-Ref |
| Sets the template filenames for handles. $filename_array should be a hash of handle => filename pairs. |
| destroy() X-Ref |
| Destroy template data set |
| destroy_block_vars($blockname) X-Ref |
| Reset/empty complete block |
| display($handle, $include_once = true) X-Ref |
| Display handle |
| assign_display($handle, $template_var = '', $return_content = true, $include_once = false) X-Ref |
| Display the handle and assign the output to a template variable or return the compiled result. |
| _tpl_load(&$handle) X-Ref |
| Load a compiled template if possible, if not, recompile it |
| assign_vars($vararray) X-Ref |
| Assign key variable pairs from an array |
| assign_var($varname, $varval) X-Ref |
| Assign a single variable to a single key |
| assign_block_vars($blockname, $vararray) X-Ref |
| Assign key variable pairs from an array to a specified block |
| alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') X-Ref |
| Change already assigned key variable pair (one-dimensional - single loop entry) Some Examples: <code> alter_block_array('loop', $vararray); // Insert vararray at the beginning alter_block_array('loop', $vararray, 2); // Insert vararray at position 2 alter_block_array('loop', $vararray, array('KEY' => 'value')); // Insert vararray at the position where the key 'KEY' has the value of 'value' alter_block_array('loop', $vararray, false); // Insert vararray at first position alter_block_array('loop', $vararray, true); // Insert vararray at last position (assign_block_vars equivalence) alter_block_array('loop', $vararray, 2, 'change'); // Change/Merge vararray with existing array at position 2 alter_block_array('loop', $vararray, array('KEY' => 'value'), 'change'); // Change/Merge vararray with existing array at the position where the key 'KEY' has the value of 'value' alter_block_array('loop', $vararray, false, 'change'); // Change/Merge vararray with existing array at first position alter_block_array('loop', $vararray, true, 'change'); // Change/Merge vararray with existing array at last position </code> param: string $blockname the blockname, for example 'loop' param: array $vararray the var array to insert/add or merge param: mixed $key Key to search for param: insert|change $mode Mode to execute return: false on error, true on success |
| _tpl_include($filename, $include = true) X-Ref |
| Include a seperate template |
| Generated: Wed Nov 22 00:35:05 2006 | Cross-referenced by PHPXref 0.6 |