vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Confusing issue with the sidebar (https://vborg.vbsupport.ru/showthread.php?t=275194)

HMBeaty 12-08-2011 12:23 AM

Confusing issue with the sidebar
 
1 Attachment(s)
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 :D).

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 :confused:

https://vborg.vbsupport.ru/attachmen...1&d=1323306959

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? :confused:

kh99 12-08-2011 02:26 AM

Have you checked for css files not loading or having errors? I usually use the error console in Firefox (although it's been so long I can't remember if it's an add-on or a standard feature).

Max Taxable 12-08-2011 02:28 AM

I just checked it and it all looks fine, did you fix this issue already?

HMBeaty 12-08-2011 02:48 AM

Quote:

Originally Posted by Max Taxable (Post 2275762)
I just checked it and it all looks fine, did you fix this issue already?

No. I set Store CSS Stylesheets as Files? back to No

--------------- Added [DATE]1323316588[/DATE] at [TIME]1323316588[/TIME] ---------------

I set it back to No if anyone wants to take a look again

--------------- Added [DATE]1323317209[/DATE] at [TIME]1323317209[/TIME] ---------------

Hmm, I think I found the issue :p. Looking at the templates again....

FORUMDISPLAY
HTML Code:

    <vb:if condition="$vboptions['storecssasfile']">
        {vb:cssfile forumdisplay-rollup.css}
    <vb:else />
        {vb:cssfile toolsmenu.css,forumbits.css,forumdisplay.css,threadlist.css,options.css,sidebar.css,tagcloud.css,widgets.css}
    </vb:if>

SHOWTHREAD
HTML Code:

    <vb:if condition="$vboptions['storecssasfile']">
        {vb:cssfile showthread-rollup.css}
    <vb:else />
        {vb:cssfile toolsmenu.css,postlist.css,showthread.css,postbit.css,options.css,attachment.css,poll.css,lightbox.css,sidebar.css,tagcloud.css,widgets.css}
    </vb:if>

When I change
HTML Code:

{vb:cssfile forumdisplay-rollup.css}
To
HTML Code:

{vb:cssfile forumdisplay-rollup.css,sidebar.css,tagcloud.css,widgets.css}
And change
HTML Code:

{vb:cssfile showthread-rollup.css}
To
HTML Code:

{vb:cssfile showthread-rollup.css,sidebar.css,tagcloud.css,widgets.css}
It works again. Which still has me confused because I thought xxxxxxx-rollup.css already included all that other stuff :confused:


All times are GMT. The time now is 04:46 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01075 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete