Mark Forums Read: Link now hashed?
Posted: Mon Jan 19, 2009 12:34 pm
Code: Select all
http://forum.thinkpads.com/index.php?hash=********&mark=forumsEst. 1995 - Copyright © 1995-2017 (see FAQ for details)
https://forum.thinkpads.com/
Code: Select all
http://forum.thinkpads.com/index.php?hash=********&mark=forumsCode: Select all
http://forum.thinkpads.com/index.phpI wouldn't have started the thread if it did.basketb wrote:Can you bookmark the URI without the hash? Does it still work then?
That doesn't make sense. phpBB cookies accomplish that (IIRC). Back on the previous version of phpBB here, any new threads or posts added while I was logged in would show as new when I reclicked the new posts link, or visited the forum they're in. There was no hash then. The hash isn't doing that, unless there has been some major change in phpBB code. As I feared, the hash changes, so any bookmark to mark read is broken shortly after it's created.Zender wrote:I guess the hash is there so that new messages, which were posted while you were looking on the current page, aren't marked read - it remembers when you loaded that page.
Are you saying the phpBB code was changed in this new version to make the hash necessary? I know that new posts were flagged as new even without the hash in the previous build deployed here.GomJabbar wrote:I think Zender is on the right track in what he wrote above.
I respectfully disagree. On such a highly trafficked forum, the new posts request spawns several pages. As a moderator, your duty is monitor even the forums that you might not normally visit as a member. Like many, I don't own every model, and as such will pass over subforums dedicated to them. For years I could browse through the new posts since my last visit, peruse the ones that were of interest to me, and mark the rest read with ease. I know this is far from being as critical as the cookie issue, but as a regular and experienced member here, it certainly is more time consuming to revisit the index page to scroll to the newly hashed link and click it.GomJabbar wrote:Bookmarking "Mark topics read" might be a convenience for you, but personally I see this as a quite minor quibble. I suspect very few people bookmark that link. I see no reason to do so.
I've not seen any setting in the admin panel to change this feature. I suggest you learn to love it.Radioguy wrote:Are you saying the phpBB code was changed in this new version to make the hash necessary? I know that new posts were flagged as new even without the hash in the previous build deployed here.
And FWIW, don't presume to know how Bill has assigned the moderator duties in his forum.As a moderator, your duty is monitor even the forums that you might not normally visit as a member.
Live with it, I suppose.JaneL wrote:I've not seen any setting in the admin panel to change this feature. I suggest you learn to love it.
And FWIW, don't presume to know how Bill has assigned the moderator duties in his forum.
If I came across as someone saying the hash was a intentional mod by the staff here, that certainly wasn't my intention. I was sure that it was part of the new build. I certainly don't fault anyone here for that. I was just noting it, and suggesting that it could be remedied since it does have a drawback.GomJabbar wrote:What you consider my duty and what I actually do are two different things. I have never had the time to read or moderate all forums and I have never attempted to nor claimed to. Some of the moderators and admins do read all posts, but I do not.
I do not browse this forum as some others do. To start with, I use the Opera browser which allows me to go back and forth in forums, theads, and even replies without the pages being refreshed. When I am done looking at the threads I decide to read in a particular forum, I click on "Mark topics read" (for that forum), then I go back to the index page and click on the next forum. Once I have looked at all the threads that draw my interest, I refresh the index page and see what new posts show up in the various forums. Then I follow the same process again. I never click on "View new posts".
At any rate, my opinion is my own. It is quite possible that other moderators and the admins here feel differently about this issue than I do.
Regarding changes in the phpBB code from version 2 to version 3; I know significant changes were made, but I do not know the specifics. Nevertheless, what Zender said makes sense. I am quite sure the hashes were not put in place by the admins here. It must have been part of the newer code. I don't believe the hashes were put there on a whim by the phpBB code writers - there must have been a reason. Whether they could be eliminated or not, I don't know.
It appears that this is the case. Various posts on the phpBB Forum suggest that this code change occurred between 3.02 and 3.03. The purpose of the code change is not entirely clear to me, but is related to security. According to a couple posters, this closes a security hole whereby a 3rd party could create a link to the forum that would cause all threads to be marked as read without a user being notified or given a chance to stop that happening. These two posters call it an "annoyance" as opposed to a true security issue:Radioguy wrote:Are you saying the phpBB code was changed in this new version to make the hash necessary?
The Admin staff is aiming to keep the phpBB installation here as standardised as reasonably possible to ease any future upgrades...... so probably not.Radioguy wrote:I hope Bill and the other staff here consider disabling this
Code: Select all
javascript:(function(){var mrq=new XMLHttpRequest();mrq.open("GET","http://forum.thinkpads.com/index.php",true);mrq.onreadystatechange=function(){var lnk;if(lnk=mrq.responseText.match(/<a.*?href="([^"]+)".*?>Mark forums read<\/a>/)){location.href=lnk[1].replace(/&/,'&');};};mrq.send(null);})();Is it possible to have something like this for one/any/all of the subforums? (as this would be of more use to me than marking all forums read).Zender wrote:Bookmark this, it will work (Firefox, possibly also Opera; but only when you click the bookmark when on some page from forum.thinkpads.com domain, security restrictions).Code: Select all
javascript:(function(){var mrq=new XMLHttpRequest();mrq.open("GET","http://forum.thinkpads.com/index.php",true);mrq.onreadystatechange=function(){var lnk;if(lnk=mrq.responseText.match(/<a.*?href="([^"]+)".*?>Mark forums read<\/a>/)){location.href=lnk[1].replace(/&/,'&');};};mrq.send(null);})();
This resulted in the following URI being generated:javascript:(function(){var%20mrq=new%20XMLHttpRequest();mrq.open("GET","http://forum.thinkpads.com/viewforum.php?f=43",true);mrq.onreadystatechange=function(){if(lnk=mrq.responseText.match(/<a.*?href="([^"]+)".*?>Mark topics read<\/a>/)){location.href=lnk[1].replace(/&/,'&');};};mrq.send(null);})();
whereas the correct URI is:http://forum.thinkpads.com/viewforum.ph ... 1e9&f=43[b]&[/b]mark=topics
I would have assumed that thehttp://forum.thinkpads.com/viewforum.ph ... 1e9&f=43[b]&[/b]mark=topics
in the javascript should have replaced the "&" with just a "&"..replace(/&/,'&')
Code: Select all
javascript:(function(){var cur=document.body.innerHTML;var trymark=function(s){var lnk;if(lnk=s.match(/<a.*?href="([^"]+)".*?>Mark topics read<\/a>/)){location.href=lnk[1].replace(/&/g,'&');return 1;};return 0;};if(!trymark(cur)){var sf;if(sf=cur.match(/<p class="breadcrumbs">.*?<a href="([^"]+)">[^<]+<\/a><\/p>/)) {var mrq=new XMLHttpRequest();mrq.open("GET","http://forum.thinkpads.com/"+sf[1],true);mrq.onreadystatechange=function(){if(mrq.readyState<4)return;trymark(mrq.responseText);};mrq.send(null);};};})();Code: Select all
(
function()
{
var cur = document.body.innerHTML;
var trymark = function(s) {
var lnk;
if(lnk = s.match(/<a.*?href="([^"]+)".*?>Mark topics read<\/a>/)) {
location.href = lnk[1].replace(/&/g, '&');
return 1;
}
return 0;
}
if(!trymark(cur)) {
var sf;
if(sf = cur.match(/<p class="breadcrumbs">.*?<a href="([^"]+)">[^<]+<\/a><\/p>/)) {
var mrq = new XMLHttpRequest();
mrq.open("GET", "http://forum.thinkpads.com/" + sf[1], true);
mrq.onreadystatechange = function() {
if(mrq.readyState < 4) return;
trymark(mrq.responseText);
};
mrq.send(null);
}
}
}
) ();
Great, thanks, this does the trick.Zender wrote:Also modify /&/ to /&/g
The "g" means "match all", I didn't bother because there was only one occurence....