MOD Information
- Add a Comment
- Jump to Comments
- The Developer
- About Developer
- Visit Web Site
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):
Second, you need to add the classes to the appropriate HTML tags within the system. This is done by the following:
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):
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.
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;
Code:
$this->classes['tag']['newclassname'] = 1;
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;
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
Show Your Support
- This modification may not be copied, reproduced or published elsewhere without author's permission.
Bookmarks