Log in

View Full Version : customized templates


eclectica
2004-04-24, 00:17
After you upgrade to a newer version of vBulletin, some of the templates change on the board as well. The only ones you need to worry about are your customized templates. To find out after an upgrade if your customized templates have changed, go in the admincp to Styles & Templates--> Find Updated Templates. It will list the ones which have been updated after you have updated your board. You can then revert them to their new defaults, and then afterwards apply your customizations again.

The templates in each style must be customized, but if it is set up so that there is a parent style then only the parent style needs to be customized, causing the templates of all child styles to be automatically customized as well. Here are the vBulletin templates which have been customized on the board:

navbar
EFFECT:
To toggle between home and forum page on navbar. See this thread (http://www.vbadvanced.com/forum/showthread.php?t=9689)

find the following, where it occurs in the second instance in the template:
<if condition="$show['member']">

above it add this:
<td class="vbmenu_control"><if condition="THIS_SCRIPT == 'adv_index'"><a href="$vboptions[bburl]/$vboptions[forumhome].php?$session[sessionurl]"> Forum <else /> <a href="$vboptions[homeurl]?$session[sessionurl]"> Home </if></a></td>

The following customized template was created to add a flash clock to the vBadvanced portal. See this information at vbadvanced.com:
http://www.vbadvanced.com/forum/showthread.php?t=1172
http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=5

adv_portal_clock

<table align="center" border="0" cellpadding=
"$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]"
class="tborder" width="100%">
<tr>
<td class="tcat"><span class=
"smallfont"><strong>$vba_options[portal_blockbullet] <a href=
"http://www.3-3-3.org/forum/clocks/DeskClock2.swf">Clock</a></strong></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%"><object width="150" height=
"150"><param name="movie" value=
"http://www.3-3-3.org/forum/clocks/GlowClock.swf">
<embed src="http://www.3-3-3.org/forum/clocks/GlowClock.swf" width=
"150" height="150"></object></td>
</tr>
</table>

After the template was saved I went into the admincp > vBa CMPS > Add Module > Template, then:

- Module Title - Clock
- Module Identifier - (leave blank)
- OR Template to Include - clock
- Activate and select the column you want it in.
- Save
- Use Module Shell Template: NO (YES if clock is on the bottom of column)

eclectica
2006-01-22, 05:43
In some cases the same result can be achieved by editing phrases in the Phrase Manager rather than customizing templates. For example, I originally changed the title on the top "Powered by vBulletin" by editing the FORUMHOME template, but I found that I could instead edit the phrase x_powered_by_vbulletin and achieve the same result. It is preferable to make the desired effect to the board by editing the phrase variable rather than editing the template. The reason why is that templates often change when a new version of vBulletin comes out, so that would mean that after the upgrade, the template would have to "reverted" to its new default, and the desired customization would then be added. By altering the phrase rather than the template, it makes vBulletin forum upgrades easier.

The following is the listing of all phrase variables that have been changed from the default:


forum_rules_description

OLD:

<p><strong>Forum Rules</strong></p> <p>Registration to this forum is free! We do insist that you abide by the rules and policies detailed below. If you agree to the terms, please check the 'I agree' checkbox and press the 'Register' button below. If you would like to cancel the registration, click <a href="{1}">here</a> to return to the forums index.</p> <p>Although the administrators and moderators of {2} will attempt to keep all objectionable messages off this forum, it is impossible for us to review all messages. All messages express the views of the author, and neither the owners of {2}, nor Jelsoft Enterprises Ltd. (developers of vBulletin) will be held responsible for the content of any message.</p> <p>By agreeing to these rules, you warrant that you will not post any messages that are obscene, vulgar, sexually-orientated, hateful, threatening, or otherwise violative of any laws.</p> <p>The owners of {2} reserve the right to remove, edit, move or close any thread for any reason.</p>

NEW:

<font color=#ff0000><font size=3>
We have chosen to eliminate the routine of dishonesty and the automatic signing away of your rights. We believe that having you check off a box agreeing to something that we know you're not even going to bother reading just encourages complacency and erodes the seriousness of rules, and allows for the authorities to selectively enforce the rules when they feel like it as a way of abusing their power.
</font></font>
<p>
<font color=#ff0000><font size=3>
Rather than have you go through all that, we would simply like you to check off the box <i><b>"I have read, and agree to abide by the {2} rules."</b></i> without thinking that you've just signed a legal contract. Instead you should think of the checking of the box as the geek's equivalent of successfully maneuvering an obstacle course.
</font></font>


top_poster (vBadvanced CMPS v2.1.0)

OLD:

Top Poster

NEW:

Top Spammer


view_forum_leaders

OLD:

View Forum Leaders

NEW:

Rogues Gallery


welcome_to_our_newest_member_x

OLD:

Welcome to our newest member, <a href="{1}">{2}</a>

NEW:

Give a single-handed round of applause to our newest member, <a href="{1}">{2}</a>


welcome_to_the_x

OLD:

Welcome to the {1}.

NEW:

Welcome to {1}.


x_powered_by_vbulletin

OLD:

{1} - Powered by vBulletin

NEW:

{1} - Forum