vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   General Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=189)
-   -   [Tip] Use replacements (https://vborg.vbsupport.ru/showthread.php?t=86400)

Sephiroth32 02-24-2003 10:00 PM

[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.

Tony G 02-26-2003 03:15 AM

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

Sephiroth32 02-26-2003 09:10 PM

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

Tony G 02-27-2003 03:16 AM

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

refertech 03-05-2003 01:00 AM

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

Mark

Tony G 03-05-2003 03:19 AM

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.

refertech 03-05-2003 11:54 AM

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

Tony G 03-06-2003 03:42 AM

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

RazeJr 03-10-2003 07:51 PM

Sweet... Thanks for the Tip :D


All times are GMT. The time now is 12:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01029 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete