I start for about 25 years with an TI and learned Basic. Next was an Commodere 64, Amiga. On Amiga I learned Assembler and wrote some Games. Many years later again, I learned myself (without book ...) php,html and javascript. Then I wrote some small
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).
stylebridge.css
this templates contais the new style for the templates (tcat, thead, alt1, alt2 ....)
stylebridge_headinclude
this is the original vB4 headinclude templates withoutreset-fonts.css and vbulletin.css and some other .css.
How to modify my mod (PHP) ?
Somewhere in you mod, you will find this line
PHP Code:
require ("./global.php");
The trick is now, to change the "headinclude".
Simply add below:
some Differencec/changes
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>
Footnote:
Remember that this won't work for ALL mods.
This could be while:
you're mod doesn't use "global.php"
you are using vb3 and vb4 styles at the same time
... anything else
I've tested it with only one of my mods on a vB4 containing 4 different styles.
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
This has helped me out a lot.
I'm having 2 problems, maybe you've run into it?
My tables don't have a inner border anymore. All the rows look like one cell now. Also, if I have say 4 columns, if I use thead, the first column uses as much space as possible even though it's only set to width of 5% and the other 3 are squished.
Any ideas?
EDIT:
I figured out part of the problem.
$alt1_background and $alt2_background aren't registered in the example so I wasn't getting the background colors. For the width I just set the class in the TR instead of TD. Now I just need to figure out what is making my logo image have a border
this worked great for switching a 3,8 to 4.0.2 but the only problem i had is that it made the stuff on my forum home page bigger...
any ideas on what i can do to shrink in half...
No, this article is geared towards developers. It doesn't help end users much trying to get a vb3 mod working on vb4. There is still work that needs to be done to get a mod to work. This just saves a ton of template recoding.