MyBB Community Forums
Add a " Mark all forums read " to header - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Add a " Mark all forums read " to header (/thread-229301.html)



Add a " Mark all forums read " to header - philbean - 2020-09-04

So I'd like to add a Mark all forums read link to the header as well as the default footer one.

I tried what I thought would work... and what I've seen in a few older postings on here.

in header_welcomeblock_member I added the following line where I want the link..


<a href="{$mybb->settings['bburl']}/misc.php?action=markread{$post_code_string}">{$lang->bottomlinks_markread}</a>


but when clicking the link, you just get..


Authorization code mismatch. Are you accessing this function correctly? Please go back and try again.


I notice when you hover over the link in the header, all the &my_post_key=....  bit is missing

Any ideas ?




RE: Add a " Mark all forums read " to header - Vanz - 2020-09-05

https://community.mybb.com/thread-218862.html


RE: Add a " Mark all forums read " to header - philbean - 2020-09-05

Not sure that helps me.

Mines a brand new board so those fixes are already in place. Plus this isn't one of the 4 templates mentioned there and doesn't have any
<form> tag at all


RE: Add a " Mark all forums read " to header - Matt - 2020-09-05

It's because $post_code_string hasn't been defined at the time it renders the header. Change:

{$post_code_string}

to:

&amp;my_post_key={$mybb->post_code}



RE: Add a " Mark all forums read " to header - philbean - 2020-09-06

Thats done it.
Nice one Smile Thanks