• Register
    • Help
    • Home
    • News
    • Forum
      • Today's Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • My Albums
        • Member List
        • Blogs
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • View Site Leaders
        • Who's Online
    • Wiki
    • Buy Now
    • Support
    • Documentation
    • Advanced Search
    • Home
    • Forum
    • VaultWiki Modifications
    • vBulletin 4.x Addons
    • [Miscellaneous Hacks] Adding Additional CSS Classes

    + Reply to Thread
    Page 1 of 2 1 2 Next LastLast
    Results 1 to 10 of 11

    Thread: Adding Additional CSS Classes

    • LinkBack
      • LinkBack URL LinkBack URL
      • About LinkBacks About LinkBacks
      •  
      • Bookmark & Share
      • Digg this Thread!
      • Add Thread to del.icio.us
      • Bookmark in Technorati
      • Stumble this Thread
      • Share on Facebook
      • Share on Myspace
      • Twit this!
    • Thread Tools
      • Show Printable Version
      • Email this Page…
      • Subscribe to this Thread…
    1. Adding Additional CSS Classes Details »

      Adding Additional CSS Classes

      MOD Information

      • Add a Comment
      • Jump to Comments
      • The Developer
      • Mokonzi's Avatar
      • About Developer
      • Visit Web Site
      Version: 1.0.1, by
      Mokonzi
      (Regular Member) Mokonzi is offline
      Developer Last Online: Jul 2010 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 3:48 AM #2
      Mokonzi's Avatar
      Mokonzi
      Mokonzi is offline Regular Member
      Join Date
      January 19, 2009
      Location
      South West Scotland
      Posts
      492
      Poster Rank: #3
      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 11:53 AM #3
      pegasus's Avatar
      pegasus
      pegasus is offline VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      4,577
      Poster Rank: #2
      Blog Entries
      6
      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 12:26 PM #4
      Mokonzi's Avatar
      Mokonzi
      Mokonzi is offline Regular Member
      Join Date
      January 19, 2009
      Location
      South West Scotland
      Posts
      492
      Poster Rank: #3
      That makes sense. Thanks peg.
      Reply With Quote Reply With Quote


    5. April 2, 2010 8:20 PM #5
      InformationNirvana's Avatar
      InformationNirvana
      InformationNirvana is offline Regular Member
      Join Date
      April 11, 2007
      Location
      Canada eh !
      Posts
      156
      Poster Rank: #9
      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 2:37 AM #6
      Mokonzi's Avatar
      Mokonzi
      Mokonzi is offline Regular Member
      Join Date
      January 19, 2009
      Location
      South West Scotland
      Posts
      492
      Poster Rank: #3
      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 5:19 PM #7
      hollosch's Avatar
      hollosch
      hollosch is offline Junior Member
      Join Date
      September 19, 2008
      Location
      Geislingen, Geermany
      Posts
      208
      Poster Rank: #7
      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 5:23 PM #8
      pegasus's Avatar
      pegasus
      pegasus is offline VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      4,577
      Poster Rank: #2
      Blog Entries
      6
      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 4:49 AM #9
      hollosch's Avatar
      hollosch
      hollosch is offline Junior Member
      Join Date
      September 19, 2008
      Location
      Geislingen, Geermany
      Posts
      208
      Poster Rank: #7
      now i understand. fast reading, bad translation in my brain ;-)
      Reply With Quote Reply With Quote


    10. April 30, 2010 2:01 AM #10
      Mokonzi's Avatar
      Mokonzi
      Mokonzi is offline Regular Member
      Join Date
      January 19, 2009
      Location
      South West Scotland
      Posts
      492
      Poster Rank: #3
      Pegasus, seems this hook is no longer available... since RC2.
      Reply With Quote Reply With Quote


    + Reply to Thread
    Page 1 of 2 1 2 Next LastLast

    LinkBacks (?)

    1. Modification System Like Here At VB.org - vBulletin.org Forum
      Refback This thread
      June 1, 2010, 5:22 PM

    Tags for this Thread

    • added
    • additional style classes
    • additional table classes
    • all
    • are
    • assign
    • available
    • because
    • but
    • called
    • ces
    • change
    • check
    • class
    • classes
    • completed
    • css
    • css classes
    • don
    • each
    • final
    • find
    • has
    • here
    • hook
    • how
    • important
    • its
    • last
    • line
    • list
    • longer
    • need
    • now
    • only
    • own
    • page
    • pegasus
    • php
    • problems
    • really
    • section
    • show
    • site
    • style classes
    • system
    • table classes
    • title
    • vaultwiki
    • was
    • where
    • wiki
    • within
    • works
    • you

    View Tag Cloud

    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
    • HTML code is Off
    • Trackbacks are On
    • Pingbacks are On
    • Refbacks are On
    • Trackbacks are On
    • Pingbacks are On
    • Refbacks are On

    Forum Rules

    • Contact Us
    • Privacy
    • Top
    All times are GMT -5. The time now is 8:37 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}}}