Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
[HOW TO - vB4] Stylebridge vB3.8 -> vB 4.0
Coroner
Join Date: Feb 2008
Posts: 797

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

Germany
by Coroner Coroner is offline 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).
  • stylebridge.css
    this templates contais the new style for the templates (tcat, thead, alt1, alt2 ....)
  • stylebridge_headinclude
    this is the original vB4 headinclude templates without reset-fonts.css and vbulletin.css and some other .css.
How to modify my mod (PHP) ?
Somewhere in you mod, you will find this line

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The trick is now, to change the "headinclude".
Simply add below:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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
Attached Files
File Type: xml stylebridge.xml (34.6 KB, 64 views)

Last edited by Coroner; 21 Feb 2010 at 17:48..
Views: 7890
Reply With Quote
Comments
  #2  
Old 23 Jan 2010, 07:36
Coroner Coroner is offline
 
Join Date: Feb 2008
Real name: Stefan
Another hint to get a great vb4 look is:
in the template stylebridge.css under:
.tborder, .tborder2, .tcat,. thead

add this:
moz-box-shadow: -2px 2px 2px {vb:stylevar forumbits_shadow_color};
-webkit-box-shadow: -2px 2px 2px {vb:stylevar forumbits_shadow_color};
-moz-border-radius-top{vb:stylevar right}: {vb:stylevar border_radius};
-moz-border-radius-top{vb:stylevar left}: {vb:stylevar border_radius};
-webkit-border-top-{vb:stylevar right}-radius: {vb:stylevar border_radius};
-webkit-border-top-{vb:stylevar left}-radius: {vb:stylevar border_radius};
and in a table set cellspacing to zero - like:
cellspacing="0"
See image what you get.
Attached Images
File Type: png Bild 1.png (22.6 KB, 242 views)
Reply With Quote
  #3  
Old 23 Jan 2010, 10:56
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Real name: allan
It's great !!
Thank you
__________________
-------------------------------------------------------------------------------------------
Administrator vBulletin-Ressources.com, French vBulletin Resources.
Reply With Quote
  #4  
Old 23 Jan 2010, 17:27
MARCO1's Avatar
MARCO1 MARCO1 is offline
 
Join Date: Jun 2008
Real name: Marco
Very nice, I will try it in my new Mod. Rated 5 stars.
__________________
Marco Mamdouh Fahem.
OUZMind Lead Developers
vBFoster Lead Developers
vBulletin 5 Alpha Team member.
Reply With Quote
  #5  
Old 23 Jan 2010, 20:12
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Real name: allan
Yes, voted 5 stars !
__________________
-------------------------------------------------------------------------------------------
Administrator vBulletin-Ressources.com, French vBulletin Resources.
Reply With Quote
  #6  
Old 25 Jan 2010, 18:52
doraj doraj is offline
 
Join Date: Nov 2005
Real name: Doraj
Hello Coroner, congratulations for your article.
I am trying use it to update my style from 3.8 to 4.0 but I have problems with any parts of the forum, forumhome, forumdisplay, showthread..etc
I am testing it online here

Can you suggest me how to risolve these mistakes?

Thanks
Reply With Quote
  #7  
Old 25 Jan 2010, 20:44
daveaite's Avatar
daveaite daveaite is offline
 
Join Date: Jul 2009
Real name: David
interesting. informational as well. good job
__________________

Introducing vBSocial 10
Reply With Quote
  #8  
Old 27 Jan 2010, 16:30
Mukashi's Avatar
Mukashi Mukashi is offline
 
Join Date: Jan 2004
Real name: Liam Pomfret
Very interesting Coroner....seems like you've basically matched variables from the old vB3 CCS to the vB4 Stylevars, so that a mod relying on the old variables would instead be able to pull the correct ones from the new style system. Is that correct?

If so...is there any way you (or anyone else here for that matter) might be able to take this a step further, and make something that would allow us to automatically convert over our colour schemes from vB3 styles to the stylevars of vB4 styles? Looks like one might be able to do that simply using what you've got here, reading down stylebridge.xml as if it was a checklist, but it'd be a great relief to a low of us who have no coding skills to speak of whatever if that process could be automated. ^^;
__________________
Webmaster, Bulbagarden.net / Bulbapedia
Reply With Quote
  #9  
Old 27 Jan 2010, 19:52
RollaJedi's Avatar
RollaJedi RollaJedi is offline
 
Join Date: Apr 2007
so, what i'm getting from reading this description, is that you can take a mod made for vb 3.8, do the steps found above, and your mod will now be able to work on vb 4.0?

If thats true, could i get the gxboxlive mod to work on my vb 4.0.1 site? The author of that mod is saying he very likely wont be making the gxboxlive mod to work on the vb 4. ????

Thanks!!!!
Reply With Quote
  #10  
Old 29 Jan 2010, 10:45
Coroner Coroner is offline
 
Join Date: Feb 2008
Real name: Stefan
@RollaJedi
Nope. You have to change the vars and phrases inside the templates. Also you need to change all the php scripts to vb4.

This is only the style. You can leave the 99 percent of templates (without vars and phrases).

@Mukashi:
Yes, thats absolutely correct.
You also need to implement - the two templates and the php script inside the mod.
Reply With Quote
  #11  
Old 07 Feb 2010, 09:17
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
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

Last edited by Dylanblitz; 15 Feb 2010 at 08:37.
Reply With Quote
  #12  
Old 17 Feb 2010, 14:52
Coroner Coroner is offline
 
Join Date: Feb 2008
Real name: Stefan
That's a think, I've fixed later (sorry, I haven't upgraded the file yet).

To fix the image border problem, just insert (into the style) the following part:
.img {
border: 0;
}
Reply With Quote
  #13  
Old 17 Feb 2010, 17:40
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
Originally Posted by Coroner View Post
That's a think, I've fixed later (sorry, I haven't upgraded the file yet).

To fix the image border problem, just insert (into the style) the following part:
I ended up changing the


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And it worked. I'll switch it back and try adding the img css property.
Reply With Quote
  #14  
Old 19 Feb 2010, 17:39
Coroner Coroner is offline
 
Join Date: Feb 2008
Real name: Stefan
I've change the Stylebridge now for vB 4.0.2 (incl. the image patch).
Reply With Quote
  #15  
Old 28 Mar 2010, 17:58
msnhockey msnhockey is offline
 
Join Date: Jul 2008
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...

thanks
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
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 On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:50.

Layout Options | Width: Wide Color: