One use for replacement variables is to correct common spelling mistakes. For example, on the vBulletin Community Forums a replacement variable exists to replace all instances of the incorrect abbreviation for vBulletin “VBB” with the correct abbreviation “vB”.
Replacement variables can be used to insert commonly-used blocks of HTML.
For example, a replacement variable could be set up to replace <tablestart> with <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">.
As another example, your templates could contain blocks of code like this:
<tablestart> <tr> <td class="alt1">Cell contents...</td> </tr> </table>
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> <tr> <td class="alt1">Cell contents...</td> </tr> </table>
The replacement variable system is activated in the last stages of page processing before the HTML is delivered to a visitor's browser. The system searches for target text in the completed, parsed templates.
Warning:
Replacement can be useful, but replacement variables can break the functionality of your site if used incorrectly.
Worse still, if you create a replacement variable to turn every instance of the word home into a hyperlink pointing to your home page: <a href="home.html">home</a>.
You might have the situation where the word 'home' is used in locations where creating a hyperlink would cause invalid HTML, such as the following:
<img src="home.gif" alt="" />
...which would end up being delivered to the browser as the following:
<img src="<a href="home.html">home</a>.gif" alt="" />
...which is invalid HTML and will not function correctly.