Forum Moderators: coopster

Message Too Old, No Replies

Joomla and str replace

         

eK3eKyToPa

3:19 pm on Jan 29, 2009 (gmt 0)

10+ Year Member



Somewhere in this forum i found this code

<?php
function callback($buffer)
{
return (str_replace("change this", "into this", $buffer));
}
ob_start("callback");
?>

Which works perfect for changing a part of the text on ordinary page.
But when put this code on the main page of Joomla (the template) it dont change anything
Please give some alternative to test, or say how to troubleshoot the problem
Thanks

Regards
eK3eKyToPa

coopster

10:32 pm on Jan 30, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Output buffers are stackable so if other buffers are active you may need to determine where you are in the stack. ob_get_level [php.net] may be the tool you need.