Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Split Useronline on Forumhome Details »»
Split Useronline on Forumhome
Version: 2.0.0, by consolegaming consolegaming is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.7.x Rating:
Released: 05-31-2008 Last Update: Never Installs: 138
DB Changes Uses Plugins Template Edits
Additional Files Translations  
No support by the author.

Description
Splits the User Online section on the Forum Home to allow for staff/team members and users to be separated into groups. This is a new version of Surviver's original modification which was made for vBulletin 3.6.4. This new product was made with Survivor's permission and is heavily based upon the original modification.

The original modification can be found here:
https://vborg.vbsupport.ru/showthread.php?t=135771

Features
  • Currently allows for three different types of extra users (Team, Premium and VIP) on top of the usual members.
  • This is now controlled through the usergroup manager whereby you can select Yes or No for each of the three types of users.
  • Fixes the saving issue experienced by users of the previous modification running vBulletin 3.7.

Installation
  1. Upload all necessary files to their respective directories.
  2. Install the product XML file.
  3. Turn on the Split Useronline tool (vBulletin Options -> Forum Home Page Options -> Split Useronline - Yes.
  4. Implement small template edit (see below).
  5. Set relevant permissions for each usergroup.

Upgrade
Unfortunately anyone wishing to upgrade from the previous modification to this will be unable to. I was advised to create this as a seperate product to avoid any potential conflicts in the future, and also due to the differences in how the settings are done there would have been no way to keep the saved settings anyway.

However anyone who has already experienced the saving issue with the existing Product will have already lost their settings.

Template Edit
  1. Open the forumhome_loggedinuser template.
  2. Find:
    HTML Code:
    <if condition="$show['comma_leader']">, </if>
  3. Replace with:
    HTML Code:
    <if condition="$show['comma_leader']"> </if>

Author Notes
The change of location for the settings was done for two reasons: it was easier to sort out and I wanted the settings to be more logically placed. This allows for anyone with several 'team' usergroups to create new usergroups based on the permissions of an existing one therefore keeping the relevant permissions. Meaning it should make things easier in the long term.

Credit for the original modification obviously goes to Surviver as mentioned at the top. Also the credit for the above template edit goes to GamerGirl27 though I will be trying to find a solution that removes the need for any template edits.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 06-14-2008, 08:57 PM
consolegaming consolegaming is offline
 
Join Date: Jan 2007
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ lucky try the following (not tested but just fixing some bugs I noticed in your supplied code samples:

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?> 
- <product productid="rjs_split_online" active="1">
  <title>Split Useronline</title> 
  <description>Splits the online user listing in FORUMHOME. vBulletin 3.7 Compatible.</description> 
  <version>2.0.0</version> 
- <url>
- <![CDATA[ https://vborg.vbsupport.ru/misc.php?do=producthelp&pid=rjs_split_online
  ]]> 
  </url>
- <versioncheckurl>
- <![CDATA[ https://vborg.vbsupport.ru/misc.php?do=productcheck&pid=rjs_split_online
  ]]> 
  </versioncheckurl>
- <dependencies>
  <dependency dependencytype="vbulletin" minversion="3.7" maxversion="" /> 
  </dependencies>
- <codes>
- <code version="2.0.0">
- <installcode>
- <![CDATA[ 
$db->hide_errors();
$db->query("ALTER TABLE " . TABLE_PREFIX . "usergroup ADD split_useronline_permissions INT UNSIGNED NOT NULL DEFAULT 0");
$db->show_errors();

  ]]> 
  </installcode>
- <uninstallcode>
- <![CDATA[ 
$db->hide_errors();
$db->query("ALTER TABLE ". TABLE_PREFIX . "usergroup DROP split_useronline_permissions");
$db->show_errors();

  ]]> 
  </uninstallcode>
  </code>
  </codes>
  <templates /> 
- <plugins>
- <plugin active="1" executionorder="5">
  <title>Display</title> 
  <hookname>forumhome_complete</hookname> 
- <phpcode>
- <![CDATA[ 
if(($activeonlineusers['team'] OR $activeonlineusers['programmers'] OR $activeonlineusers['members'] OR $activeonlineusers['premiummembers'] OR $activeonlineusers['vips']) AND $vbulletin->options['split_useronline_active'])
{
	unset($activeusers);
	if($activeonlineusers['team'])
	{
		$activeonlineusers['team'] = substr($activeonlineusers['team'], 2);
		$activeusers .= "<b>".$vbphrase['team'].":</b>&nbsp;".$activeonlineusers['team']."<br /><br />";
	}
	if($activeonlineusers['programmers'])
	{
		$activeonlineusers['programmers'] = substr($activeonlineusers['programmers'], 0);
		$activeusers .= "<b>".$vbphrase['programmers'].":</b>&nbsp;".$activeonlineusers['programmers']."<br /><br />";
	}
	if($activeonlineusers['vips'])
	{
		$activeonlineusers['vips'] = substr($activeonlineusers['vips'], 2);
		$activeusers .= "<b>".$vbphrase['vips'].":</b>&nbsp;".$activeonlineusers['vips']."<br /><br />";
	}
	if($activeonlineusers['premiummembers'])
	{
		$activeonlineusers['premiummembers'] = substr($activeonlineusers['premiummembers'], 2);
		$activeusers .= "<b>".$vbphrase['premiummembers'].":</b>&nbsp;".$activeonlineusers['premiummembers']."<br /><br />";
	}
	if($activeonlineusers['members'])
	{
		iif(!$activeonlineusers['team'] AND !$activeonlineusers['premiummembers'], $activeonlineusers['members'] = substr($activeonlineusers['members'], 2));
		$activeusers .= iif($show['othergroups'], "<b>".$vbphrase['members'].":</b>&nbsp;").$activeonlineusers['members']."<br />";
	}
}

  ]]> 
  </phpcode>
  </plugin>
- <plugin active="1" executionorder="5">
  <title>Split</title> 
  <hookname>forumhome_loggedinuser</hookname> 
- <phpcode>
- <![CDATA[ 
if($vbulletin->options['split_useronline_active'])
{
	$split = $vbulletin->bf_ugp_split_useronline_permissions;
	$bit = $vbulletin->usergroupcache[$loggedin['displaygroupid']]['split_useronline_permissions'];
	if ($bit & $split['split_useronline_team'] AND fetch_online_status($loggedin))
	{
		eval('$activeonlineusers[\'team\'] .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
		$numbervisible++;
		$show['othergroups'] = true;
	} 
	elseif ($bit & $split['split_useronline_programmers'] AND fetch_online_status($loggedin))
	{
		eval('$activeonlineusers[\'programmers\'] .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
		$numbervisible++;
		$show['othergroups'] = true;
	}
	elseif ($bit & $split['split_useronline_vip'] AND fetch_online_status($loggedin))
	{
		eval('$activeonlineusers[\'vips\'] .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
		$numbervisible++;
		$show['othergroups'] = true;
	}
	elseif ($bit & $split['split_useronline_premium'] AND fetch_online_status($loggedin))
	{
		eval('$activeonlineusers[\'premiummembers\'] .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
		$numbervisible++;
		$show['othergroups'] = true;
	}
	elseif (fetch_online_status($loggedin))
	{
		eval('$activeonlineusers[\'members\'] .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
		$numbervisible++;
	}
	return;
}

  ]]> 
  </phpcode>
  </plugin>
  </plugins>
- <phrases>
- <phrasetype name="Permissions" fieldname="cppermission">
- <phrase name="setting_split_useronline_premiumusers_title" date="1212283503" username="Rjs37" version="2.0.0">
- <![CDATA[ This is a Premium Usergroup
  ]]> 
  </phrase>
- <phrase name="setting_split_useronline_teamusers_title" date="1212283535" username="Rjs37" version="2.0.0">
- <![CDATA[ This is a Team Usergroup
  ]]> 
  </phrase>
- <phrase name="setting_split_useronline_programmers_title" date="1212283543" username="Rjs37" version="2.0.0">
- <![CDATA[ This is a programmers and Crackers Usergroup
  ]]> 
  </phrase>
- <phrase name="setting_split_useronline_vipusers_title" date="1212283556" username="Rjs37" version="2.0.0">
- <![CDATA[ This is a VIP Usergroup
  ]]> 
  </phrase>
- <phrase name="split_useronline_permissions" date="1212283584" username="Rjs37" version="2.0.0">
- <![CDATA[ Split Useronline
  ]]> 
  </phrase>
  </phrasetype>
- <phrasetype name="GLOBAL" fieldname="global">
- <phrase name="premiummembers" date="1212285962" username="Rjs37" version="2.0.0">
- <![CDATA[ Members
  ]]> 
  </phrase>
- <phrase name="team" date="1212285847" username="Rjs37" version="2.0.0">
- <![CDATA[ Staff
  ]]> 
  </phrase>
- <phrase name="programmers and Crackers" date="1212285843" username="Rjs37" version="2.0.0">
- <![CDATA[ programmers and Crackers
  ]]> 
  </phrase>
- <phrase name="vips" date="1212285904" username="Rjs37" version="2.0.0">
- <![CDATA[ VIPs and Contributors
  ]]> 
  </phrase>
  </phrasetype>
- <phrasetype name="vBulletin Settings" fieldname="vbsettings">
- <phrase name="setting_split_useronline_active_desc" date="1212283388" username="Rjs37" version="2.0.0">
- <![CDATA[ Activate the splitting of usergroups on forumhome ?
  ]]> 
  </phrase>
- <phrase name="setting_split_useronline_active_title" date="1212283388" username="Rjs37" version="2.0.0">
- <![CDATA[ Split Useronline
  ]]> 
  </phrase>
  </phrasetype>
  </phrases>
- <options>
- <settinggroup name="forumhome" displayorder="400">
- <setting varname="split_useronline_active" displayorder="90">
  <datatype>free</datatype> 
  <optioncode>yesno</optioncode> 
  <defaultvalue>1</defaultvalue> 
  </setting>
  </settinggroup>
  </options>
  <helptopics /> 
  <cronentries /> 
  <faqentries /> 
  </product>
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?> 
- <bitfields product="rjs_split_online">
- <bitfielddefs>
- <group name="ugp">
- <group name="split_useronline_permissions">
  <bitfield name="split_useronline_team" group="split_useronline_permissions" phrase="setting_split_useronline_teamusers_title" install="">1</bitfield> 
  <bitfield name="split_useronline_programmers" group="split_useronline_permissions" phrase="setting_split_useronline_programmersusers_title" install="">2</bitfield> 
  <bitfield name="split_useronline_premium" group="split_useronline_permissions" phrase="setting_split_useronline_premiumusers_title" install="">4</bitfield> 
  <bitfield name="split_useronline_vip" group="split_useronline_permissions" phrase="setting_split_useronline_vipusers_title" install="">8</bitfield> 
  </group>
  </group>
  </bitfielddefs>
  </bitfields>
I've put the changes from your code in red so you can see what I've changed (just adding an OR into the first sample and changing the bitfield values so they are correct. Values need to go up in powers of 2: 1,2,4,8,16,32 etc. That's how binary works as you can represent numbers 0-63 with just 6 bits. This attachment may help:
https://vborg.vbsupport.ru/attachmen...7&d=1199470611

Also I'm not sure what the -'s are in front of the lines though unless they were added by your editor? If so remember to just make the alterations I've highlighted into your own code rather than copying and pasting it.

@anantthakor: "UFN DeV Team" certainly wasn't in my plugin, it sounds like the phrases are possibly conflicting with another plugin that is attempting to use a phrase of the same name? In any case try searching the phrases (found in the admincp menu) for that and if you don't mind changing where else that phrase is used then feel free to change it. Just surprised about it really. I used the same phrases as the original mod to try and avoid this exact problem lol.

@Nemesis: Nice to see a friendly face around here lol. The main reason I did this modification was because I wanted it myself on 3.7 and saw no reason why I shouldn't release it for everyone else too. And the ladder system isn't a vB mod :P.

Sorry guys about not doing an update as I had originally planned, gt quite a few projects going on (mainly on doing a new site design) so I haven;t had as much spare time as I had expected. The main two updates I want to do would be firstly to fix the bug on not checking additional usergroups and at some point as I said on the first page I would like to give the admins the choice of how many groups to have and what they are called though at the moment that's a bit above my level. So let me get the bug fixxed first and then I can start looking into the expansion .
Reply With Quote
  #23  
Old 06-16-2008, 06:38 AM
lucky_1 lucky_1 is offline
 
Join Date: Mar 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ya bro that - es my mistake =)). I just reedited the code and copied from the xml file not from editor. Thx for a late update but i'll check this. Also i've asked u to make a custom mod like this in which custom groups can be added and there names too. Im waiting for the next update.
Reply With Quote
  #24  
Old 07-14-2008, 06:02 PM
mystic10 mystic10 is offline
 
Join Date: Sep 2007
Posts: 298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there is no option to change it like in the other one where we can chage the worlds to fit our forum..how do we go about doing that...
Reply With Quote
  #25  
Old 07-14-2008, 06:21 PM
mystic10 mystic10 is offline
 
Join Date: Sep 2007
Posts: 298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any idea how to make it work with the userlegend hack...when i turn on the spit the userlend hack disapears and when i trun the hack off it reappears kindly help
Reply With Quote
  #26  
Old 07-14-2008, 07:03 PM
TilkiBey's Avatar
TilkiBey TilkiBey is offline
 
Join Date: Jul 2008
Location: Konya, TR
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx and installed
but, i wanna add more groups
not 3,maybe 5 or 6
is it possible?
can i do it?
Reply With Quote
  #27  
Old 07-17-2008, 06:22 AM
Senti.Jatt Senti.Jatt is offline
 
Join Date: Mar 2008
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mystic10 View Post
any idea how to make it work with the userlegend hack...when i turn on the spit the userlend hack disapears and when i trun the hack off it reappears kindly help
im looking for that too
Reply With Quote
  #28  
Old 07-17-2008, 09:50 AM
Senti.Jatt Senti.Jatt is offline
 
Join Date: Mar 2008
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how to change the phrase word?? i only activated team usergroup and it says admins and shows all the staff in admins group even its mod?? plz reply asap
Reply With Quote
  #29  
Old 07-19-2008, 12:28 PM
Senti.Jatt Senti.Jatt is offline
 
Join Date: Mar 2008
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

guyz anyone?
Reply With Quote
  #30  
Old 07-24-2008, 05:37 AM
Prisim Prisim is offline
 
Join Date: May 2008
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BRo when i install it give an error on forum home
;rm THis is the eror word tat can see in who is online

Wat can i do for tat bro

PLz reply soon

Thanks in Advance
Reply With Quote
  #31  
Old 07-24-2008, 01:14 PM
kushal kushal is offline
 
Join Date: May 2006
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04515 seconds
  • Memory Usage 2,333KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete