Posted on: 01/23/03 07:34am
By: amckay
function ParseForFunctionCalls($myStr)
{
$workStr = $myStr;
$newStr = "";
while( $callBegin = strpos( $workStr, "[call]" ) )
{
$newStr .= substr( $workStr, 0, $callBegin );
$callEnd = strpos( $workStr, "[/call]" );
$newWorkStr = substr( $workStr, $callEnd + 7 );
$funcname = trim(substr( $workStr, $callBegin + 6,$callEnd - $callBegin - 6 ));
$newStr .= $funcname();
$workStr = $newWorkStr;
}
return $newStr . $workStr;
}
And you insert the call just after line 100 right after the DB_fetchArray :
$A['sp_content'] = ParseForFunctionCalls($A['sp_content']);
And within your static pages you can insert any number of [call]someFunction[/call] statements that you like!
This is going to be a very huge improvement for my website - don't know why I didn't get around to it earlier.
cheers,
-Alan
Posted on: 01/23/03 06:42pm
By: Anonymous (Anonymous)
Posted on: 01/24/03 11:08pm
By: amckay