Confirmation message to Mark as Read

Started by margarett, October 01, 2013, 11:09:52 AM

Previous topic - Next topic

margarett

Link to Mod

I'm sure everyone already found himself in this situation: 2 "unread posts since last visit", plus 4 pages of "All unread posts" and just when you are to click the "ALL UNREAD POSTS", you actually click the "MARK ALL MESSAGES AS READ".

This MOD will present you a confirmation box when you click the button "MARK ALL MESSAGES AS READ".

It does so in:
- BoardIndex (main forum page at the bottom)
- MessageIndex (list of topics inside a board)
- Unread Posts / Unread Replies

There are no configurations necessary, those are just 4 "replace" operations and a new language string.
This was tested in a clean 2.0.5 installation with default theme. Most themes do not change most of the files affected, but BoardIndex.template.php could cause conflicts with custom themes. If that's the case, please ask for advice.

This MODification was originally posted as a "Tip and Trick"
http://www.simplemachines.org/community/index.php?topic=512029.0

This MOD is licensed by WTFPL
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair


live627

Very nice.

A suggestion: Use JSE to aid with localization.

onclick="return confirm(' . JavaScriptEscape($txt['are_sure_mark_read']) . ');"

margarett

Actually I've used the same code used in "Remove" button, and that also brings a "localized" message, so I assume it should work without issues...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

impreza

Well as photographs that were added which makes modification changes
Portal ToTemat.pl - Filmy i Artykuły

Shambles

Nice and tidy, well done.


You were lucky it wasn't classified as a "small" mod and hence rejected, as other similarly sized mods have been... ;)

Chalky

Oh nice one! I'm going to install this - I'm always accidentally marking all messages as read!

Arantor

I really think this should be folded into 2.1.

margarett

Quote from: Arantor on October 01, 2013, 06:27:43 PM
I really think this should be folded into 2.1.
I'm struggling hard to make my way in this new world of GitHub and commit a PR. Not quite there, though :P

Quote from: Shambles on October 01, 2013, 04:47:27 PM
Nice and tidy, well done.
You were lucky it wasn't classified as a "small" mod and hence rejected, as other similarly sized mods have been... ;)
Thank you. Can't say I disagree totally. Please bear in mind that this was my first ever submitted MOD :P and that it's just meant to save some not-so-confident-to-edit-code users an easy alternative.

Quote from: impreza on October 01, 2013, 04:32:44 PM
Well as photographs that were added which makes modification changes
Actually there's not much to show, really. I thought of that, but a yes/no confirmation message is hardly worth a print screen :)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

live627

plus, the alert box differs peer browser, making screenshots.... wha? Why is this being discussed?

Arantor

Quote from: live627 on October 01, 2013, 07:01:25 PM
plus, the alert box differs peer browser, making screenshots.... wha? Why is this being discussed?

Because users like having things to look at, makes them feel more comfortable about including mods, even when it will be totally obvious about what the changes will be.

FragaCampos

"Simplicity is the ultimate sophistication." - Leonardo da Vinci

Thanks for the (very) handy mod. ;)

Advertisement: