MyBB Codes

Full Version: [Release 1.4.x] View Thread Readers 1.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Thank you.Smile I think it makes people nervous.
And one last request.: D
I like, that every member see, that how many members view this threads. But only some groups see that who view the thread.
I created screenshote.
Example the registered group see the next:[attachment=618]
When he have permission(example VIP members):
[attachment=619]

I want, that only VIP members(VIP group) can see the member. I editing to next text: "Only VIP members can see that who viewed this thread. You can subcribed here: link."
I think that "19 member(s) viewed this thread in the last 149 days : " of the attractiveness of this feature and the member will be subcribe to VIP group.
My forum is Community forum, where are interest threads, we can make friends etc.
Ok, i can see the logic behind your request, this way you could get more subscription by people wanting to see who read the thread... Wink

Ok i will add a 2 new settings for the users in excluded groups :

1- Text displayed instead of the Usernames.
2- Enable/disable the display of the main bar just showing the count in days.

This should be completed this week...
Thank you and good working.Smile
And I can edit or add this text, because my forum languages is hungary. I haven't more problem.Smile
Sorry but im getting a weird error in the plugins section in ACP ?

Please make sure IN_MYBB is defined."); } global $mybb, $lang; $plugins->add_hook("showthread_threaded", "Regentronique_ViewThreadReaders_Show"); $plugins->add_hook("showthread_linear", "Regentronique_ViewThreadReaders_Show"); function Regentronique_ViewThreadReaders_info() { /** * Array of information about the plugin. * name: The name of the plugin * description: Description of what the plugin does * website: The website the plugin is maintained at (Optional) * author: The name of the author of the plugin * authorsite: The URL to the website of the author (Optional) * version: The version number of the plugin * guid: Unique ID issued by the MyBB Mods site for version checking * compatibility: A CSV list of MyBB versions supported. Ex, "121,123", "12*". Wildcards supported. */ return array( "name" => "Regentronique View Thread Readers!", "description" => "This plugin will allow you to View Thread Readers at the bottom of each thread.", "website" => "http://MyBBCodes.com", "author" => "Exdiogene", "authorsite" => "http://Regentronique.com", "version" => "1.3", 'guid' => '', "compatibility" => "*" ); } function Regentronique_ViewThreadReaders_install(){ global $db; $regentronique_group = array( 'gid' => 'NULL', 'name' => 'Regentronique_ViewThreadReaders', 'title' => 'Regentronique ViewThreadReaders Settings', 'description' => 'Settings for the Regentronique ViewThreadReaders plugin', 'disporder' => '1', 'isdefault' => 'no', ); $db->insert_query('settinggroups', $regentronique_group); $gid = $db->insert_id(); $regentronique_setting = array( 'sid' => 'NULL', 'name' => 'Regentronique_ViewThreadReaders_Text', 'title' => 'View Thread Readers Text', 'description' => 'Text used for the View Thread Readers bar.(You can include {MemberNumber} and {DayNumber})', 'optionscode' => 'text', 'value' => '{MemberNumber} members viewed this thread in the last {DayNumber} days :', 'disporder' => 1, 'gid' => intval($gid), ); $db->insert_query('settings', $regentronique_setting); $regentronique_setting = array( 'sid' => 'NULL', 'name' => 'Regentronique_ViewThreadReaders_TextColor', 'title' => 'View Thread Readers Text Color', 'description' => 'Text Color used for the View Thread Readers bar.', 'optionscode' => 'text', 'value' => '#906000', 'disporder' => 2, 'gid' => intval($gid), ); $db->insert_query('settings', $regentronique_setting); $regentronique_setting = array( 'sid' => 'NULL', 'name' => 'Regentronique_ViewThreadReaders_EnableGroupStyle', 'title' => 'Enable Group Style Display for users', 'description' => 'If this is enabled, then the users name will be formated with its group style.', 'optionscode' => 'yesno', 'value' => '1', 'disporder' => 3, 'gid' => intval($gid), ); $db->insert_query('settings', $regentronique_setting); $regentronique_setting = array( 'sid' => 'NULL', 'name' => 'Regentronique_ViewThreadReaders_EnableBanned', 'title' => 'Enable Display of Banned users', 'description' => 'If this is enabled, then the banned users will be displayed.', 'optionscode' => 'yesno', 'value' => '1', 'disporder' => 4, 'gid' => intval($gid), ); $db->insert_query('settings', $regentronique_setting); $regentronique_setting = array( 'sid' => 'NULL', 'name' => 'Regentronique_ViewThreadReaders_UserCount', 'title' => 'Number of User in the ViewThreadReaders', 'description' => 'The maximum number of users that will be displayed.', 'optionscode' => 'text', 'value' => '50', 'disporder' => 5, 'gid' => intval($gid), ); $db->insert_query('settings', $regentronique_setting); $regentronique_setting = array( 'sid' => 'NULL', 'name' => 'Regentronique_ViewThreadReaders_ExcludedGroups', 'title' => 'Groups excluded from viewing ViewThreadReaders', 'description' => 'The users groups, separated by commas, excluded from having ViewThreadReaders displayed.(Leave blank for all to see.)', 'optionscode' => 'text', 'value' => '0,1,2,5,7', 'disporder' => 6, 'gid' => intval($gid), ); $db->insert_query('settings', $regentronique_setting); rebuildsettings(); } function Regentronique_ViewThreadReaders_is_installed() { global $db, $mybb; $query = $db->simple_select("settinggroups", "name", "name='Regentronique_ViewThreadReaders'"); $num = $db->num_rows($query); if($num != "0"){ return true; }else{ return false; } } function Regentronique_ViewThreadReaders_uninstall() { global $mybb, $db; $db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='Regentronique_ViewThreadReaders'"); $db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name IN( 'Regentronique_ViewThreadReaders_TextColor', 'Regentronique_ViewThreadReaders_EnableBanned', 'Regentronique_ViewThreadReaders_EnableGroupStyle', 'Regentronique_ViewThreadReaders_UserCount', 'Regentronique_ViewThreadReaders_ExcludedGroups' )"); } function Regentronique_ViewThreadReaders_Show(){ global $mybb, $db, $tid, $posts, $showthread, $thread; if ( $mybb->settings['Regentronique_ViewThreadReaders_ExcludedGroups'] ){ $ExcludedGroups = explode(',', $mybb->settings['Regentronique_ViewThreadReaders_ExcludedGroups']); }else{ $ExcludedGroups = Array(); } if (!in_array($mybb->user['usergroup'], $ExcludedGroups)){ if ( $mybb->settings['Regentronique_ViewThreadReaders_EnableBanned'] != '1'){ $Banned = 'AND u.usergroup <> 7'; }else{ $Banned = ''; } $query1 = $db->query(" SELECT t.uid, t.dateline , u.username , u.usergroup FROM ".TABLE_PREFIX."threadsread t LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) WHERE t.tid='$tid' $Banned ORDER BY dateline DESC "); $rows = $db->num_rows($query1); $MyList = ''; $x = 0; if ($rows < $mybb->settings['Regentronique_ViewThreadReaders_UserCount']){ $xMax = $rows; }else{ $xMax = $mybb->settings['Regentronique_ViewThreadReaders_UserCount']; } while (($TUser = $db->fetch_array($query1)) && ($x < $mybb->settings['Regentronique_ViewThreadReaders_UserCount'])){ if ($mybb->settings['Regentronique_ViewThreadReaders_EnableGroupStyle'] != '0'){ $UserText = format_name($TUser['username'],$TUser['usergroup']); }else{ $UserText = $TUser['username']; } if (!$UserText){ $UserText = '(deleted)'; } /* if ( $mybb->settings['Regentronique_ViewThreadReaders_EnableBanned'] != '1'){ if ($TUser['usergroup'] == '7'){ if ($rows < $mybb->settings['Regentronique_ViewThreadReaders_UserCount']){ $xMax = $xMax - 1; } continue; } } */ $x++; if (($rows > 1) && ($x < $xMax)){ $MyList = ', '.$UserText.'' . $MyList; }else{ $MyList = ''.$UserText.'' . $MyList; } } if (substr($MyList,0,2) == ', '){ $MyList = substr($MyList,2); } $Days = Floor((time() - $thread['dateline']) / 86400); if ($Days > $mybb->settings['threadreadcut']){ $Days = $mybb->settings['threadreadcut']; } $text = str_replace(array('{MemberNumber}','{DayNumber}'),array($rows,$Days),$mybb->settings['Regentronique_ViewThreadReaders_Text']); $posts .= '
'.$text.'
'.$MyList.'
'; } } ?>
@Technoman :

Which version of MyBB do you use?

Can you show me a printscreen of the ACP with the error?

It could be because of another plugin interference...
Picture 1: this is what it looks like in plugins section (errors)
Picture 2: MyBB version
(all my pictures are uploaded threw imageshack)

[Image: pluginsinacp.jpg]

[Image: mybbversion.jpg]
First i have to tell you that you have quite a lot of active plugins there... UHH

I would recommend to try reinstalling the plugin again, because there seem to have been some corruption of the file there...
theres 4 versions so maybe its the wrong one im downloading?

Which 1 of the 4 should i be downloading?
The more recent one V1.3
Pages: 1 2 3
Reference URL's