MyBB Community Forums

Full Version: MyBB $thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Still a bit of an issue, tried a few combinations and can't get it to work.
Changed the button text for now, looking for a permanent solution though.
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:
<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.
Pages: 1 2 3