Skip to main content
Topic: Confirmation before marking all posts as read  (Read 4749 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Confirmation before marking all posts as read

Is the second or third time that on mobile for mistake I press the button "mark all as read". There were 3 pages with unread topics :( What do you think about the idea to add a confirm first window?
If I'm not wrong there was a mod for this on smf.
sorry for my bad english

Re: Confirmation before marking all posts as read

Reply #1

Liked, saw that I have it installed on my own forum, it works, posting the link: http://custom.simplemachines.org/mods/index.php?action=parse;mod=3786;attach=224880;smf_version=2.0.10 WTFPL license, code by margarett.
Nuff said. ;D

P.S.: Cut off some fingers, your hands are too big, LOL.
~ SimplePortal Support Team ~

Re: Confirmation before marking all posts as read

Reply #2

I thought it was there... O_o

Oh well, there is to add the confirmation string to a javascript variable and add some confirm all around the globe. ;D
BTW, while writing this I realized: why don't we add a wrapper around confirm? In the future it may be the place to store some nicer interface for the function. Opinions?
Bugs creator.
Features destroyer.
Template killer.

Re: Confirmation before marking all posts as read

Reply #3

It could either be browser-related or styled along with the forum. To be honest either way is fine, but I think that in 1.1 or something this might look "better" if it's styled ;) So yeah, go with the wrapper.
~ SimplePortal Support Team ~

Re: Confirmation before marking all posts as read

Reply #4

Don't forget ♥  :D
~ SimplePortal Support Team ~

Re: Confirmation before marking all posts as read

Reply #5

I tried, but I was not able to get it working... even on a simple textarea. LOL
Bugs creator.
Features destroyer.
Template killer.

Re: Confirmation before marking all posts as read

Reply #6

Temporarily code it the easier way to push it in a release (maybe?), and retry after you get some sleep :)
~ SimplePortal Support Team ~

Re: Confirmation before marking all posts as read

Reply #7

Are there any news on this?  Sorry if I insist, but from mobile it's very easy to press that button by mistake and mark all as read, just happened today and I had 3 pages of unread messages.
sorry for my bad english

Re: Confirmation before marking all posts as read

Reply #8

:-[ :-[ :-[
I thought it was added a while ago...

 emanuele hides

If you want a quick workaround for your site, open script_elk.js (themes/default/scripts) and replace the markboardreadButton function with:
Code: [Select]
function markboardreadButton(btn)
{
if (!confirm('Are you sure you want to mark all the messages in this board as read?'))
return false;

toggleButtonAJAX(btn);

// Remove all the "new" icons next to the topics subjects
$('.new_posts').remove();

return false;
}

ad the markallreadButton with:
Code: [Select]
function markallreadButton(btn)
{
if (!confirm('Are you sure you want to mark messages all as read?'))
return false;

toggleButtonAJAX(btn);

// Remove all the "new" icons next to the topics subjects
$('.new_posts').remove();

// Turn the board icon class to off
$('.board_icon').each(function() {
$(this).removeClass('on_board on2_board').addClass('off_board');
});

$('.board_new_posts').removeClass('board_new_posts');

return false;
}
Of course you can customize the message. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: Confirmation before marking all posts as read

Reply #9

I'll try this later, thank you Emanuele.
sorry for my bad english

Re: Confirmation before marking all posts as read

Reply #10

Thank you Emanuele, it works ;)
sorry for my bad english

Re: Confirmation before marking all posts as read

Reply #11

I suggest we make it default in ElkArte core. It is always good to confirm.

Re: Confirmation before marking all posts as read

Reply #12

Where I usually press the "Mark all as read" is in "New Posts" (index.php?action=unread)
I suggest to also add the confirmation message for  markunreadButton function

Code: [Select]
function markunreadButton(btn)
{
if (!confirm('Are you sure .....?'))
return false;
toggleHeaderAJAX(btn, 'main_content_section');

return false;
}

Quote from: ahrasis – I suggest we make it default in ElkArte core. It is always good to confirm.
https://github.com/elkarte/Elkarte/issues/2690
Last Edit: September 22, 2016, 06:53:39 pm by radu81
sorry for my bad english

Re: Confirmation before marking all posts as read

Reply #13

I lost track of all the "mark as read" we have! LOL
Bugs creator.
Features destroyer.
Template killer.

Re: Confirmation before marking all posts as read

Reply #14

that a dev-ish way of saying "I forgot"? :P
LiveGallery - Simple gallery addon for ElkArte