Thread: Forum Home Enhancements - Split Useronline on Forumhome
View Single Post
  #18  
Old 06-10-2008, 07:14 AM
lucky_1 lucky_1 is offline
 
Join Date: Mar 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also i tried again today. I wanted to add programmer and crackers group into the legend. The edited product xml file is this look

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'] $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 and Crackersusers_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>

and bitfield xml file like this

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="">3</bitfield> 
  <bitfield name="split_useronline_vip" group="split_useronline_permissions" phrase="setting_split_useronline_vipusers_title" install="">4</bitfield> 
  </group>
  </group>
  </bitfielddefs>
  </bitfields>
But error again on line 11 syntax error eval code.


Pls i need this to be solved as soon as possible.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01255 seconds
  • Memory Usage 1,804KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete