View Full Version : Administrative and Maintenance Tools - Templateconvert from vB3 to vB4
punishment
02-03-2010, 10:00 PM
Warning: This Mod is only for developers! Don't use this in live boards.
With this script you can convert vB3 templates to the vB4 syntax. You can make backup from the old templates, to a later error compare.
Before you merge the templates you can compare old and new syntax.
The folder /dev/backup => CHMOD 0777.
Good Luck. ;)
/*
* OWN RISK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*
* <if condition="xyz"> to <vb:if condition="xyz">
* <else /> to <vb:else />
* </if> to </vb:if>
*
* $vbphrase[xyz] to {vb:rawphrase xyz}
* $vboptions[xyz] to {vb:raw vboptions.xyz}
* $session[xyz] to {vb:raw session.xyz}
* $bbuserinfo[xyz] to {vb:raw bbuserinfo.xyz}
* $pagenav to {vb:raw pagenav}
*
* $foo(.*) to {vb:raw foo(.*)} Textarea Input you can use multiple variables $foo(.*) and $baz(.*) etc.
*/
saadessa
02-04-2010, 09:32 PM
vrey great job thank you
treyb
02-04-2010, 09:47 PM
Great Idea
Charlie98902
02-04-2010, 09:49 PM
Wow, after I redid it all manually. I am sure there is some waiting on something like this though.
Nice! There are a few more mods I want to convert, this should come in very handy, thank you!
Sador
02-05-2010, 09:35 AM
Hm. I hope there will be a version that can be used by non-developers as well, cause this would be one of the best mods available right now.
cad2go
02-05-2010, 09:40 AM
I asked would this be included as part of the vb3->vb4 upgrade. I may as well have asked for the moon.
Thanks a lot for releasing this.
MARCO1
02-05-2010, 12:40 PM
Very Good, I will install it in my tests forum
Installed and Rated 5 stars.
Zaiaku
02-05-2010, 02:02 PM
Anyone besides me thinking that shis should of been a stand tool for vb4? This could of help so many people on day 1.
scan-pa
02-05-2010, 02:04 PM
Nice, great job. This is something else that jelsoft should have had built in vB4.
gothicuser
02-05-2010, 02:07 PM
What a damn good idea, thankyou.
Mukashi
02-05-2010, 10:08 PM
This, and a converter for style colour schemes (changing the main CSS variables to the Stylevars) should have been included in the vB4 package as standard IMO. Nice job.
BoYagoob
02-06-2010, 06:26 PM
Installed and 7 stars ;)
Thanks a milliooooooon ..
mabersoft
02-06-2010, 07:05 PM
What would be good is if some one made this into a program that you simply inbut the vb3 style xml and it auto changes to vb4 so you don't need to edit one bit the program does it for you.
gothicuser
02-06-2010, 07:59 PM
What would be good is if some one made this into a program that you simply inbut the vb3 style xml and it auto changes to vb4 so you don't need to edit one bit the program does it for you.
Hmm, 'spose we can but dream https://vborg.vbsupport.ru/
Zachery
02-06-2010, 08:00 PM
This only updates the syntax, and I'm pretty sure is intended for developers. This wouldn't have updated your templates to be compatable with vBulletin 4 features, or its css.
kisanjong
02-06-2010, 09:33 PM
Hmm, 'spose we can but dream https://vborg.vbsupport.ru/
i agree and if dreams do come true :P - it deserves mod of the year :D
Howard
05-27-2010, 07:36 AM
Hi I tried just dumping this in my vbull root but then the mysql IN() isnt populated so I assume I need to select a hook and paste contents on index.php into the textbox. But do not know what hook to use
Michael.A
08-23-2010, 08:15 AM
love it but i want it to work the other way around from vb4 to vb3 any help?
trying to convert this to vb3...
<div id="navbar" class="navbar">
<ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>">
{vb:raw template_hook.navtab_start}
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">
<li class="selected"><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a>
<ul class="floatcontainer">
{vb:raw template_hook.navbar_start}
<vb:if condition="$show['searchbuttons']">
<vb:if condition="$show['member']">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_P ost">{vb:rawphrase new_posts_nav}</a></li>
<vb:else />
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post">{vb:rawphrase todays_posts}</a></li>
</vb:if>
</vb:if>
{vb:raw template_hook.navbar_after_getnew}
<vb:if condition="$show['pmmainlink']">
<li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li>
</vb:if>
{vb:raw template_hook.navbar_after_pm}
<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
{vb:raw template_hook.navbar_after_faq}
<li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>
{vb:raw template_hook.navbar_after_calendar}
<li class="popupmenu">
<a href="javascript://" class="popupctrl" accesskey="6">{vb:rawphrase community}</a>
<ul class="popupbody popuphover">
{vb:raw template_hook.navbar_community_menu_start}
<vb:if condition="$show['quick_links_groups']">
<li><a href="group.php{vb:raw session.sessionurl_q}">{vb:rawphrase social_groups}</a></li>
</vb:if>
<vb:if condition="$show['quick_links_albums']">
<li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li>
</vb:if>
<vb:if condition="$bbuserinfo['userid']">
<li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li>
</vb:if>
<vb:if condition="$show['memberslist']">
<li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li>
</vb:if>
{vb:raw template_hook.navbar_community_menu_end}
</ul>
</li>
{vb:raw template_hook.navbar_after_community}
<li class="popupmenu">
<a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a>
<ul class="popupbody popuphover">
<li>
<a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:ra w bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a>
</li>
<vb:if condition="$show['member']">
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a>
</li>
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a>
</li>
</vb:if>
</ul>
</li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl" accesskey="3">{vb:rawphrase quick_links}</a>
<ul class="popupbody popuphover">
<vb:if condition="$show['member']">
<vb:if condition="$show['member']">
<li><a href="subscription.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li>
</vb:if>
<li>
<a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&focus=1','buddylis t','statusbar=no,menubar=no,toolbar=no,scrollbars= yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a>
</li>
</vb:if>
<vb:if condition="$vboptions['forumleaders']">
<li><a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
<vb:if condition="$vb_suite_installed">
{vb:rawphrase view_site_leaders}
<vb:else />
{vb:rawphrase view_forum_leaders}
</vb:if>
</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos1}
{vb:raw template_hook.navbar_quick_links_menu_pos2}
{vb:raw template_hook.navbar_quick_links_menu_pos3}
<vb:if condition="$show['wollink']">
<li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos4}
</ul>
</li>
{vb:raw template_hook.navbar_end}
</ul>
</li>
<vb:elseif condition="$vboptions['selectednavtab']=='usercp'" />
<li class="selected"><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a>
<ul class="floatcontainer">
{vb:raw template_hook.navbar_start}
<vb:if condition="$show['searchbuttons']">
<vb:if condition="$show['member']">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_P ost">{vb:rawphrase new_posts_nav}</a></li>
<vb:else />
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post">{vb:rawphrase todays_posts}</a></li>
</vb:if>
</vb:if>
{vb:raw template_hook.navbar_after_getnew}
<vb:if condition="$show['pmmainlink']">
<li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li>
</vb:if>
{vb:raw template_hook.navbar_after_pm}
<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
{vb:raw template_hook.navbar_after_faq}
<li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>
{vb:raw template_hook.navbar_after_calendar}
<li class="popupmenu">
<a href="javascript://" class="popupctrl">{vb:rawphrase community}</a>
<ul class="popupbody popuphover">
{vb:raw template_hook.navbar_community_menu_start}
<vb:if condition="$show['quick_links_groups']">
<li><a href="group.php{vb:raw session.sessionurl_q}">{vb:rawphrase social_groups}</a></li>
</vb:if>
<vb:if condition="$show['quick_links_albums']">
<li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li>
</vb:if>
<vb:if condition="$bbuserinfo['userid']">
<li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li>
</vb:if>
<vb:if condition="$show['memberslist']">
<li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li>
</vb:if>
{vb:raw template_hook.navbar_community_menu_end}
</ul>
</li>
{vb:raw template_hook.navbar_after_community}
<li class="popupmenu">
<a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a>
<ul class="popupbody popuphover">
<li>
<a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:ra w bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a>
</li>
<vb:if condition="$show['member']">
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a>
</li>
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a>
</li>
</vb:if>
</ul>
</li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl">{vb:rawphrase quick_links}</a>
<ul class="popupbody popuphover">
<li><a href="subscription.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li>
<li>
<a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&focus=1','buddylis t','statusbar=no,menubar=no,toolbar=no,scrollbars= yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a>
</li>
<vb:if condition="$vboptions['forumleaders']">
<li>
<a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
<vb:if condition="$vb_suite_installed">
{vb:rawphrase view_site_leaders}
<vb:else />
{vb:rawphrase view_forum_leaders}
</vb:if>
</a>
</li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos1}
{vb:raw template_hook.navbar_quick_links_menu_pos2}
{vb:raw template_hook.navbar_quick_links_menu_pos3}
<vb:if condition="$show['wollink']">
<li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos4}
</ul>
</li>
{vb:raw template_hook.navbar_end}
</ul>
</li>
<vb:else />
<li><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a></li>
</vb:if>
{vb:raw template_hook.navtab_middle}
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT == 'search'">
<vb:if condition="$show['member']">
<li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_P ost" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_P ost">{vb:rawphrase new_posts_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_S ocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_E vent">{vb:rawphrase new_events_nav}</a></li>
{vb:raw template_hook.navbar_getnew_menu}
<li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:ra w bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>
</li>
<vb:else />
<li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Event">{vb:rawphrase daily_events}</a></li>
{vb:raw template_hook.navbar_getdaily_menu}
<li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:ra w bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>
</li>
</vb:if>
<vb:elseif condition="$show['member']" />
<li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_P ost" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
<vb:else />
<li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
</vb:if>
{vb:raw template_hook.navtab_end}
</ul>
<vb:if condition="$vboptions['enablesearches']">
<div id="globalsearch" class="globalsearch">
<form action="search.php?do=process" method="post" id="navbar_search" class="navbar_search">
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<span class="textboxcontainer"><span><input type="text" onfocus="this.value=''" value="Search here..." name="query" class="textbox" tabindex="99"/></span></span>
</form>
<ul class="navbar_advanced_search">
<li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
</ul>
</div>
</vb:if>
</div>
</div><!-- closing div for above_body -->
<div class="body_wrapper">
<div style="padding:0 10px;">
<div id="breadcrumb" class="breadcrumb">
<ul class="floatcontainer">
<li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li>
{vb:raw navbits.breadcrumb}
{vb:raw navbits.lastelement}
</ul>
<hr />
</div>
{vb:raw ad_location.ad_navbar_below}
{vb:raw ad_location.global_below_navbar}
<vb:if condition="$show['notices']">
<form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices">
<input type="hidden" name="do" value="dismissnotice" />
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
<input type="hidden" name="url" value="{vb:raw return_link}" />
<ol>
{vb:raw notices}
</ol>
</form>
</vb:if>
</div>
parks72
09-04-2010, 02:42 PM
thanks i will check it out..............
rob01
12-26-2010, 02:58 AM
we also need to find a way out to update the php files
from vb3 to vb4
final kaoss
01-02-2011, 02:39 PM
It would be great to see this product receive updates until vb5 comes.
nacaruncr
01-03-2011, 09:04 AM
someone can explain me how i have to do for transform one style vb3 to vb4?
I don't understand, what i have to do?
excuse me, but it's new for me :S
Trip3151
01-03-2011, 11:38 AM
It would be great to see this product receive updates until vb5 comes.
LOL let Vbulletin get Version 4 right first :)
final kaoss
07-29-2011, 12:26 AM
speaking of which, is it working with vb 4.1.5?
Hornstar
05-24-2012, 03:20 AM
I'll give this a go in a bit. Trying to update a couple old vb3 mods to vb4. Hopefully this will take care of the templates. Now I just need one for the php files.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.