2011-01-09, 08:49 PM
Im having a problem with str_replace, just doesnt seem to be working , and i cant see where im going wrong. Eh, as far as i can see its correct, maybe someone cant spot something im missing.
Im using "index_start" hook.
EDIT: You can close this , i solved the problem lol , im just blind thats all
Im using "index_start" hook.
function test_run()
{
global $db,$mybb,$templates,$usergroup,$groupscache;
$statpvt = $mybb->user['usergroup'];
$xstatpvt = explode(",",$mybb->settings['test_2']);
if (in_array($statpvt,$xstatpvt))
{
$templates->cache['index_boardstats'] = str_replace('{$whosonline}', '<td class="tcat" style="text-align:{$mybb->settings[\'test_4\']};"><strong>{$mybb->settings[\'test_3\']}</strong></td>',$templates->cache['index_boardstats']);
}
}
EDIT: You can close this , i solved the problem lol , im just blind thats all