Update of /cvsroot/phpmp/phpMP/includes
In directory usw-pr-cvs1:/tmp/cvs-serv24078/includes
Modified Files:
template.php
Log Message:
Updated Templating engine to produce a block title for main blocks.
Index: template.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** template.php 5 Apr 2002 23:15:29 -0000 1.8
--- template.php 9 Apr 2002 22:05:24 -0000 1.9
***************
*** 151,159 ****
// Starts the blocking process for a sidebar.
// Returns: none.
! // Additional Note: BeginBlocking() uses the variables set in $TPLVars, which must be present.
! function Blocking($function) {
global $TPLVars;
if($this->block_vars_read != 1) {
$this->ReadTplConfig('blocking');
}
--- 151,166 ----
// Starts the blocking process for a sidebar.
// Returns: none.
! // Additional Note: Blocking() uses the variables set in $TPLVars, which must be present.
! function Blocking($function, $tpl_array = array()) {
global $TPLVars;
if($this->block_vars_read != 1) {
$this->ReadTplConfig('blocking');
+ }
+
+ $tpl_array = $this->AssignDefaults($tpl_array);
+
+ while( list($key,$value) = each($tpl_array) ) {
+ $key = '{' . $key . '}';
+ $TPLVars["$function"] = ereg_replace("$key", "$value", $TPLVars["$function"]);
}
|