View Single Post
  #1  
Old 12-08-2011, 12:23 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Confusing issue with the sidebar

Not sure where else to look for this, but I've managed to get the default vBulletin sidebar added to forumdisplay and showthread by using 2 plugins and some minor edits to the forumdisplay and showthread templates (no file edits now ).

Everything worked just fine when I was doing everything via file and template edits, but now that I've moved the file edits to the plugin system, I ran into a.....very odd issue lol.

If in vBulletin Options, I set Store CSS Stylesheets as Files? to No, everything looks as it should. However, if I set Store CSS Stylesheets as Files? to Yes, the sidebar goes all crazy



The contents of both plugins are pretty much the same and I'm using the hook locations forumdisplay_complete and showthread_complete...
PHP Code:
$specialtemplates = array(
    
'activeblocks'
);

$globaltemplates = array(
    
'block_blogentries',
    
'block_cmsarticles',
    
'block_newposts',
    
'block_sgdiscussions',
    
'block_tagcloud',
    
'block_threads',
    
'block_html',
    
'tag_cloud_link'
);

cache_templates($specialtemplates$style['templatelist']);
cache_templates($globaltemplates$style['templatelist']);

// ### SIDEBAR #################################################
$show['sidebar'] = false;
// disable blocks for ie6
if ($vbulletin->options['enablesidebar'] AND !(is_browser('ie') AND !is_browser('ie'7)) AND !VB_API)
{
    require_once(
DIR '/includes/class_block.php');
    
$blockmanager vB_BlockManager::create($vbulletin);
    
$sidebar $blockmanager->getSidebarHTML();
    if (
$sidebar)
    {
        
$show['sidebar'] = true;
    }

    
$show['sidebarposition'] = vB_Template_Runtime::fetchStyleVar($vbulletin->options['sidebarposition'] == 'left' 'right');
}

vB_Template::preRegister('SHOWTHREAD',array('sidebar' => $sidebar)); 
Also, the css has been added to both templates...

SHOWTHREAD
Code:
FIND:
{vb:cssfile toolsmenu.css,postlist.css,showthread.css,postbit.css,options.css,attachment.css,poll.css,lightbox.css}
REPLACE WITH:
{vb:cssfile toolsmenu.css,postlist.css,showthread.css,postbit.css,options.css,attachment.css,poll.css,lightbox.css,sidebar.css,tagcloud.css,widgets.css}

FIND:
<!--[if lt IE 8]>{vb:cssfile toolsmenu-ie.css,postlist-ie.css,showthread-ie.css,postbit-ie.css,poll-ie.css}<![endif]-->
REPLACE WITH:
<!--[if lt IE 8]>{vb:cssfile toolsmenu-ie.css,postlist-ie.css,showthread-ie.css,postbit-ie.css,poll-ie.css,sidebar-ie.css}<![endif]-->

FORUMDISPLAY
Code:
FIND:
{vb:cssfile toolsmenu.css,forumbits.css,forumdisplay.css,threadlist.css,options.css}
REPLACE WITH:
{vb:cssfile toolsmenu.css,forumbits.css,forumdisplay.css,threadlist.css,options.css,sidebar.css,tagcloud.css,widgets.css}

FIND:
{vb:cssfile toolsmenu-ie.css,forumbits-ie.css,forumdisplay-ie.css,threadlist-ie.css,options-ie.css}
REPLACE WITH:
{vb:cssfile toolsmenu-ie.css,forumbits-ie.css,forumdisplay-ie.css,threadlist-ie.css,options-ie.css,sidebar-ie.css}
So now I'm at a loss as to why when I turn on Store CSS Stylesheets as Files?, it gets thrown off. Any ideas?
Attached Images
File Type: jpg sidebar.jpg (72.4 KB, 0 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01143 seconds
  • Memory Usage 1,816KB
  • Queries Executed 12 (?)
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)bbcode_php
  • (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_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete