MyBB Community Forums
Change delete button to custom tool - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: Change delete button to custom tool (/thread-156753.html)

Pages: 1 2


Change delete button to custom tool - Robust - 2014-07-30

The delete button on every post, I think it runs a form so I'd need to change the thing from deletepost to custom mod tool 2. How do I do this? I think it's just a template edit but I'm not sure. Basically it'll junk the post instead of delete it permanently. Which templates need editing and how for this?


RE: Change delete button to custom tool - .m. - 2014-07-30

postbit_quickdelete template - replace entire code with your custom code !


RE: Change delete button to custom tool - Robust - 2014-07-31

That didn't work, I dunno how to change this. Currently the template is:
<a href="editpost.php?pid={$post['pid']}" onclick="Thread.deletePost({$post['pid']}); return false;" style="display: none;" id="quick_delete_{$post['pid']}">{$lang->postbit_qdelete}</a>
<script type="text/javascript">
// <!--
$('quick_delete_{$post['pid']}').style.display = '';
// -->
</script>

Idk how to make that do a custom tool instead, for example (this won't work obviously but it's an example:
<a href="editpost.php?pid={$post['pid']}" onclick="Thread.2({$post['pid']}); return false;" style="display: none;" id="2_{$post['pid']}">{$lang->postbit_qdelete}</a>
<script type="text/javascript">
// <!--
$('customtool_2_{$post['pid']}').style.display = '';
// -->
</script>


RE: Change delete button to custom tool - Robust - 2014-08-05

Still need this please.


RE: Change delete button to custom tool - Robust - 2014-08-14

Still need help with this.


RE: Change delete button to custom tool - Omar G. - 2014-08-15

As long as users are allowed to run the "delete" function it doesn't matter how you mask it, they will still be able to delete posts. If they try to..

The best option would be to disable the feature and add your button directly to postbit/_classic tempalte(s).

Or what about it plugin that does it for you...


RE: Change delete button to custom tool - Robust - 2014-08-15

I made it so they can't run it using MyPermissions - I just don't know how to add the button for the custom tool replacing the delete button.


RE: Change delete button to custom tool - Omar G. - 2014-08-16

Check out this http://community.mybb.com/thread-153725.html .


RE: Change delete button to custom tool - Robust - 2014-08-17

(2014-08-16, 06:14 PM)Omar G. Wrote: Check out this http://community.mybb.com/thread-153725.html .

That didn't really work for postbit - the button looks really strange, out of place and messes up layout of postbit tools altogether.


RE: Change delete button to custom tool - Omar G. - 2014-08-17

Style it?