MyBB Community Forums
[How To?] Mark forum(s) read - 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: [How To?] Mark forum(s) read (/thread-199144.html)



Mark forum(s) read - eeji - 2016-08-29

I want to put a link in the header to mark forums read, but for some stupid reason {$post_code_string} and {$fid} aren't available to that template.

Has anyone got any ideas how it can be done?

my code so far (in the 'header' template)...


<li>
	<if THIS_SCRIPT == "forumdisplay.php" then>
		<a href="misc.php?action=markread&amp;fid={$fid}{$post_code_string}"><i style="font-size: 12px;" class="fa fa-file-text fa-fw"></i> Mark This Forum Read</a>
	<else>
		<a href="misc.php?action=markread{$post_code_string}"><i style="font-size: 12px;" class="fa fa-file-text fa-fw"></i> Mark All Forums Read</a>
	</if>
</li>

(template conditionals plugin is installed to allow use of <if> )


RE: Mark forum(s) read - eeji - 2016-08-30

never mind, I wrote a little plugin to fix it


RE: Mark forum(s) read - JordanMussi - 2016-08-30

For others who may be interested, you can use:
{$mybb->settings['bburl']}/misc.php?action=markread&amp;fid={$mybb->input['fid']}&amp;my_post_key={$mybb->post_code}
But you will need to use XThreads in order to use the if statement in templates.