Thread: Chat Modifications - MGC Chatbox Evo
View Single Post
  #6329  
Old 05-21-2010, 08:59 AM
Chalex4 Chalex4 is offline
 
Join Date: Feb 2007
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBDev View Post
Might be one remaining in the template, have you check ?
Yeah, this is what I have in the display management plugin:
PHP Code:
$mgc_vbversion substr($vbulletin->options['templateversion'],0,1);

if (
$mgc_vbversion 3)
{
    global 
$MGCCbEvoCore;
    
    global 
$style;
    
    if (
THIS_SCRIPT == 'mgc_cb_evo')
    {
        
$vbcsspath 'css.php?styleid=' $vbulletin->userinfo['styleid'] . '&langid=' LANGUAGEID '&d=' $style['dateline'] . '&sheet='
        
$head .= '<link rel="stylesheet" href="' $vbcsspath 'mgc_cb_evo.css" type="text/css">';
        
$template_hook['headinclude_bottom_css'] .= $head;    
    }
}

if(
$MGCCbEvoCore->show_chatbox() && $MGCCbEvoCore->evo_permissions->can_view()) 
{
    
$mgc_cb_evo_display            0;
    
$mgc_cb_evo_type_position    "";
    
    switch(
THIS_SCRIPT)
    {
        case 
'index':                     
            
// Manage number of users online
            
if ($vbulletin->options['mgc_cb_evo_whoisonline_active'] && $vbulletin->options['mgc_cb_evo_show_number_of_users_inchat_forumhome'])
            {
                
// Inactive mode active and delay < session delay => inactive mode delay taken
                
if ($vbulletin->options['mgc_cb_evo_inactive_mode'] && $vbulletin->options['mgc_cb_evo_inactive_mode_delay'] < $vbulletin->options['mgc_cb_evo_whoisonline_delay']) 
                {
                    
$dateline TIMENOW - ($vbulletin->options['mgc_cb_evo_inactive_mode_delay'] * 60);
                }
                else
                {
                    
$dateline TIMENOW - ($vbulletin->options['mgc_cb_evo_whoisonline_delay'] * 60);
                }
        
                
$getusers $vbulletin->db->query_read("
                    SELECT DISTINCT u.username,u.displaygroupid,u.userid,s.userid AS suserid,u.usergroupid,(u.options & " 
$vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible
                    FROM " 
TABLE_PREFIX "mgc_cb_evo_session AS cbs
                    LEFT JOIN " 
TABLE_PREFIX "user AS u ON (cbs.userid=u.userid)
                    LEFT JOIN " 
TABLE_PREFIX "session AS s ON (cbs.userid=s.userid)
                    WHERE cbs.dateline>='
$dateline' AND cbs.userid!=0
                "
);
        
                
$mgc_cb_evo_users_online 0;
                
                if (
$vbulletin->db->num_rows($getusers))
                {
                    
$first 1;
                    while (
$user $vbulletin->db->fetch_array($getusers))
                    {
                        if (
$user['invisible'])
                        {
                            if (
$MGCCbEvoCore->evo_permissions->can_see_hidden_users() OR $user['userid'] == $vbulletin->userinfo['userid'])
                            {
                                if (
$user['suserid'])
                                {
                                    
$mgc_cb_evo_users_online++;
                                }
                            }
                        }
                        else
                        {
                            if (
$user['suserid'])
                            {
                                
$mgc_cb_evo_users_online++;
                            }
                        }
                    }
                }
                
                
$mgc_cb_evo_users_in_chat construct_phrase($vbphrase['mgc_cb_evo_x_users_in_chat'],$mgc_cb_evo_users_online);
                
                
$template_hook['forumhome_wgo_stats'] .= $mgc_cb_evo_users_in_chat;
            }        
                
            
// Manage stats display
            
if ($vbulletin->options['mgc_cb_evo_forumhome_stats'])
            {
                require_once(
DIR '/mgc_cb_evo/classes/class_misc.php');        
                
$MGCCbEvoMisc = new MGCCbEvo_misc($vbulletin);
                
$mgc_cb_evo_stats $MGCCbEvoMisc->construct_forumhome_stats();                        
                
$template_hook['forumhome_wgo_stats'] .= $mgc_cb_evo_stats;
            }        
        
            
// Manage display of the chatbox on forumhome
            
if ($vbulletin->options['mgc_cb_evo_forumhome']) 
            {
                
$mgc_cb_evo_display 1;
                if(
$vbulletin->options['mgc_cb_evo_forumhome'] == 1)
                {
                    
$mgc_cb_evo_type_position    "forumhome_above";
                    
$mgc_cb_evo_insert_type        'append';
                    
$mgc_cb_evo_insert_template    'navbar'
                    
$mgc_cb_evo_brb                ' '
                    
$mgc_cb_evo_bra                ' '
                } 
                else 
                {
                    
$mgc_cb_evo_type_position    "forumhome_below";
                    
$mgc_cb_evo_insert_type     'replace';
                    
$mgc_cb_evo_insert_template 'FORUMHOME'
                    
$mgc_cb_evo_replace         ' $mgc_cb_evo ';
                    
$mgc_cb_evo_find             '$forumhome_markread_script';
                    
$mgc_cb_evo_brb             ' '
                    
$mgc_cb_evo_bra             ' '
                }
            } 
        break;
        case 
'forumdisplay':
            
// Strip filtered forumids var 
            
if (!empty($vbulletin->options['mgc_cb_evo_forumdisplay_ids']))
            {
                
$forumids explode(',',$vbulletin->options['mgc_cb_evo_forumdisplay_ids']);
            }
            
                
// Manage display
            
if ($vbulletin->options['mgc_cb_evo_forumdisplay'] && (!isset($forumids) || in_array($foruminfo['forumid'],$forumids)))
            {
                
$mgc_cb_evo_display 1;
                if(
$vbulletin->options['mgc_cb_evo_forumdisplay'] == 1)
                {
                    
$mgc_cb_evo_type_position    "forumdisplay_above";
                    
$mgc_cb_evo_insert_type        'append';
                    
$mgc_cb_evo_insert_template 'navbar'
                    
$mgc_cb_evo_brb             ' '
                    
$mgc_cb_evo_bra             ' '
                } 
                else 
                {
                    
$mgc_cb_evo_type_position    "forumdisplay_below";
                    
$mgc_cb_evo_insert_type     'replace';
                    
$mgc_cb_evo_insert_template 'FORUMDISPLAY'
                    
$mgc_cb_evo_replace         ' $mgc_cb_evo ';
                    
$mgc_cb_evo_find             '$forumhome_markread_script';
                    
$mgc_cb_evo_brb             ''
                    
$mgc_cb_evo_bra             ' '
                }
            } 
        break;
        case 
'showthread':
            
// Strip the thread id to exclude
            
if (!empty($vbulletin->options['mgc_cb_evo_showthread_ids']))
            {
                
$forumids explode(',',$vbulletin->options['mgc_cb_evo_showthread_ids']);
            }
            
// Manage display
            
if ($vbulletin->options['mgc_cb_evo_showthread'] && (!isset($forumids) || in_array($threadinfo['forumid'],$forumids))) 
            {
                
$mgc_cb_evo_display 1;
                if(
$vbulletin->options['mgc_cb_evo_showthread'] == 1)
                {
                    
$mgc_cb_evo_type_position "showthread_above";
                    
$mgc_cb_evo_insert_type        'append';
                    
$mgc_cb_evo_insert_template 'navbar'
                    
$mgc_cb_evo_brb             ' '
                    
$mgc_cb_evo_bra             ' '
                } 
                else 
                {
                    
$mgc_cb_evo_type_position    "showthread_below";
                    
$mgc_cb_evo_insert_type     'replace';
                    
$mgc_cb_evo_insert_template 'SHOWTHREAD'
                    
$mgc_cb_evo_replace         ' $mgc_cb_evo ';
                    
$mgc_cb_evo_find             '$similarthreads';
                    
$mgc_cb_evo_brb             ' '
                    
$mgc_cb_evo_bra             ' '
                }
            } 
        break;
        case 
'mgc_cb_evo':                    
        break;
        default:
            
// Display on all pages except forumdisplay, forumhome, showthread and chatbox
            
if (($vbulletin->options['mgc_cb_evo_display_on_allpages'] || $vbulletin->options['mgc_cb_evo_store_invar_allpages']) )
            {
                
// Exclude pages list
                
if (!empty($vbulletin->options['mgc_cb_evo_pages_exclude_list']))
                {
                    
$exclude_pageslists_array explode(',',$vbulletin->options['mgc_cb_evo_pages_exclude_list']);
                }
                else
                {
                    
$exclude_pageslists_array = array();
                }
                
                
// List of pages specified
                
if (!empty($vbulletin->options['mgc_cb_evo_allpages_list']))
                {
                    
$pageslists_array explode(","$vbulletin->options['mgc_cb_evo_allpages_list']);
        
                    foreach (
$pageslists_array as $index => $script)
                    {
                        if ( (
THIS_SCRIPT == $script) && (!in_array(THIS_SCRIPT,$exclude_pageslists_array)))
                        {
                            
$mgc_cb_evo_display 1;
                         }
                    }
                }
                else
                {
                    if (!
in_array(THIS_SCRIPT,$exclude_pageslists_array))
                    {
                        
$mgc_cb_evo_display 1;
                    }
                }
        
                if (
$mgc_cb_evo_display)
                {
                    if (
$vbulletin->options['mgc_cb_evo_display_on_allpages'])
                    {
                        
$mgc_cb_evo_type_position    "navbar_below";
                        
$mgc_cb_evo_insert_type        'append';
                        
$mgc_cb_evo_insert_template 'navbar';
                        
$mgc_cb_evo_brb             ' '
                        
$mgc_cb_evo_bra             ' '
                    }
                    else
                    {
                        
$mgc_cb_evo_type_position    "var";
                        
$mgc_cb_evo_insert_type        'var';        
                    }
                }
            }        
        break;            
    }
    
    if (
$mgc_cb_evo_display)
    {
        
// Construct chatbox display
        
require_once(DIR '/mgc_cb_evo/classes/class_display.php');
        
$MGCCbEvoDisplay = new MGCCbEvo_display($vbulletin,$MGCCbEvoCore);
        
        
// Headinclude
        
$head '';
        if (
$vbulletin->options['mgc_cb_evo_js_load_locally'])
        {
            
$head .= '<link rel="stylesheet" href="http://yui.yahooapis.com/combo?2.7.0/build/container/assets/skins/sam/container.css&2.7.0/build/button/assets/skins/sam/button.css">';
        }
        else
        {
            
$head .= '<link rel="stylesheet" href="mgc_cb_evo/clientscript/yui/container/assets/skins/sam/container.css" type="text/css">';
            
$head .= '<link rel="stylesheet" href="mgc_cb_evo/clientscript/yui/button/assets/skins/sam/button.css" type="text/css">';
        }
        
$head .= '<link rel="stylesheet" href="mgc_cb_evo/clientscript/widget-skin.css" type="text/css">';
        
$head .= '<link rel="stylesheet" href="mgc_cb_evo/clientscript/chatbox_tabs.css" type="text/css">';
        
        if (
$mgc_vbversion 4)
        {
            
$vbulletin->templatecache['headinclude'] .= addslashes($head);
        }
        else
        {
            global 
$style;
            
$vbcsspath 'css.php?styleid=' $vbulletin->userinfo['styleid'] . '&amp;langid=' LANGUAGEID '&amp;d=' $style['dateline'] . '&amp;sheet='
            
$head .= '<link rel="stylesheet" href="' $vbcsspath 'mgc_cb_evo.css" type="text/css">';
            
$template_hook['headinclude_bottom_css'] .= $head;
        }
        
        
// Display construction
        
$mgc_cb_evo $MGCCbEvoDisplay->construct_display($vbulletin->options['mgc_cb_evo_normalmode_height']);            
                
        
// Placement
        
if ($mgc_vbversion 4)
        {
            switch(
$mgc_cb_evo_insert_type)
            {
                case 
'append':
                    
$mgc_cb_evo str_replace('"','\"',$mgc_cb_evo);
                    
$vbulletin->templatecache["$mgc_cb_evo_insert_template"] .= $mgc_cb_evo_brb $mgc_cb_evo $mgc_cb_evo_bra;
                break;
                case 
'replace':
                    
$vbulletin->templatecache["$mgc_cb_evo_insert_template"] = str_replace($mgc_cb_evo_find,$mgc_cb_evo_find $mgc_cb_evo_brb addslashes($mgc_cb_evo_replace) . $mgc_cb_evo_bra,$vbulletin->templatecache["$mgc_cb_evo_insert_template"]); 
                break;
                case 
'var':
                    
$mgc_cb_evo_var $mgc_cb_evo;
                break;
            }            
        }
        else
        {
            switch (
$mgc_cb_evo_type_position)
            {
                case 
"forumhome_above":
                    
$template_hook['forumhome_above_forums'] .= $mgc_cb_evo;
                    break;
                case 
"forumhome_below":
                    
$template_hook['forumhome_below_forums'] .= $mgc_cb_evo;
                    break;
                case 
"forumdisplay_above":
                    
$template_hook['forumdisplay_above_threadlist'] .= $mgc_cb_evo;
                    break;
                case 
"forumdisplay_below":
                    
$template_hook['forumdisplay_below_threadlist'] .= $mgc_cb_evo;
                    break;
                case 
"showthread_above":
                    
$template_hook['showthread_above_posts'] .= $mgc_cb_evo;
                    break;
                case 
"showthread_below":
                    
$template_hook['showthread_after_activeusers'] .= $mgc_cb_evo;
                    break;
                case 
"navbar_below":
                    
// do nothing, will be processed in the next hook
                    
break;
                case 
"var":
                    if (!empty(
$vbulletin->options['mgc_cb_evo_templates_list']))
                    {
                        
$mgc_cb_evo_templates explode(',',$vbulletin->options['mgc_cb_evo_templates_list']);
                        
$mgc_cb_evo_var_array['mgc_cb_evo_var'] = $mgc_cb_evo;
                        foreach (
$mgc_cb_evo_templates AS $nom)
                        {
                            
vB_Template::preRegister($nom$mgc_cb_evo_var_array); 
                        }
                    }
                    break;                
            }
        }        
        
        
// Manage the sidebar creation if any (vB3 only)
        
if ($mgc_vbversion 4)
        {
            if (
$vbulletin->options['mgc_cb_evo_notifications_display'] == || $vbulletin->options['mgc_cb_evo_notifications_display'] == 4)
            {
                if (
$vbulletin->options['mgc_cb_evo_notifications_display'] == 3)    
                {    
                    
$mgc_cb_evo_sidebar_align 'left';
                    
$vbulletin->templatecache['header'] .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td valign=\"top\" style=\"padding-right: 15px\" width=\"' $vbulletin->options['mgc_cb_evo_notif_sidebar_width'] . '\">' fetch_template('mgc_cb_evo_notifs_sidebar') . '</td><td valign=\"top\">';
                    
$vbulletin->templatecache['footer'] = '</td></tr></table>' .  $vbulletin->templatecache['footer'];
                }
                else
                {
                    
$mgc_cb_evo_sidebar_align 'right';
                    
$vbulletin->templatecache['header'] .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td valign=\"top\">';
                    
$vbulletin->templatecache['footer'] = '</td><td valign=\"top\" style=\"padding-left: 15px\" width=\"' $vbulletin->options['mgc_cb_evo_notif_sidebar_width'] . '\">' fetch_template('mgc_cb_evo_notifs_sidebar') . '</td></tr></table>' .  $vbulletin->templatecache['footer'];
                }
            }
        }
    }

and it's still not aligned!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01717 seconds
  • Memory Usage 2,076KB
  • 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
  • (1)bbcode_php
  • (1)bbcode_quote
  • (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