Just tried this, brand new install and 2nd extention. But there is no semicolon on line 95!
Any change of searching for a unique line of code to find the position to paste rather than relying on a line number?
This is the line you need to find:
<span>'.$this->Context->GetDefinition('CommentTime').'</span>'.TimeDiff($this->Context, $Comment->DateCreated).'<span>IsOnline</span>';
thanks for the quick response, found it (currently line 99) added the snippet but still get an error.
Fatal error: Call to undefined function str_replace_last_count() in /var/www/forums/extensions/IsOnline/default.php on line 71
Got it ! It was working fine in mine as it was taking the function str_replace_last_count() from another extension DefaultIcon. I have added the function in version 2.0.For those who have already downloaded this extension please add this function to default.php
if (!function_exists('str_replace_last_count')) {
function str_replace_last_count($search,$replace,$subject,$times) {
$subject_original=$subject;
$len=strlen($search);
$pos=0;
for ($i=1;$i<=$times;$i++) {
$pos=strrpos_new($subject,$search,$pos);
if($pos!==false) {
$subject=substr($subject_original,0,$pos);
$subject.=$replace;
$subject.=substr($subject_original,$pos+$len);
$subject_original=$subject;
} else {
break;
}
}
return($subject);
}
}
Fixed . As I updated earlier ,this extension is based on DefaultIcon so my local one happened to be calling functions from that extension.For those who is not using DefaultIcon .Here's 3.0 with the required functions.
Comments
Call to undefined function strrpos_new()
Also... is there a quick edit I can make to get this to work with a different theme?
Yes You can do it by editing the comments.php of your theme.
No errors and offline icons are showing. However it's not showing when I'm online!
Could the problem be because Im running the site on localhost and cookies set as
['COOKIE_DOMAIN'] = '';
['COOKIE_PATH'] = '/sitename/forums/';
thanks
Thanks