[HOW TO - vB4] Stylebridge vB3.8 -> vB 4.0
by
22 Jan 2010
Rating: (1 vote
- 5.00 average)
This article is for all coders, who want's a quick port of the mods into vB4. What does this means ? You can use you vB 3.8 templates in a vB 4.0 include the stylevars. You need to change ALL the conditions and ALL vars. This bridge is only for the style ! What must I do before starting ? You need to create 2 new templates. I call 'em stylebridge.css and stylebridge_headinclude. You can do this simply by importing the attached product (it will only create those two new templates).
Somewhere in you mod, you will find this line PHP Code:
require ("./global.php");
Simply add below: PHP Code:
$alt1_color = $alt2_color = substr (vB_Template_Runtime::fetchStyleVar('body_color'), 0, 7);
If you are using class="page" inside a template, you should change it to: class="body_wrapper". Also, there are two border classes: One for tcat and the other for thead. Here comes an example: Code:
<table class="tborder" cellpadding="{vb:raw padding}" cellspacing="{vb:math {vb:raw padding}/2}" border="0"> <tr> <td class="tcat">enter your text here</td> </tr> </table> <table class="tborder2" cellpadding="{vb:raw padding}" cellspacing="{vb:math {vb:raw padding}/2}" border="0"> <tr> <td class="thead">enter your text here</td> </tr> </table> Remember that this won't work for ALL mods. This could be while:
If you have any excitations, please let me know. It would also be greatfully, if you gave me feedback how it works. Regards Coroner EDIT: Fixed the Style when the CSS is stored as files |