replace text code, still not working for me |
![]() ![]() |
replace text code, still not working for me |
Dec 20 2004, 11:43 AM
Post
#1
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 38 Joined: Dec 2004 Member No: 72,995 |
I know there's been a lot of posts with people asking how you replace text in your xanga like from 'Name:' to 'call me:' or something like that. I've cut and pasted the code in my website stats a million times and it still doesn't work. Help me!
Here's the code i pasted in my look and feel, website stats: <!-- begin code provided by createblog.com --> <script type="text/javascript"> // // © EasterEgg, http://www.xanga.com/easteregg // // For use at Xanga only. // // This script replaces any given word or text fragment with // whatever you want: new words and fragments, or even HTML! // // Actually it's pretty simple: add the words or fragments you // wish to replace to the array "oldWords" (each word placed // between double quotation marks, and separated by colons as you // can see below) and add their replacements to the array "newWords", // at the same position as the original words in "oldWords". // The example is pretty self-explaining. // // The script is case sensitive, meaning that if you add "something" // to "oldWords" array it will not recognize "SOMETHING", or "SoMetHInG". // // You can adjust the existing arrays in this code as you see fit, // as long as both arrays keep the same size (same amount of words // in both arrays), otherwise a script error will occur. // // Copy this entire code and paste in the webstats box at your // Look and Feel page. // // You're free to use this script as long as this comment remains intact, // and as long you won't use it to cripple the comments of your visitors; // after all, no one likes his/her words getting twisted... // function replaceWords() { // ***add the words or fragments you wish to replace below var oldWords = new Array( "Subscriptions", "email it", "My Blogrings", "Posting Calendar", "Name:", "Birthday:", "Gender:", "State:", "Interests:", "Website", "Member since:"); // *** add the replacing words or fragments below var newWords = new Array( "add me", "inbox", "my hideouts", "postmarked", "call me:", "introduced:", "i am:", "living in:", "i like:", "site", "here since:"); allTableData = document.getElementsByTagName('td'); allTableHeaders = document.getElementsByTagName('th'); var collections = new Array(allTableData,allTableHeaders); for (var k = 0; k < collections.length; ++k ) { for (var i = 0; i < collections[k].length; ++i ) { if (collections[k][i].innerHTML.indexOf('TABLE') == -1) { for ( var n = 0; n < oldWords.length; ++n ) { var indx = collections[k][i].innerHTML.indexOf(oldWords[n]) while (indx != -1) { var replacement = ''; indx = collections[k][i].innerHTML.indexOf(oldWords[n]); replacement = collections[k][i].innerHTML.replace(oldWords[n], newWords[n]); if(navigator.userAgent.toLowerCase().indexOf('compatible')>0){collections[k][i].innerHTML=replacement;//please use supported code at http://help.xanga.com/codes.htm } break; } } } } } } replaceWords(); </script> <!-- end code provided by createblog.com --> |
|
|
|
| *mona lisa* |
Dec 20 2004, 12:20 PM
Post
#2
|
|
Guest |
put this is your website stats. |
|
|
|
Dec 20 2004, 12:36 PM
Post
#3
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 38 Joined: Dec 2004 Member No: 72,995 |
it didn't work! ahhh...this is so frustrating...
could other codes in my webstats be interfering with this one? |
|
|
|
Dec 20 2004, 01:03 PM
Post
#4
|
|
|
Change Gon Come ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 2,286 Joined: May 2004 Member No: 18,822 |
yes. that's probably the case..
|
|
|
|
Dec 20 2004, 01:10 PM
Post
#5
|
|
![]() ^ moo... ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 962 Joined: Jun 2004 Member No: 25,212 |
^ try putting it at the very top of ur website stats.
|
|
|
|
Dec 20 2004, 02:03 PM
Post
#6
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 38 Joined: Dec 2004 Member No: 72,995 |
ok....first i tried putting it at the top of my webstats...then i tried cutting out all my other codes and putting only this code in there...and nothing worked!
this is so weird...are there any other codes besides this one that can replace the text? why isn't it working?! thanks to everybody who's trying to help though... |
|
|
|
Dec 20 2004, 02:40 PM
Post
#7
|
|
![]() ^ moo... ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 962 Joined: Jun 2004 Member No: 25,212 |
err.. maybe the codes mest up..
try using the one in the scripts section |
|
|
|
Dec 20 2004, 02:58 PM
Post
#8
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 38 Joined: Dec 2004 Member No: 72,995 |
nvm...it worked for a second, then it stopped working so forget it...
thanks anyways |
|
|
|
![]() ![]() |