PDA

View Full Version : End-User Options - Mark All Forums Read Confirmation


Dismounted
03-17-2007, 10:00 PM
Mark All Forums Read Confirmation

Description:
This mod asks for confirmation when marking forums read.

Request:
https://vborg.vbsupport.ru/showthread.php?t=142371

Installation:
All the installation information is in the package.

Changes:
4 Plugins
4 Phrases

Change Log:
19/09/2007 - Version 1.2
- Automatic Template Edits
- Added Confirm When Double-Clicking Forum Icon
- Updated ReadMe

20/03/2007 - Version 1.1
- Extended Functionality Globally

18/03/2007 - Version 1.0
- Initial Release

Dismounted
03-18-2007, 10:08 AM
/me Reserves!

WhaLberg
03-18-2007, 10:10 AM
/me will give a try later.

Thanks Dis.

Masiello
03-18-2007, 10:26 AM
Usefull Hack, thx, I'll try it later

Masiello
03-18-2007, 10:33 AM
Installed :)

bitdefuser
03-18-2007, 11:29 AM
Installed. :D

EDIT: Search $vbphrase[mark_forums_read] in your styles and replace the whole <a href> tag with the one he gave.
Why? You might have multiple places that has the "Mark Forums Read" button, such as the Welcome Panel Rewrite mod or in your ForumHome template near the footer.
(I had three places.)

EDIT2: Dismounted, you might want to add that into your readme. :)

Tralala
03-18-2007, 04:45 PM
Thanks for this, Dismounted! As mentioned elsewhere, I've been wanting something like this for awhile now.

Tralala
03-18-2007, 04:57 PM
Installed. :D

EDIT: Search $vbphrase[mark_forums_read] in your styles and replace the whole <a href> tag with the one he gave.
Why? You might have multiple places that has the "Mark Forums Read" button, such as the Welcome Panel Rewrite mod or in your ForumHome template near the footer.
(I had three places.)

EDIT2: Dismounted, you might want to add that into your readme. :)


Agreed; I had it in navbar (under QuickLinks) and also in footer, in another style.

Works great though... should be standard feature of vBulletin.

/clicks install

Smoothie
03-18-2007, 05:23 PM
Darn, you guys keep releasing these cool mods and I keep installing them. I can't wait until the next major (templates need reverting) upgrade. :P

Tralala
03-18-2007, 05:29 PM
Agreed; I had it in navbar (under QuickLinks) and also in footer, in another style.

Works great though... should be standard feature of vBulletin.



Actually, this works for me everywhere, except the QuickLinks pulldown in the standard vBulletin skin. I select the "Mark Forums Read" menu option, confirm the dialog that pops up, then nothing happens; no page refresh like I am used to.

(Ironically enough it works fine in my custom skin, in the QuickLinks pulldown, and all the other spots.)

Any clues?

EDIT: Code removed, as I'm told by Ziki below that it won't work, don't want to confuse future readers

Ziki
03-18-2007, 05:44 PM
I suggest to remove the link from there because it won't ever work

Actually, this works for me everywhere, except the QuickLinks pulldown in the standard vBulletin skin. I select the "Mark Forums Read" menu option, confirm the dialog that pops up, then nothing happens; no page refresh like I am used to.

(Ironically enough it works fine in my custom skin, in the QuickLinks pulldown, and all the other spots.)

Any clues? Here's the code:

Before:
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>

After:
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow" onclick="return mark_all_read()">$vbphrase[mark_forums_read]</a></td></tr>

Tralala
03-18-2007, 06:48 PM
I suggest to remove the link from there because it won't ever work

Yeah, since I discovered the code mod wasn't working there I removed it and put it back to the "original" way. I also moved the "Mark Forums Read" to a different position of the QuickLinks menu, so it would be less likely to be selected by user mistake.


The confirmation mod DOES work properly in the QuickLinks pulldown of my other (customized) skin... at least, when I am in forumhome. (The confirmation dialog doesn't seem to pop up when I choose it from UserCP, or Threadview, or Search. But even with that, the menu command still works, just no confirmation dialog.) It didn't work in vBulletin at all.

Why is there no way to get it to work as desired in the the QuickLinks pulldown? Why can it work (somewhat, ie: in forumhome, but not elsewhere) in one skin... but not in vB skin at all? I tried making a seperate "Mark Forums Read" link in navbar template, and noticed the same weirdness. The confirmation dialog only appears when accessing it from forumhome.

Just wondering, trying to learn.



Would it make sense to introduce this confirmation dialog into the "do=markread" command instead? That way it'd be universal to it's invocation everywhere. Make a preference option in UserCP so visitors could choose whether or not they get the Confirmation dialog... and I'd nominate this for MOTM. :D

HMBeaty
03-18-2007, 07:39 PM
Awesome, never thought to do this. Nice job

/me clicks Install

Doctor Death
03-18-2007, 07:49 PM
Great idea. Installed.

Smoothie
03-18-2007, 08:06 PM
So wait, this works, but it don't in the QL?

Smoothie
03-18-2007, 08:16 PM
works fine here.

Tralala
03-18-2007, 08:55 PM
works fine here.

Test it further, kemosabe. It works on your forumhome's QuickLink menu only... but NOT when you try it from anywhere else (ie: inside a forum, a thread, UserCP, etc.)

I just checked on your forum (macfora.com) and see it doesn't work. In fact, choosing the command from those other places does nothing on your forum... it breaks the menu item completely.

Smoothie
03-19-2007, 12:36 AM
Test it further, kemosabe. It works on your forumhome's QuickLink menu only... but NOT when you try it from anywhere else (ie: inside a forum, a thread, UserCP, etc.)

I just checked on your forum (macfora.com) and see it doesn't work. In fact, choosing the command from those other places does nothing on your forum... it breaks the menu item completely.
That's funny, because I never thought to check those. I only checked forumhome. And you're correct, it no worky on those other pages.

Smoothie
03-19-2007, 12:39 AM
So, we have a half working mod here. Works only from forumhome and not anywhere else.

Smoothie
03-19-2007, 12:42 AM
One other thang. When clicking forum icons to "mark this forum and contents as read", you should get a confirmation box for that too, no? I gotta uninstall until this gets fixed.

Dismounted
03-19-2007, 04:44 AM
Installed. :D

EDIT: Search $vbphrase[mark_forums_read] in your styles and replace the whole <a href> tag with the one he gave.
Why? You might have multiple places that has the "Mark Forums Read" button, such as the Welcome Panel Rewrite mod or in your ForumHome template near the footer.
(I had three places.)

EDIT2: Dismounted, you might want to add that into your readme. :)
Hmmm, I might. Depends
Actually, this works for me everywhere, except the QuickLinks pulldown in the standard vBulletin skin. I select the "Mark Forums Read" menu option, confirm the dialog that pops up, then nothing happens; no page refresh like I am used to.

(Ironically enough it works fine in my custom skin, in the QuickLinks pulldown, and all the other spots.)

Any clues?

EDIT: Code removed, as I'm told by Ziki below that it won't work, don't want to confuse future readers
You have to change the plugin location to global_complete. I made it at forumhome_complete because it was originally design to be only used for the link on the index.

Doctor Death
03-19-2007, 10:31 AM
Clicks Uninstall until it is debugged

Dismounted
03-19-2007, 10:56 AM
What is there to debug? The hack is working as designed, it's just that people make modifications to the original usage which creates bugs.

TrIn@dOr
03-19-2007, 11:13 AM
Working in the command of the footer, but not in the navbar!

Triky
03-19-2007, 11:20 AM
Jelsoft should add this to the next releases, in my opinion. :)

Smoothie
03-19-2007, 02:05 PM
You have to change the plugin location to global_complete. I made it at forumhome_complete because it was originally design to be only used for the link on the index.Has anyone done this and had success? Without thinking I tried global_start instead of global_complete and of course it did not work.

Smoothie
03-19-2007, 02:06 PM
Hey Dismounted,

Any chance of getting this to work with forum markers too?

Tralala
03-19-2007, 02:35 PM
What is there to debug? The hack is working as designed, it's just that people make modifications to the original usage which creates bugs.

While I agree with what you are saying here, if that's the stance you plan to take, you may want to explicitly state in the first post here that "this mod only provides a confirmation dialog when users click the 'Mark Forums Read' link on Forum Home, and nowhere else."

Because otherwise, one would assume the functionality is extended to every instance of "Mark Forums Read." Why would it not, from a UI standpoint? Why would one "Mark Forums Read" command differ from another?

Clearly there's a desire for consistency with this enhancement. It can be confusing if it works as expected in one place but not another -- especially when it comes to this sort of command where data (read/unread markers) is about to be effectively lost. That's the point of this mod, to give some security and warning back.

And so, as annoying as it may be that folks have begun to "run with" your mod and add stuff and then complain about bugs, I'd look at it as a compliment. Folks really like what you've started here! And so, may I respectfully request that you enhance this a tiny bit to work globally? Pretty please? :)

You have to change the plugin location to global_complete. I made it at forumhome_complete because it was originally design to be only used for the link on the index.

Has anyone done this and had success? Without thinking I tried global_start instead of global_complete and of course it did not work.

I tried changing it to global_complete and it did not work for me. I'd previously changed the other instances of the "Mark All Forums Read" command to call on the Javascript, but changing the plugin as suggested still didn't bring up the Confirmation dialog. :(

Still, regardless of what happens with this mod, I want to thank Dismounted for stepping up to the bat and offerring this up. vBulletin has needed this for a long while, and no one else cared to share. So, thanks, Dismounted!

Smoothie
03-20-2007, 01:05 AM
That's a shame it does not work globally. It may confuse members in it's present state. As mentioned above, it's an awesome mod. Maybe Dismounted can help us out here and get this to work on all pages.

Dismounted
03-20-2007, 06:51 AM
Hack Updated!

20/03/2007 - Version 1.1
- Extended Functionality Globally

Smoothie
03-20-2007, 08:45 AM
Hack Updated!

20/03/2007 - Version 1.1
- Extended Functionality GloballyThanks Dismounted. Will check it out later.

TrIn@dOr
03-20-2007, 10:15 AM
Thanks.

Issue:
When clicking Mark all read in navbar menu, nothing happens.
The dropped menu stays there with no action.

Edit:

In FF you can see the warning but nothing happens after.

In IE here is the error

http://img120.imageshack.us/img120/2851/errorzk1.jpg

Smoothie
03-20-2007, 12:55 PM
Guess I'll be waiting to install until I get confirmation it actually works.

TrIn@dOr
03-21-2007, 10:24 AM
Hello?

Tralala
03-21-2007, 03:34 PM
TrIn@dOr, do you get that error using the default vBulletin skin, or a custom skin?

TrIn@dOr
03-21-2007, 04:31 PM
TrIn@dOr, do you get that error using the default vBulletin skin, or a custom skin?

Special own skin, the original was deleted.

Smoothie
03-22-2007, 12:49 AM
Has anyone got this installed and working completely on all pages?

Tralala
03-22-2007, 02:30 AM
I think we're all afraid.

Dismounted
03-22-2007, 04:52 AM
Sorry about that, I forgot to make a change in the readme. I have updated the zip. You can just do the following to get it to work.

In the template 'headinclude', find:
function mark_all_read()
Replace With:
function mark_all_read(type)

Tralala
03-22-2007, 08:01 AM
Okay, I bit the bullet.

I just removed version 1.0 completely, then installed version 1.1. I went to my templates and removed the previous code, then replaced with new code.

The "Mark Forums Read" link on forumhome works properly with the new confirmation. But the QuickLinks menu option does not.

When I choose "Mark Forums Read" from the QuickLinks pulldown, the confirmation dialog pops up... but when I click OK, it goes away and nothing happens. No page refresh, no threads marked as "read..." nothing.

This is on the default vBulletin style.

Dismounted
03-22-2007, 10:33 AM
FYI, QuickLinks doesn't refresh the page, it's ajax. But I'll have a look at it.

EDIT: Are you sure your found ALL the edits? You must copy & paste the ones from the files as they are because there are many instances of parts of the code. Anyway, I've found a few errors in the readme. For you curious ones, I forgot &amp; parses as & when the page is displayed. I have updated the zip.

TrIn@dOr
03-22-2007, 12:22 PM
Sorry about that, I forgot to make a change in the readme. I have updated the zip. You can just do the following to get it to work.

In the template 'headinclude', find:
function mark_all_read()Replace With:
function mark_all_read(type)

Still continue the issue the same way Tralala described...

Okay, I bit the bullet.

I just removed version 1.0 completely, then installed version 1.1. I went to my templates and removed the previous code, then replaced with new code.

The "Mark Forums Read" link on forumhome works properly with the new confirmation. But the QuickLinks menu option does not.

When I choose "Mark Forums Read" from the QuickLinks pulldown, the confirmation dialog pops up... but when I click OK, it goes away and nothing happens. No page refresh, no threads marked as "read..." nothing.

This is on the default vBulletin style.

TrIn@dOr
03-22-2007, 12:41 PM
I'm not a coder, but perhaps the problem is here...

navbar template
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread" onclick="return mark_all_read('ajaxstyle');">$vbphrase[mark_forums_read]</a></td></tr>

After doing a click on OK, the "mark_all_read" is not executed...

Tralala
03-22-2007, 02:45 PM
EDIT: Are you sure your found ALL the edits?
Yes.

Anyway, I've found a few errors in the readme. For you curious ones, I forgot &amp; parses as & when the page is displayed. I have updated the zip.
Which template does this refer to? So that I may update properly and try again, please?[/quote]

Doctor Death
03-23-2007, 03:18 AM
I installed per the directions...

When it asked if I really wanted to mark read I answered yes but it wouldnt mark them.

I then uninstalled and now I am all hosed up... After editing templates and then removing the XML, here is what I get when I click on the MARK THIS FORUM READ...

Would appreciate expert advice on how to fix this as my forums are critical.

Thanks much

Doc
www.ddsog.com

Dismounted
03-23-2007, 09:10 AM
Which template does this refer to? So that I may update properly and try again, please?
Forumdisplay
I installed per the directions...

When it asked if I really wanted to mark read I answered yes but it wouldnt mark them.

I then uninstalled and now I am all hosed up... After editing templates and then removing the XML, here is what I get when I click on the MARK THIS FORUM READ...

Would appreciate expert advice on how to fix this as my forums are critical.

Thanks much

Doc
www.ddsog.com
You didn't remove the template edits.

Doctor Death
03-23-2007, 06:35 PM
I followed the instructions to the word....

I really need some assistance on this one... Can you help please?

I do NOT know how to fix the templates...

Doc

Doctor Death
03-23-2007, 07:33 PM
Ok, I got it, thanks anyway!!

Doc

Dismounted
03-24-2007, 02:23 AM
If anybody wants me to prove that this works, PM me and I'll install it on your forums for you.

Smoothie
03-24-2007, 03:52 AM
gonna give it a go right now

Smoothie
03-24-2007, 04:18 AM
Slight problem, I think it's because my links are in the header, not the navbar.

First edit says to find this in forum home, but when I search, it appears in forum home, header and navbar:
<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>Second edit is fine. Third edit says to find this in navbar, but it's not there:
<a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a>

Dismounted
03-24-2007, 04:23 AM
First edit says to find this in forum home, but when I search, it appears in forum home, header and navbar:
<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>
Only the modification of FORUMHOME is required.
Second edit is fine. Third edit says to find this in navbar, but it's not there:
<a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a>
As you said before, this is probably caused by the dropdown being in your header.

Smoothie
03-24-2007, 04:28 AM
So, I'm a bit confused. Besides replacing the forum home in the first edit and the forum display in the second edit, what do i find and replace in the navbar?

Dismounted
03-24-2007, 04:29 AM
Do you have a 'Quick Links' drop-down in your navbar?

Smoothie
03-24-2007, 04:34 AM
Do you have a 'Quick Links' drop-down in your navbar?The QL's are in the header. The code I believe is in the navbar.

Actually I just looked, the QL's are in the header and this bit of code is in the QL's:
<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>

Dismounted
03-24-2007, 04:41 AM
That's the one, edit that one :p.

Smoothie
03-24-2007, 04:46 AM
That's the one, edit that one :p.And replace with?? :)

Dismounted
03-24-2007, 04:47 AM
The navbar edit.

Smoothie
03-24-2007, 04:58 AM
Confirmed, installed and working on all pages.

BTW, when searching for this code, it appears in header, navbar and forum home as mentioned above and it does need to be replaced in all 3 instances.
<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>

Tralala
03-25-2007, 03:59 PM
Thanks for your continued work and improvement on this, Dismounted. I did all the edits/updates you've shared here, and it now appears to be working for me everywhere (in both the default vB skin as well as my custom skin.) As the original requester, I certainly appreciate this enhancement!

There's one last location to "Mark All Forums Read" though that could use the confirmation pop-up, though. New in vBulletin 3.6.x is the ability to double-click the icon to the right of a Forum name... that marks that particular forum as "read."

See here:
https://vborg.vbsupport.ru/attachment.php?attachmentid=45872&d=1145289561

I'd like to get a confirmation pop-up there too, to keep things consistent.

Smoothie
03-25-2007, 04:05 PM
Thanks for your continued work and improvement on this, Dismounted. I did all the edits/updates you've shared here, and it now appears to be working for me everywhere (in both the default vB skin as well as my custom skin.) As the original requester, I certainly appreciate this enhancement!

There's one last location to "Mark All Forums Read" though that could use the confirmation pop-up, though. New in vBulletin 3.6.x is the ability to double-click the icon to the right of a Forum name... that marks that particular forum as "read."

See here:
https://vborg.vbsupport.ru/attachment.php?attachmentid=45872&d=1145289561

I'd like to get a confirmation pop-up there too, to keep things consistent.

https://vborg.vbsupport.ru/showpost.php?p=1206962&postcount=20 ;)

Tralala
03-25-2007, 04:10 PM
https://vborg.vbsupport.ru/showpost.php?p=1206962&postcount=20 ;)

Your post was made 6 days ago, before Dismounted actually updated it to work in more locations that just Forum Home. Therefore, your comment didn't make much sense back then. Nor did your resolve to "uninstall until this gets fixed," because... well... you obviously didn't.

Smoothie
03-25-2007, 04:20 PM
Your post was made 6 days ago, before Dismounted actually updated it to work in more locations that just Forum Home. Therefore, your comment didn't make much sense back then. Nor did your resolve to "uninstall until this gets fixed," because... well... you obviously didn't.What has any of that have to do with the request to include that feature?

And how would you know what I did or did not do regarding installing or uninstalling?

Tralala
03-25-2007, 04:47 PM
What has any of that have to do with the request to include that feature?
When you first posted, it wasn't worded as a "request," but rather as a bug report that was compelling you to "uninstall." That kind of knee-jerk reaction can be frustrating to coders gracious enough to share their work. Dismounted has been generous here... and strong-arming him to make the code work precisely the way YOU initially expect isn't necessarily the most tactful approach, that's all.

(FWIW, I wouldn't have bothered to comment further, but your snarky post/link with the little winky was petty and misguided, IMHO.)

And how would you know what I did or did not do regarding installing or uninstalling?
Anyone reading this thread is aware of your travails; you've posted every single step of the way.

And when you first posted and said "works fine," it was I who logged into your forum and demonstrated that it didn't. Re-read the thread, kemosabe.

Smoothie
03-25-2007, 05:17 PM
You seem to be having this "knee-jerk" reaction after I posted a link showing you I asked politely for this feature to be included, if possible. What I did or did not do before, during or after is none of your business. Not sure what your problem is, kemosabe.

Tralala
03-25-2007, 07:32 PM
LOL! We're on the same page, dude. We both want to see the new feature introduced, yes?

Crikey... it's no wonder so many coders get discouraged and disappear around here.

Doctor Death
03-25-2007, 08:14 PM
If anybody wants me to prove that this works, PM me and I'll install it on your forums for you.


Dismounted installed on my forums and it is SWEET... works flawlessly....

I guess I am just a bonehead when it comes to installing.

Thanks much Dismounted again, that was very good of you to take the time and help out.

Doc
www.ddsog.com

Smoothie
03-26-2007, 01:25 AM
LOL! We're on the same page, dude. We both want to see the new feature introduced, yes?
Who's got the popcorn? Top notch support!

Dismounted
03-26-2007, 11:10 AM
I'm trying to figure out this AJAX stuff and get it to work inline with my mod :p.

Dismounted
09-19-2007, 07:58 AM
Hack Updated!

19/09/2007 - Version 1.2
- Automatic Template Edits
- Added Confirm When Double-Clicking Forum Icon
- Updated ReadMe

Doctor Death
09-19-2007, 10:16 AM
Dismounted.... The upgrade instructions show what to remove from HeadInclude, but all other templates that you list dont have anything in the data blocks to find and remove.

Can you check this and repost it so I can finish the upgrade?

Thanks!

Dismounted
09-19-2007, 11:53 AM
I've updated the ReadMe as I forgot that we had to put the original things back :p. And to answer your query, all the "Finds" were copied directly from the 1.1 ReadMe, so I don't know why you can't find them. In that case, take a fragment of the search string and look for that.

Doctor Death
09-19-2007, 10:20 PM
I've updated the ReadMe as I forgot that we had to put the original things back :p. And to answer your query, all the "Finds" were copied directly from the 1.1 ReadMe, so I don't know why you can't find them. In that case, take a fragment of the search string and look for that.


Understand but I was not willing to make that assumption...

Appreciate the feedback.

Did you actually LOOK at your readme? It is not quite right :)

Dismounted
09-20-2007, 06:32 AM
What's not quite right? The banner? I know about that issue :).

yoyoyoyo
09-22-2007, 10:00 PM
This mod does not work on my 3.6.8 forum. The confirmation pops up, but no forums are being marked read,

athlon64bit
04-01-2008, 12:39 AM
When viewing a category of forums, you don't get a prompt/confirmation to mark individual forums as read.:(

athlon64bit
01-24-2010, 09:27 PM
Any plans for a vb 4 version of this? :) Anyone tested it on vb 4?