Conforums Support
Support >> Frequently Asked Questions - (FAQ) >> Text Replacement.

Text Replacement.
Post by Jason on May 26th, 2003, 7:03pm

Text Replacement

It is possible to replace any word(s) on your board with another. This is done by using the code below.

Just change the highlighted bits.

<script language="javascript">
if (location.href.indexOf("=headersfooters") != -1 ) { }
var range = document.body.createTextRange();
while (range.findText("Word(s) to search for")) {
range.text="Word(s) to replace with";

For this code to work correctly, it should really be put in the footers of all the boards you want to make changes too, not just the main footer.

Note: This code is not cross browser compatible.
Re: Text Replacement.
Post by Richard on Nov 21st, 2004, 8:14pm

To Replace multiple different text with multipe different images:

function TitleSwitch(text,image){
var TD = document.getElementsByTagName("TD");
if(TD[i].className.match(/^(title|cat)bg$/) && TD[i].innerHTML.match(text)){
TD[i].innerHTML=TD[i].innerHTML.replace(text,"<img src='"+image+"'/>")

TitleSwitch("TEXT","IMAGE URL")
TitleSwitch("TEXT","IMAGE URL")
TitleSwitch("TEXT","IMAGE URL")
//add more if neded


Place this script in your footer where needed.