MyBB Community Forums

Full Version: Mark forum(s) read
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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> )
never mind, I wrote a little plugin to fix it
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.