Load All blocks
| From: | Alawi | Date: | Wed, 23 Oct 2002 10:54:47 +0000 |
| Subject: | Load All blocks | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-121058@lists.php.net to get a copy of this message | ||
How can I load all blocks
plz take a look to this function to understand me
****************************************************************************************************
function STATIC_BLOCK($name, $template_handle)
{
if ( $this->IS_TEMPLATE($template_handle) ) {
if ( ! $this->IS_READ($template_handle) ) {
$this->READ_TEMPLATE($template_handle);
} // end if
$template_content = $this->HANDLE[$template_handle]['CONTENT'];
$pattern = "<!-- STATIC BLOCK : $name -->(.*)<!-- END STATIC BLOCK :
$name -->";
ereg ($pattern,$template_content,$result);
$this->HANDLE[$template_handle]['CONTENT'] =
ereg_replace($pattern,"-^STATICBLOCK:$name^-",$template_content);
if ( ! empty($result[1]) ) {
$this->STATIC_BLOCK[$name] = array ( 'CONTENT' => $result[1],
'TEMP' => $result[1],
'ELEMENTS' => array() );
} // enf if
} else {
$this->ERROR_MSG("You Can not load this block because the block is not
found" . $name);
} // end if
} // end STATIC_BLOCK function
-----------------------------------------------------------------------------------------------------------------------------------------------------
I want from this fuction to load all blocks if i am not put any thing in $name variable