Thread Rating:
  • 6 Vote(s) - 4.17 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.6] Invite Only Threads.
#1
This user has been denied support. This user has been denied support.
Author: Pratik Unadkat.
Author site: -
License: Mentioned below.

Description: Allows a user to define who can view or see his thread.

Features & functions:

1. Simple on/off setting.
2. Choose which usergroups can use this feature.
3. Set in which forums this plugin is active.
4. Moderators has ability to edit who can access threads or enable or disable the checkbox.

While creating a new thread or editing a post, the author of the thread is given with an option to check if the thread is invite only, meaning, only accessible to specified uids in the text box given right below it. He/she is supposed to enter the uids (separated by a comma if more than one) which can only access his/her thread. However, moderators (of that forum), Super Moderators & Administrators can access his/her thread despite of the uids he set. Moreover, no other users except the specified uids can reply to the thread (again, moderators/super moderators/administrators can reply).

Also the invite only option shows on editing post page only if it's the first post (meaning OP) of the thread.

The plugin comes with full language support.

Installation instructions:

1. Unzip the archive.
2. Upload iot.lang.php found inside inc/languages/ folder in the zip to ./inc/languages/ directory of your server.
3. Upload iot.php inside the inc/plugins/ folder which we just extracted now to (root)./inc/plugins directory of your website's server.
4. Go to ACP > Plugins and activate it.
5. Next, proceed to ACP > Settings > Configuration and find invite only threads settings and configure them.

Upgrading

Just simply overwrite/replace the existing plugin file.

Previews:

               


License:

Anyone who have downloaded this, the below but not limited to rules applies to them:

1. Not distributed under GNU/GPL.
2. You may modify the codes or plugin for your personal use but cannot claim it to be own or remodify and sell or reproduce under any cirumstances.
3. Free to edit for personal use but not allowed to distribute the plugin by modifying any codes.

Download:

http://mods.mybb.com/view/invite-only-threads

Please report any bugs if you may find and I will fix it. Also any suggestions shall be posted.
Reply
#2
nice i try it after someone report bugs and release new version Smile
Reply
#3
This user has been denied support. This user has been denied support.
This plugin doesn't necessarily has bugs, lol, I said if they find, report it and I'll fix it.
Reply
#4
yap i know that but i use it after someone report bug
Reply
#5
(2012-10-22, 09:12 AM)lexy Wrote: yap i know that but i use it after someone report bug

So would you use this plugin after someone reports any bug of the plugin? Makes no sense to me.

Anyway, suggestion for you Unadkat, I think there is no need to add a checkbox. If the UID field is empty then you may return the function.
Reply
#6
This user has been denied support. This user has been denied support.
I thought about it Yaldaram, but I chose this to be preferred way to do it.

For instance, a user may not want to enable that option for now, but keep the uids there intact as records, so in future he can just check the checkbox. Smile

Edit: v1.1 is released.

The update fixes a minor bug. Furthermore, the update disables replying to thread if the author of the thread has chose it to be an invite only thread.
Reply
#7
Some suggestions:
  1. You should load the language file only when necessary.
  2. Instead of using error() at "datahandler_post_insert_thread" you should set an datahanlder error (which is shown friendly) at "datahandler_post_validate_thread".
  3. $thread (array which golds all the thread data) is already avilable at "editpost_action_start" so you don't need to run an extra query.
    $query = $db->query("SELECT tid, inviteonlycheck, inviteonlyuids, firstpost FROM ".TABLE_PREFIX."threads where tid='".$post['tid']."'");
  4. You are running one unnecessary query at "iot_editpost_action", use "datahandler_post_update_thread".
Reply
#8
This user has been denied support. This user has been denied support.
1. Where? Am loading language files/variable/function on display function because I've created a template which has language variables, so in order to display them, am using that function. I guess I didn't loaded language variable at the place where it posses no use.
2. Will do, thank you.
3. I guess I tried that or didn't, not sure, anyhow, I will give that a try.
4. Not sure about this.

Thanks for the valuable input.
Reply
#9
Great idea mate, will probably use! Big Grin

Reply
#10
(2012-10-23, 06:02 AM)crazy4cs Wrote: 1. Where? Am loading language files/variable/function on display function because I've created a template which has language variables, so in order to display them, am using that function. I guess I didn't loaded language variable at the place where it posses no use.

function iot_newthread_display()
{
    global $mybb, $templates, $iot, $lang;
	
	$lang->load("iot");

	$fid = intval($mybb->input['fid']);
	$forums = explode(",",$mybb->settings['iot_fid']);
	$iot_groups = $mybb->settings['iot_usergroup'];
	
	if($mybb->settings['iot_enabled'] == 1 AND iot_perms($iot_groups) AND in_array($fid, $forums))
	{
	eval("\$iot = \"".$templates->get("inviteonlythreads")."\";");
    }

}

You don't need to load the language file there, you can do it inside the if check.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)