MyBB Community Forums

Full Version: Open / Close threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This plugin if for paid subscribers of mybbtalk.net, and is NOT advertised as free

Details:

Name: Open / Close threads
Author: Bencori
Version: 1.1
Compatibility: 1.6.x
Description: Allow your users to open/close their threads from the forum.

About:

Allow your users to close or re-open their own threads. Will add a new button (look at the screenshots), to the allowed user groups, on their threads.

You can set the groups allowed to open, and the groups allowed to close asynchronously (user group A can close but not re-open, user group B can close and re-open).

It supports language files (only 3 different texts, but it's always better) and the buttons' PSD are included in case you don't have them.

Usage:

- Upload what's inside the "UPLOAD" folder to your forum directory.
- Make sure the images went to your current theme's folder.
- Activate plugin.
- Go to your ACP and under 'Configuration -> Posting' set the groups allowed to close and re-open their own threads.

Screenshots:

[attachment=22745]

[attachment=22747]

[attachment=22748]

[attachment=22749]


Download:

Download
Why are you running 2 sql queries to identify the locked thread ? You can do this with $thread['closed'] == 1 variable. e.g. I'm pointing out this code in your plugin.
    $check = $db->simple_select("threads", "closed", "tid='{$thread['tid']}' AND closed = '1'");
    If ($db->num_rows($check))
I didn't know I could do that. It's only my second day making plugins, ain't quite familiar with the MyBB arrays and what they hold.

Well, isn't dramatic, this plugin does't make many queries anyway, but I'll update it whenever I'll add or change something to the plugin.
It is good to be optimized as much as possible.
I know, I always try to keep it in mind, just isn't familiar with MyBB development yet. I will remove this extra query.
Dont worry about it, its not life or death lol
(2011-05-15, 09:29 PM)Janota Wrote: [ -> ]Dont worry about it, its not life or death lol

Running un-usual queries would make load on large forums. That's why if you've a better optimized code available already then there is no need to make an extra burden.
You are right. I have updated it.
thanks for this
(2011-05-15, 10:01 PM)Bencori Wrote: [ -> ]You are right. I have updated it.

Thanks, and congratulations on your great plugin. It might be very useful for someone. Smile
Pages: 1 2