• Register
    • Help
    • Home
    • News
    • Forum
    • Wiki
    • Buy Now
    • Support
      • My Reports
      • Manage Subscriptions
      • Timeline
    • Documentation
    • Advanced Search
    • Home
    • Support
    • Bug
    • VaultWiki CSS and js files are included in every forum page

    VaultWiki CSS and js files are included in every forum page
    • Issue Tools
      • Subscribe to this issue
      • View Changes

    issueid=1260 March 11, 2010 5:45 AM

    kmike kmike is offline
    Junior Member
    VaultWiki CSS and js files are included in every forum page
    On each forum page outside of the Wiki forums (even on non-forum-content pages such as misc.php), I see two CSS files are included which are related to VaultWiki:
    special-2664521c-00011.css?v=257
    special_important.css?v=257

    Two Javascript files are included, too:
    special_section.js?v=257
    special_autolink.js?v=257

    It would be great if VaultWiki didn't inject its CSS and Javascript into unrelated forum pages. Because of this, each forum page requires 4 additional HTTP requests before it could be displayed. It's a big no-no according to the best practices for making a fast web site.

    Issue Details

    Issue Type Bug
    Project VaultWiki
    Category Styling / CSS
    Status Not a Bug
    Priority 3
    Affected Version 2.5.7
    Fixed Version (none)
    Milestone VaultWiki 3.0.0
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0

    Page 1 of 2 1 2 Next LastLast

    March 11, 2010 10:07 AM

    pegasus pegasus is offline
    VaultWiki Team
     
    AFAIK, this is done by design, because those files contain the formatting for wiki BB-Codes which can be used in forum content (and are listed on misc.php). For vBulletin 4, the number and size of the requests were reduced, and this is something we're working on improving further in RC 2 or 3.
    Reply with Quote

    March 11, 2010 10:44 AM

    kmike kmike is offline
    Junior Member
     
    Are Javascript files required for styling, too?

    If we disable the usage of Wiki bbcodes outside of the Wiki forums, could injecting of the VaultWiki styles be disabled?
    Reply with Quote

    March 11, 2010 11:30 AM

    pegasus pegasus is offline
    VaultWiki Team
     
    The Javascript files are required for the functionality of the H tag and wiki link AJAX popups.
    There is currently no way to disable usage of wiki BB-Codes outside of wiki forums.

    Any of these files should only be included if the BB-Code parser was initialized on a page. Again, reducing the footprint of these items is going to be addressed in an upcoming RC build.
    Reply with Quote

    March 11, 2010 11:43 AM

    kmike kmike is offline
    Junior Member
     
    I got an impression that the styles footprint will only be reduced in vB 4?
    Reply with Quote

    March 11, 2010 11:54 AM

    pegasus pegasus is offline
    VaultWiki Team
     
    The style footprint is already slightly reduced in vB 4, because it allowed handling CSS in a more focused way (e.g. combined HTTP requests, CSS-rollup, loading CSS templates individually). Selective CSS inclusion is already done in vB 3 to an extent, but it is only possible when the CSS is NOT saved as a file.

    While some improvements simply aren't possible in vB 3, we are planning a rewrite of the CSS for both vB 3 and vB 4 to improve client-side performance across the board.
    Reply with Quote

    March 11, 2010 12:48 PM

    kmike kmike is offline
    Junior Member
     
    Ok, disabling AJAX preview popup gets rid of special_autolink.js.
    Since we don't need VaultWiki codes in the main forums (except [wiki] itself), I think I'll remove them from the bbcode list and see about removing those stylesheets from the rest of the forums.
    Reply with Quote

    March 11, 2010 2:59 PM

    pegasus pegasus is offline
    VaultWiki Team
     
    Don't delete the Custom BB-Code entry, as this will cause problems in other places. You should just set $show['special_css'] = false; before global_complete.
    Reply with Quote

    March 11, 2010 3:23 PM

    kmike kmike is offline
    Junior Member
     
    I just used the Code Manager to disable displaying all VaultWiki codes in the non-wiki areas, including the bbcode list ("Show BB-Code in the vBulletin FAQ"). That should stop 99% of the members from using them in the forums. Even if some bbcode sneaks in, only [H] and AJAX preview (which could be disabled) will be unstyled once all custom VaultWiki styles are gone from the rest of the forums. I can live with that.

    To make VaultWiki related styles to load only in showwiki.php, I did this small change:

    Code:
    VaultWiki code is only viewable by license holders.
    
    Reply with Quote

    March 11, 2010 3:36 PM

    pegasus pegasus is offline
    VaultWiki Team
     
    That change will remove it from the cached template list, which will mean that it will use resources to query the database for them instead. Like I said above, you just want to set $show['special_css'] = false - recommend finding it in vault/special_plugins_bbcode.php.
    Reply with Quote

    March 12, 2010 12:09 AM

    kmike kmike is offline
    Junior Member
     
    Thanks for the quick and informative replies and support, much appreciated!

    I can see the merits of your approach, however I think you are mistaken about my solution. Nowhere else these two templates responsible for the inclusion of VaultWiki CSS and JS (vault_general_headinclude and vault_general_footer) are added to the retrieved template list, so they won't be fetched again from the database if disabled in that place.
    Reply with Quote

    + Reply to Issue
    Page 1 of 2 1 2 Next LastLast
    • Contact Us
    • Privacy
    • Top
    All times are GMT -5. The time now is 8:23 PM.

  • Powered by vBulletin™ Version 4.0.5
    Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.
    Copyright © 2008 - 2010 VaultWiki Team, Cracked Egg Studios, LLC.
    Search Engine Optimization by vBSEO 3.5.1

    {{{Inactive}}}