Thread: Forum Home Enhancements - Split Useronline on Forumhome (Members / Team)
View Single Post
  #100  
Old 05-24-2008, 05:53 PM
consolegaming consolegaming is offline
 
Join Date: Jan 2007
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok got a better fix to the double comma issue. One that won't bugger up when the plugin is disabled. The previous fix would cause no comma's to be shown if you disabled the plugin.

Firstly undo the steps highlighted by GamerGirl27 if you indeed followed them.

It then requires changes to 2 of the 3 plugins used for this Product.

On the Aufteilen plugin (the one attached to the forumhome_loggedinuser hook ).

Find (appears several times - be sure to replace each one):
Code:
", '
Replace with:
Code:
"'
This will appear inside the eval function for each of the member groups. And all we're doing is removing the , and space from each function. This then causes a slight error with a missing <a for the first user. To fix this you need to do the second plugin alteration.

On the Ausgeben plugin (the one attached to the forumhome-complete hook).

Replace your entire plugin code with the following:

Code:
if(($activeonlineusers['team'] OR $activeonlineusers['members'] OR $activeonlineusers['premiummembers'] OR $activeonlineusers['vips']) AND $vbulletin->options['split_useronline_active'])
{
    unset($activeusers);
    if($activeonlineusers['team'])
    {
        $activeusers .= "<b>".$vbphrase['team'].":</b>&nbsp;".$activeonlineusers['team']."<br /><br />"; }
    if($activeonlineusers['vips'])
    {
        $activeusers .= "<b>".$vbphrase['vips'].":</b>&nbsp;".$activeonlineusers['vips']."<br /><br />";
    }
    if($activeonlineusers['premiummembers'])
    {
        $activeusers .= "<b>".$vbphrase['premiummembers'].":</b>&nbsp;".$activeonlineusers['premiummembers']."<br /><br />";
    }
    if($activeonlineusers['members'])
    {
        $activeusers .= iif($show['othergroups'], "<b>".$vbphrase['members'].":</b>&nbsp;").$activeonlineusers['members']."<br />";
    }
}

All I did was remove every instance of the substr function. Originally this was used to delete the extra ", " that would have been produced by the first plugin we altered. As this is no longer produced it is deleting code that we no longer need it to.

Congratulations the online users will display correctly now whether you have the plugin enabled or disabled.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01131 seconds
  • Memory Usage 1,769KB
  • 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
  • (3)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