Topic: Str_Replace question for a hook in footer
this is in footer.php ....
// End the transaction
$forum_db->end_transaction();
?>
<p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/">PunBB</a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')); ?></p>
<?php
($hook = get_hook('ft_about_end')) ? eval($hook) : null;
$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_about -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_about -->
I want to replace with an extension that puts image (with link) instead of text - just so in future I can add anyones website logo....
<hooks>
<hook id="ft_about_end"><![CDATA[
?>
<p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/"><img src="'.$ext_info['path'].'/img/punbb.png" alt="PunBB" width="16" height="16" border="0"></a>')?>
</p><?php
]]></hook>
</hooks>
it is however only ADDING not replacing (it does work) - shows image and everything right, but ADD not replaced...
I looked at str_replace command - but I don't know which of first code block above needs to go in it... this isnt working:
str_replace (sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/">PunBB</a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')), sprintf($lang_common['Powered by'], '<a href="http://punbb.org"><img src="'.$ext_info['path'].'/img/punbb.png" alt="FluxBB" width="16" height="16" border="0"></a>'))