2007-05-15, 08:28 PM
Today when i was searching google i found this mod in phpbb.
http://www.phpbb.com/community/viewtopic.php?t=125251
It is very useful mod which has been developed by people of phpBB over there. I thought for a while on how to call a php code on our template system and it happend not to work.
I added the following code global.php.
I used {$return} variable in my header template.
Now when i call the return variable in my header template, it does not execute. I do not know whether my approach is correct or not, so i called a support thread here.
Now i tried to call a php file inside the template which also resulted in the same issue,
http://www.phpbb.com/community/viewtopic.php?t=125251
It is very useful mod which has been developed by people of phpBB over there. I thought for a while on how to call a php code on our template system and it happend not to work.
I added the following code global.php.
$code = "some coding or text down here";
ob_start();
eval("?>".$code."<?php ");
$return=ob_get_contents();
ob_end_clean();
I used {$return} variable in my header template.
Now when i call the return variable in my header template, it does not execute. I do not know whether my approach is correct or not, so i called a support thread here.
Now i tried to call a php file inside the template which also resulted in the same issue,
$myfriend = get_include_contents('somefilename.php');
function get_include_contents($filename) {
if (is_file($filename)) {
ob_start();
include $filename;
$vijay = ob_get_contents();
ob_end_clean();
return $vijay;
}
return false;
}
and then used the variable {$vijay}