Log In · Register

 
name change code thingy!, AHhH!!
countthestarz117
post Aug 12 2004, 07:41 PM
Post #1


IM BOUNCIN OFF THE WALLS AGAIN
***

Group: Member
Posts: 57
Joined: Jul 2004
Member No: 35,426



okay I have the 'Replace any text/link' code... i just don't understand it... is there anyway for anyone to explain it a LITTLE MOre? _unsure.gif wacko.gif blink.gif cry.gif
 
 
Start new topic
Replies
espionage
post Aug 12 2004, 07:50 PM
Post #2


Stalking Createblog...
****

Group: Member
Posts: 155
Joined: Jan 2004
Member No: 1,300



CODE
<!-- begin code provided by createblog.com -->
<script language="javascript">
<!--
var links = document.getElementsByTagName ('a');
for (var l = 0; l < links.length; l++) {
str = links[l].innerHTML;
if (str.match (/\d+:\d+ (am|pm)/i)) links[l]
else if (str.match (/eprops/i)) links[l].innerHTML = str.replace (/eprops/i, "cents");
else if (str.match (/eprop/i)) links[l].innerHTML = str.replace (/eprop/i, "cent");
else if (str.match (/comments/i)) links[l].innerHTML = str.replace (/comments/i, "dollars");
else if (str.match (/comment/i)) links[l].innerHTML = str.replace (/comment/i, "dollar");
else if (str.match (/subscribe!/i)) links[l].innerHTML = str.replace (/subscribe!/i, "add me");
else if (str.match (/sign out/i)) links[l].innerHTML = str.replace (/sign out/i, "log out");
}//-->
</script>
<!-- end code provided by createblog.com -->


There are basically two functions for this html...

CODE
<!-- begin code provided by createblog.com -->
else if (str.match (/eprops/i)) links[l].innerHTML = str.replace (/eprops/i, "cents");
<!-- end code provided by createblog.com -->


This is the basic command to replace a link with another. Looking specifically at the above command, look for the two words "eprops", one that appears in the middle and the other at the end. This is where you put your original link name in - The one you want to replace.
Look for "cents". Replace the word (Not the two quotations) to what you want the link that was previously named "eprops". So for the one above, any link that says "eprops" will be replaced with the word "cents".

Hope that helps.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: