Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  Mar 18th, 2018, 04:44am

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Text Replacement.  (Read 10707 times)
Conforums founding member
Executive Member

member is offline




Gender: Male
Posts: 5804
xx Text Replacement.
« Thread started 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.
« Last Edit: Oct 30th, 2004, 4:39pm by Dave » User IP Logged

User Image
Executive Member

member is offline


Homepage PM

Posts: 11512
xx Re: Text Replacement.
« Reply #1 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.
« Last Edit: Nov 21st, 2004, 8:15pm by Richard » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Back To Top
| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls