MyBB Community Forums

Full Version: < theme related??> Moderation trouble after the last security update
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
((FYI: I know it's the older version, but I'd really like to be able to use this site)) I just wasted a large amount of time so please allow me to say I'm sure about this:

Start w/ a theme based on the default theme >> Apply the most recent moderation related patch >>> No trouble so far.

Start w/ a custom MyBB community released theme (different MyBB site / same hosting company) >> Apply the most recent moderation related patch >>> Nothing but trouble so far.

The moderation drop-down menu (stick thread, open thread, etc.) either takes me to a "you don't have permission to access this area" or an "authorization mismatch"

Reversing the manual patch gets everything back to normal. Confused

Here is the code for showthread_moderationoptions template (before the new patch)

FYI: The theme replaces {$inlinemod} with a large chunk of code underneath where {$inlinemod} used to be.

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form action="moderation.php" method="get" style="margin-top: 0; margin-bottom: 0;">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="modtype" value="thread" />
<input type="hidden" name="tid" value="{$tid}" /><span class="smalltext">
<strong>{$lang->moderation_options}</strong></span><br /> <select name="action" onchange="window.location=('moderation.php?action='+this.options[this.selectedIndex].value+'&amp;tid={$tid}&amp;modtype=thread&amp;my_post_key={$mybb->post_code}')">
<optgroup label="{$lang->standard_mod_tools}">
	<option value="threadnotes">{$lang->thread_notes}</option>
	<option value="openclosethread">{$lang->open_close_thread}</option>
	<option value="deletethread">{$lang->delete_thread}</option>
	{$adminpolloptions}
	<option value="deleteposts">{$lang->delete_posts}</option>
	<option value="move">{$lang->move_thread}</option>
	<option value="stick">{$lang->stick_unstick_thread}</option>
	<option value="split">{$lang->split_thread}</option>
	<option value="merge">{$lang->merge_threads}</option>
	<option value="mergeposts">{$lang->merge_posts}</option>
	<option value="removeredirects">{$lang->remove_redirects}</option>
	{$approveunapprovethread}
</optgroup>
{$customthreadtools}
</select>
{$gobutton}
</form>
</td>
<td style="white-space:nowrap"><script type="text/javascript" src="jscripts/inline_moderation.js?ver=1212"></script>
<form action="moderation.php" method="post" style="margin-top: 0; margin-bottom: 0;">
<input type="hidden" name="tid" value="{$tid}" />
<input type="hidden" name="modtype" value="inlinepost" />
<span class="smalltext"><strong>{$lang->inline_post_moderation}</strong></span><br />
<select name="action">
<optgroup label="{$lang->standard_mod_tools}">
	<option value="multideleteposts">{$lang->inline_delete_posts}</option>
	<option value="multimergeposts">{$lang->inline_merge_posts}</option>
	<option value="multisplitposts">{$lang->inline_split_posts}</option>
	<option value="multiapproveposts">{$lang->inline_approve_posts}</option>
	<option value="multiunapproveposts">{$lang->inline_unapprove_posts}</option>
</optgroup>
{$customposttools}
</select>
<input type="submit" class="button" name="go" value="{$lang->go} ({$inlinecount})" id="inline_go" />&nbsp;
<input type="button" onclick="javascript:inlineModeration.clearChecked();" value="{$lang->clear}" />
</form>
<script language="JavaScript" type="text/javascript">
var go_text = "{$lang->inline_go}";
var inlineType = "thread";
var inlineId = {$tid};
</script></td>
</tr>
</table>

<div align="center"><< <a href="showthread.php?tid={$tid}&amp;action=nextoldest">{$lang->next_oldest}</a> | <a href="showthread.php?tid={$tid}&amp;action=nextnewest">{$lang->next_newest}</a> >></div>

I'm not certain the theme is the problem, but for some reason the new patch is not working...
Anyone have ideas how to fix it??

Thank you very much.
^^^
Thanks Matt,

The manual patch I used was the current one for 1.2.14, and I think that link shows the input which helped create the patch.

@@@@

< low risk mod issues in MyBB 1.2.14 >

I have too many test sites and projects to make all of them perfect. For someone to even see the moderation drop-down menu they need to be logged in as a mod or higher. Also, moderation.php is not directly accessible.

Unless someone comes up with a (minor) miracle cure, I'll use the theme on two sites without the latest patch.

</ low risk mod issues in MyBB 1.2.14 >
You need to update your theme properly with the patches from the 1.4.4 announcement in the second post.
(2008-12-11, 05:41 PM)Ryan Gordon Wrote: [ -> ]You need to update your theme properly with the patches from the 1.4.4 announcement in the second post.

You are correct, and...
In this case update properly seems to include 'compensating' for custom re-writes of one or more templates:

With a default or semi-normal theme:

Update the theme properly with the moderation patches = Everything works fine.

With this non-default (other) theme:

Update the theme properly with the moderation patches = In-line moderation doesn't work. Switch back (without the last 1.2.14 patch) and in-line moderation works perfect.

So the problem (almost 100%) has to be here:

FYI: The theme replaces {$inlinemod} with a large chunk of code underneath where {$inlinemod} used to be.

// showthread_moderationoptions template
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form action="moderation.php" method="get" style="margin-top: 0; margin-bottom: 0;">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="modtype" value="thread" />
<input type="hidden" name="tid" value="{$tid}" /><span class="smalltext">
<strong>{$lang->moderation_options}</strong></span><br /> <select name="action" onchange="window.location=('moderation.php?action='+this.options[this.selectedIndex].value+'&amp;tid={$tid}&amp;modtype=thread&amp;my_post_key={$mybb->post_code}')">
<optgroup label="{$lang->standard_mod_tools}">
	<option value="threadnotes">{$lang->thread_notes}</option>
	<option value="openclosethread">{$lang->open_close_thread}</option>
	<option value="deletethread">{$lang->delete_thread}</option>
	{$adminpolloptions}
	<option value="deleteposts">{$lang->delete_posts}</option>
	<option value="move">{$lang->move_thread}</option>
	<option value="stick">{$lang->stick_unstick_thread}</option>
	<option value="split">{$lang->split_thread}</option>
	<option value="merge">{$lang->merge_threads}</option>
	<option value="mergeposts">{$lang->merge_posts}</option>
	<option value="removeredirects">{$lang->remove_redirects}</option>
	{$approveunapprovethread}
</optgroup>
{$customthreadtools}
</select>
{$gobutton}
</form>
</td>
<td style="white-space:nowrap"><script type="text/javascript" src="jscripts/inline_moderation.js?ver=1212"></script>
<form action="moderation.php" method="post" style="margin-top: 0; margin-bottom: 0;">
<input type="hidden" name="tid" value="{$tid}" />
<input type="hidden" name="modtype" value="inlinepost" />
<span class="smalltext"><strong>{$lang->inline_post_moderation}</strong></span><br />
<select name="action">
<optgroup label="{$lang->standard_mod_tools}">
	<option value="multideleteposts">{$lang->inline_delete_posts}</option>
	<option value="multimergeposts">{$lang->inline_merge_posts}</option>
	<option value="multisplitposts">{$lang->inline_split_posts}</option>
	<option value="multiapproveposts">{$lang->inline_approve_posts}</option>
	<option value="multiunapproveposts">{$lang->inline_unapprove_posts}</option>
</optgroup>
{$customposttools}
</select>
<input type="submit" class="button" name="go" value="{$lang->go} ({$inlinecount})" id="inline_go" />&nbsp;
<input type="button" onclick="javascript:inlineModeration.clearChecked();" value="{$lang->clear}" />
</form>
<script language="JavaScript" type="text/javascript">
var go_text = "{$lang->inline_go}";
var inlineType = "thread";
var inlineId = {$tid};
</script></td>
</tr>
</table>

<div align="center"><< <a href="showthread.php?tid={$tid}&amp;action=nextoldest">{$lang->next_oldest}</a> | <a href="showthread.php?tid={$tid}&amp;action=nextnewest">{$lang->next_newest}</a> >></div>


Thanks