After fixing the typo this variable still does not work the way it should. Viewing a link's comments sets a cookie called "commentsread" containing the link ID. So far so good, the template variable gets set accordingly and is useable again. But when viewing the comments a second time the cookie is deleted. Actually, the cookie "commentsread" is set again but is empty. This only happens when viewing the same link's comments for a second time.
The same resetting of cookies happens for the linksread cookie. I assume the commentsread code was copied from there, they use the same mechanism.
In comments.php, the line that would set the cookie is commented out with this note:
// makecookie('commentsread', $linksread); // troublesome for opera somehow
So I'm not sure how you can find that it's being set... perhaps your version has the line uncommented.
I vaguely recall that there was an issue with opera was very hard to duplicate, occouring only after you browse around for a while. Will test what uncommenting the line does.
In version 3.1.6 this line is not commented out yet. And since only about 0.5 percent of our visitors are using Opera I would rather leave the feature in. Thanks for investigating.
I think I have solved this one. On top of correcting the typo's and uncommenting out the makecookie lines (in 3.20 that is) I added some code in classes/onelink.php:
// determine if this link has been read by viewer global $visitedarray, $visitedcommentsarray; if ($visitedarray[$this->id] != '' && $visitedarray[$this->id] > $this->lastedit) { $this->isread = 1; } else { $this->isread = 0; if ($settings->trackviews == 'yes') { if (strstr('[END]'. $this->viewers, '[END]'. $thismember->id .'[,]')) $this->isread = 1; } } if (($visitedcommentsarray[$this->id] != '' && $visitedcommentsarray[$this->id] > $this->lastcomment) || $this->numcomments == 0) { $this->commentsread = 1; } else { $this->commentsread = 0; // Start bugfix if ($settings->trackviews == 'yes') { if (strstr('[END]'. $this->threadviewers, '[END]'. $thismember->id .'[,]')) $this->commentsread = 1; } // End bugfix }
Comments on 1 not working
Usergroup: Customer
Joined: Jan 21, 2004
Total Topics: 7
Total Comments: 10
First of all my compliments for building this great links engine. Please find below some bugs for which I ask your help.
There is a typo in prestart.php causing the Template Variable {LINKCOMMENTSREAD} to not work at all. The typo is still there in version 3.3.4.
After fixing the typo this variable still does not work the way it should. Viewing a link's comments sets a cookie called "commentsread" containing the link ID. So far so good, the template variable gets set accordingly and is useable again. But when viewing the comments a second time the cookie is deleted. Actually, the cookie "commentsread" is set again but is empty. This only happens when viewing the same link's comments for a second time.
The same resetting of cookies happens for the linksread cookie. I assume the commentsread code was copied from there, they use the same mechanism.
Thanks for your support.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
In comments.php, the line that would set the cookie is commented out with this note:
// makecookie('commentsread', $linksread); // troublesome for opera somehow
So I'm not sure how you can find that it's being set... perhaps your version has the line uncommented.
I vaguely recall that there was an issue with opera was very hard to duplicate, occouring only after you browse around for a while. Will test what uncommenting the line does.
Usergroup: Customer
Joined: Jan 21, 2004
Total Topics: 7
Total Comments: 10
In version 3.1.6 this line is not commented out yet. And since only about 0.5 percent of our visitors are using Opera I would rather leave the feature in. Thanks for investigating.
Usergroup: Customer
Joined: Jan 21, 2004
Total Topics: 7
Total Comments: 10
I think I have solved this one. On top of correcting the typo's and uncommenting out the makecookie lines (in 3.20 that is) I added some code in classes/onelink.php:
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Thanks, will apply for 3.3.6.