2014-06-16, 07:20 PM
2014-06-24, 07:02 AM
Changed the button text for now, looking for a permanent solution though.
2014-06-24, 08:07 AM
I had some time so tested it and I don't understand your issue(s). I still don't know what your custom tool does so I implemented only the open/close:
It works just fine.
Also, it seems that no function is working correctly for you, so you probably didn't install the plugin correctly. In package there are 2 files - .txt and .php, both need to be uploaded to inc/plugins. The text file contains a list of functions which are allowed to be used.
<if is_moderator($thread['fid'], 'openclosethread') then>
<div class="float_right" style="padding-bottom: 8px;">
<if strpos($thread['closed'], '1') !== FALSE then>
<form action="{$mybb->settings['bburl']}/moderation.php" method="post">
<input type="hidden" name="modtype" value="thread" />
<input type="hidden" name="tid" value="{$thread['tid']}" />
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="action" value="openclosethread" />
<input type="submit" class="button" value="Open" />
</form>
<else>
<form action="{$mybb->settings['bburl']}/moderation.php" method="post">
<input type="hidden" name="modtype" value="thread" />
<input type="hidden" name="tid" value="{$thread['tid']}" />
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="action" value="openclosethread" />
<input type="submit" class="button" value="Close" />
</form>
</div>
</if>
</if>
It works just fine.
Also, it seems that no function is working correctly for you, so you probably didn't install the plugin correctly. In package there are 2 files - .txt and .php, both need to be uploaded to inc/plugins. The text file contains a list of functions which are allowed to be used.