• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Forum
    • VaultWiki Modifications
    • vBulletin 4.x Addons
    • [Miscellaneous Hacks] Adding Additional CSS Classes

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    2. Notes About Third-Party Modifications

      The product modifications posted in this forum were created by end-users like yourself, who have shared them for the benefit of their peers. However, these modifications have not been reviewed by VaultWiki staff, are not endorsed by the VaultWiki Team or Cracked Egg Studios LLC, and our staff does not provide support services for such modifications. Unless otherwise stated in a third-party agreement, please use third-party modifications at your own risk.

    Results 1 to 12 of 12

    Thread: Adding Additional CSS Classes

    • Thread Tools
      • Show Printable Version
    1. Adding Additional CSS Classes Details »

      Adding Additional CSS Classes

      MOD Information

      • Add a Comment
      • Jump to Comments
      • The Developer
      • About Developer
      • Visit Web Site
      Version: 1.0.1, by
      Mokonzi
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      (Senior Member) Mokonzi is offline
      Developer Last Online: Nov 2017 Show Printable Version Email this Page

      Category: [Miscellaneous Hacks] Version: 3.0.x Rating: 
      Released: March 13, 2010 Last Update: May 1, 2010 Installs: 1
      Supported Uses Plugins
      Re-useable Code Translations  

      To add additional classes for use within the VaultWiki table system requires adding a simple plugin, detailing the list of classes. Here's how to do it.

      Login to the AdminCP, and navigate to Plugins & Products > Add New Plugin.

      On the new page that appears, select the following options:
      Product: vBulletin (default option)
      Hook Location: vault_bbcode_cleaner (VaultWiki)
      Title: (This you can choose, but I used the following) BBCode Table - Additional Classes
      Execution Order: This can be left at 5

      Then you get to the Plugin PHP Code section.

      First you need to add all the classes you want with the following code (repeated on a new line for each class, changing newclassname to your class):
      Code:
      $this->standard['classes']['newclassname'] = 1;
      Second, you need to add the classes to the appropriate HTML tags within the system. This is done by the following:
      Code:
      $this->classes['tag']['newclassname'] = 1;
      In this section, you change the tag to be either, table, tr or td (for the <table>, <tr>, <td> HTML tags), and the newclassname to the appropriate class. This second section is important to get right, as if you have a class called myclass, and only assign it to the td tags, you won't be able to use it with the <tr> or <table> options within the VaultWiki system. If you find any classes don't show initially, chances are this is where the problem is.

      A completed option might look like this (I've used this code for adding an additional alt3 class to the <td> tags):
      Code:
      $this->standard['classes']['alt3'] = 1;
      $this->standard['classes']['alt3top'] = 1;
      $this->standard['classes']['alt3Active'] = 1;
      
      $this->classes['td']['alt3'] = 1;
      $this->classes['td']['alt3top'] = 1;
      $this->classes['td']['alt3Active'] = 1;
      The final step is to make sure the plugin is active by selecting Yes in the option Plugin is Active, the last option on the New Plugin page.

      Once done, save your plugin, and check it works.

      This plugin can have as many classes added as you need, so you don't need to add a new one for every set of classes you want to add.

      Many thanks to pegasus who again helped with this information, and was so helpful as to actually get this working on my site when I had some initial problems.

      Supporters / CoAuthors

      • pegasus

      Show Your Support

      • This modification may not be copied, reproduced or published elsewhere without author's permission.

    2. March 14, 2010 #2
      Mokonzi
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      Mokonzi is offline
      Senior Member
      Join Date
      January 19, 2009
      Location
      South West Scotland
      Posts
      158
      Rep Power
      198
      Discovered today that when updating the VaultWiki install, this gets removed and has to be readded.
      Reply With Quote Reply With Quote

    3. March 14, 2010 #3
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,934
      Blog Entries
      18
      Rep Power
      659
      Yes, you don't want to select "VaultWiki" as the product, because it will be overwritten during upgrades -- unless you're using this in your own mod, simply leave it blank for "vBulletin".
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    4. March 14, 2010 #4
      Mokonzi
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      Mokonzi is offline
      Senior Member
      Join Date
      January 19, 2009
      Location
      South West Scotland
      Posts
      158
      Rep Power
      198
      That makes sense. Thanks peg.
      Reply With Quote Reply With Quote

    5. April 2, 2010 #5
      InformationNirvana
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      InformationNirvana is offline
      Regular Member
      Join Date
      April 11, 2007
      Location
      Canada eh !
      Posts
      130
      Rep Power
      566
      Cool Mod and way Cool vBulletin 4.x Addons area ! Feels like I am at vBulletin.org !
      Reply With Quote Reply With Quote

    6. April 3, 2010 #6
      Mokonzi
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      Mokonzi is offline
      Senior Member
      Join Date
      January 19, 2009
      Location
      South West Scotland
      Posts
      158
      Rep Power
      198
      I like it, and all the thanks goes to Pegasus on this one... as with all of the great ideas there are here...
      Reply With Quote Reply With Quote

    7. April 12, 2010 #7
      hollosch
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      hollosch is offline
      Senior Member
      Join Date
      September 19, 2008
      Location
      Geislingen, Germany
      Posts
      241
      Rep Power
      211
      Can you explain, what we can do with this plugin exactly ??? Maybe with screenshot ?
      Thanks
      Reply With Quote Reply With Quote

    8. April 12, 2010 #8
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,934
      Blog Entries
      18
      Rep Power
      659
      A screenshot doesn't really help. These are instructions for adding CSS classes to the whitelist so users can apply them to the TABLE BB-Code.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    9. April 13, 2010 #9
      hollosch
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      hollosch is offline
      Senior Member
      Join Date
      September 19, 2008
      Location
      Geislingen, Germany
      Posts
      241
      Rep Power
      211
      now i understand. fast reading, bad translation in my brain ;-)
      Reply With Quote Reply With Quote

    10. April 30, 2010 #10
      Mokonzi
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      Mokonzi is offline
      Senior Member
      Join Date
      January 19, 2009
      Location
      South West Scotland
      Posts
      158
      Rep Power
      198
      Pegasus, seems this hook is no longer available... since RC2.
      Reply With Quote Reply With Quote

    11. May 1, 2010 #11
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,934
      Blog Entries
      18
      Rep Power
      659
      The hook was moved to a separate cleaner class, so its name was changed. It's now vault_bbcode_cleaner.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    12. December 13, 2015 #12
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,934
      Blog Entries
      18
      Rep Power
      659
      If you are using VaultWiki 4.0.8 (available later this week), it is no longer necessary to write a separate plugin to accomplish this. Instead, edit the TABLE BB-Code in vBulletin's Custom BB-Codes manager. There is a new setting on this form for white-listed classes.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    Similar Threads

    1. classes in divs dont work?
      By Lord Doys in forum VaultWiki Questions
      Replies: 1
      Last Post: October 17, 2011, 4:03 AM
    2. Adding pages to a category
      By Jella in forum VaultWiki Questions
      Replies: 2
      Last Post: June 14, 2010, 5:17 PM
    3. Adding images without the extension
      By bigtree in forum General Discussion
      Replies: 1
      Last Post: May 29, 2010, 8:59 PM
    4. Adding wiki in a thread
      By ed146 in forum Pre-Sales Questions
      Replies: 4
      Last Post: June 18, 2009, 11:17 AM
    5. Wiki adding item to header?
      By dwessell in forum VaultWiki Questions
      Replies: 7
      Last Post: September 4, 2008, 9:29 AM

    Tags for this Thread

    able, added, additional style classes, additional table classes, admincp, all, any, appears, are, assign, available, because, but, called, ces, change, check, class, classes, completed, css, css classes, don, each, final, find, get, gets, has, here, hook, how, important, its, last, left, line, list, longer, many, need, now, only, own, page, pegasus, php, problems, really, right, section, shot, show, site, style classes, sure, system, table classes, that, them, title, vaultwiki, was, way, where, wiki, within, works, you

    View Tag Cloud

    Bookmarks

    Bookmarks
    • Submit to Digg Digg
    • Submit to del.icio.us del.icio.us
    • Submit to StumbleUpon StumbleUpon
    • Submit to Google Google

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  
    • BB code is On
    • Smilies are On
    • [IMG] code is Off
    • [VIDEO] code is
    • HTML code is Off

    Forum Rules

    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 3:13 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.