Thread: Add-On Releases - Everywhere Sidebar 4 VB4
View Single Post
  #991  
Old 05-14-2011, 04:15 PM
Calystos's Avatar
Calystos Calystos is offline
 
Join Date: Apr 2009
Location: Terra
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I managed to find the info I was after in ref to force-setting the sidebar to collapsed mode by default over at vbulletin.com forums.

However, there is a problem in that with ESB enabled it ignores the script. Mind you I've only just installed the script (which works great incase anyone else was after something like this), and am about to head out so can't debug it til I get home later tonight. But when I get time I'll have a look into it and see about adding the code to work with ESB, and unless someone beats me to it I'll post the mod here incase anyone wants it,

1 problem solved, an another bug pops up, lawl. Typical, hehehe.

EDIT: K, quickly had time to fiddle an figured it instantly out. In order to have the sidebar defaulted to collapsed using ESB you have to either edit the product xml file and import that, or you have to edit the sidebarext_temp template. Either way its the same code to add above both lines that are ref'd via "sidebar.js".

Okay to default it to collapsed simply search for the TWO lines (both are identical so just repeat the find):
Code:
        <script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-sidebar.js?v={vb:raw vboptions.simpleversion}"></script>
And above both add:
Code:
        <script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-sidebar-closed.js?v={vb:raw vboptions.simpleversion}"></script>
And of course upload the attached javascript file to the clientscript directory.

Thats it. Course we can go further and make it a full option easy enough I guess.
Oh and to make it easier I've quickly modded the 1.4.3 ESB with the above code for anyone who doesn't wanna fiddle with the templates, hehe. Hope it helps,

However I have found a bug in ESB, not sure why it happens and haven't fully tested/checked how many other areas it effects. But on some styles, when ESB is enabled, and you go to the forum home (forum.php) area. Some images get blanked or something. As I said though I've only just noticed this and haven't got the time to debug atm. But thought it best to bring it to attention.

EDIT: Quickly added a before/after image so you can see what I mean about the transparency or hiding bug. ESB_Disabled is of course what it looks like when the product isn't running. And as you'll see when its enabled for some reason the background image for those areas vanishes. Anyways, better rush else will be late, lawl. Will look further into the code when I get home later.
Attached Images
File Type: png ESB_Disabled.png (26.4 KB, 0 views)
File Type: png ESB_Enabled.png (37.8 KB, 0 views)
Attached Files
File Type: zip vbulletin-sidebar-closed.zip (1.2 KB, 4 views)
File Type: xml product-everywhere_sidebar_1.4.3.xml (78.7 KB, 4 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01409 seconds
  • Memory Usage 1,803KB
  • 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)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
  • (4)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