Helpful Information
 
 
Category: General Articles
[Tip] Use replacements

When writing a template modification, you should always use the built-in Vbulletin replacements instead of acual settings. Fir example, instead of:

<tr bgcolor="#ff9900">
<td>
<font face="verdana" size="2">
Text
</td>
</tr>

You can use:

<tr bgcolor="{firstaltcolor}">
<td>
<normalfont>
Text
</td>
</tr>

This makes things much eassier for the person installing your mod. This is because they wont need to change all of your custom settings to their own settings.

Thats just really common sense, you can also put text that is prone to change many times in a replacement too. :)

I know it is common sense but alot of people dont do it

Yes, I never intended to say everyone knew it, just thats it's that once known. ;)

I didnt know that, of course I'm extremely green to this and I'm still unclear what a replacement really is. :)

Mark

It's really a piece of code that is placed into 'replacements' so a new code (eg. {categorybackcolor}' can be used in the templates instead of bgcolor="blabla") is used and mostly used for things which appear alot throughout the templates.

Thats basically the jist of it's use.

oh, ok I see. Well that does make sense now that you explained what it does. Thanks Tony.

Great, didn't think that was a good one. :)

Sweet... Thanks for the Tip :D










privacy (GDPR)