Current time: 12-17-2024, 10:08 PM Hello There, Guest! (LoginRegister)


Announcement
We have the biggest collection of MyBB Plugins here on the Net. We have currently 175+ MyBB Exclusive Plugins, 80+ MyBB Compatible MyCodes and 16+ MyBB 1.4.x Themes (Some are still under construction...) Thus, we provide you the largest MyBB Stuff on the net including tutorials. Stay with us, you will find out some more to come.
Now you can easily create your own buttons set for MyBB! Click here to have a look...
*** You cannot do your registration behind any Proxies anymore! ***
Welcome Guest[3.141.47.82], connected from
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release 1.4.x] View Thread Readers 1.0
07-05-2010, 04:51 AM
Post: #15
RE: [Release 1.4.x] View Thread Readers 1.0
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's signature
Visit this user's website Find all posts by this user
Quote this message in a reply
0 member(s) viewed this thread in the last 365 days :
Post Reply 


Was This Thread Useful ?
Please Link To Us
URL
BBCode
HTML

Messages In This Thread
RE: [Release 1.4.x] View Thread Readers 1.0 - Technoman - 07-05-2010 04:51 AM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Regentronique Thread Notice exdiogene 0 11,149 02-15-2014 01:27 PM
Last Post: exdiogene
  Advanced Thread Tags exdiogene 40 23,308 11-17-2011 10:18 PM
Last Post: exdiogene
Heart [Release 1.4.x] Duplicate Posts Eraser 1.0 ghazal 3 5,423 06-19-2011 07:56 PM
Last Post: exdiogene
  [Release 1.4.x] Alphabetic Thread Display exdiogene 4 30,911 03-11-2011 02:07 AM
Last Post: billy423uk
  [Release 1.4.x] Profile Notify exdiogene 1 3,830 03-25-2010 04:59 AM
Last Post: fl00r

Forum Jump:

 
New To Site ?
Some Useful Links
  • Help

  • You Might Need To Register

  • Forum Statistics

  • Mark All Forums Read

  • Forum Staff

  • Log Out
  • Contact Us

  • Mybbcodes

  • Return to Top

  • Return to Content

  • Lite (Archive) Mode

  • RSS Syndication
  • Powered By MyBB, © 2002-2024 MyBB Group.
    Golden Crown - Designed and Published by ghazal & exdiogene of MyBBCodes.
    Hosting provided by WWWHostingServer.com