Log In · Register

 
 
Closed TopicStart new topic
replace words script, not working! help
LiLrEbL365
post Jun 5 2004, 04:14 PM
Post #1


wake me up when september ends
****

Group: Member
Posts: 281
Joined: Feb 2004
Member No: 4,381



k i went in the scripts section, got this code, and put in all the words i wanted, put it in website stats! but it wont work!

code:<!-- begin code provided by createblog.com -->
<script type="text/javascript">
//
// ©2003 EASTEREGG, HTTP://WWW.XANGA.COM/EASTEREGG
// CHANGES DATE TEXT
// FOR USE AT XANGA ONLY.
// RAWRS =P
// INFO AT HTTP://DORKETTE.NET
//

function replaceWordsDates()
{
// ***ADD THE MONTHS OR DAYS YOU WISH TO REPLACE BELOW
var oldWordsDates = new Array(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
"Monday,",
"Tuesday,",
"Wednesday,",
"Thursday,",
"Friday,",
"Saturday,",
"Sunday,",
", 2004"
"Subscriptions",
"Publish Comments",
"add eProps",
"eprop",
"eProps",
"add comments",
"comment",
"comments",
"email it",
"view entire profile",
"sign my guestbook",
"My Blogrings",
"Posting Calendar",
"Get Involved!",
"sign out",
"Name",
"Birthday",
"Gender",
"Location",
"Website",
"Email",
"Stats",
"Member since");



// *** ADD THE REPLACING MONTHS OR DAYS BELOW
var newWordsDates = new Array(
"jAnUaRy",
"fEbRuArY",
"mArCh",
"ApRiL",
"mAy",
"jUnE",
"jUlY",
"aUgUsT",
"sEpTeMbEr",
"oCtObEr",
"nOvEmBeR",
"dEcEmBeR",
"",
"",
"",
"",
"",
"",
"",
", 2oO4"
"pErZoNz",
"pUbLiSh dOsE cOmmEnTz",
"GiMMe a EpRoPPeR",
"ePrOp",
"ePrOpZ",
"GiMMe a CoMMeNt",
"cOmmEnT",
"cOmmEnT",
"EmAiL iT",
"sEE mY wHoLe pRoFiLe",
"wRiTe iN mAii g-bOOk",
"bLoGGeRiNgZ",
"pOsTiNg cAlEnDaR",
"gEt WiT dA pRoGrAm",
"gEt oUt",
"i bE",
"sUmThiN sPeCiAl hApPeNeD oN",
"i bE a",
"iM iN",
"mY xAnGa iZ",
"wRiTe mE!",
"sTatZ",
"i bEEn HeRe SiNcE");


allDivData = document.getElementsByTagName('div');

var collections = new Array(allDivData);

for (var k = 0; k < collections.length; ++k )
{
for (var i = 0; i < collections[k].length; ++i )
{
if (collections[k][i].innerHTML.indexOf('DIV') == -1)
{
for ( var n = 0; n < oldWordsDates.length; ++n )
{
var indx = collections[k][i].innerHTML.indexOf(oldWordsDates[n])
while (indx != -1)
{
var replacement = '';
indx = collections[k][i].innerHTML.indexOf(oldWordsDates[n]);
replacement = collections[k][i].innerHTML.replace(oldWordsDates[n], newWordsDates[n]);
collections[k][i].innerHTML = replacement;
break;
}
}
}
}
}
}
replaceWordsDates();
</script>
<!-- end code provided by createblog.com -->

can sum1 plz tell me what im doin wrong?

maii [x]anguh
 
dromero986
post Jun 5 2004, 07:28 PM
Post #2


pfft...who needs a title?
*****

Group: Member
Posts: 317
Joined: Jun 2004
Member No: 19,840



hmmm...not totally sure, but looks like you missed a comma?? after ", 2004" in BOTH the old and new. try copying and pasting this into your website stats:

CODE
<!-- begin code provided by createblog.com -->
<script type="text/javascript">
//
// ©2003 EASTEREGG, HTTP://WWW.XANGA.COM/EASTEREGG
// CHANGES DATE TEXT
// FOR USE AT XANGA ONLY.
// RAWRS =P
// INFO AT HTTP://DORKETTE.NET
//

function replaceWordsDates()
{
// ***ADD THE MONTHS OR DAYS YOU WISH TO REPLACE BELOW
var oldWordsDates = new Array(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
"Monday,",
"Tuesday,",
"Wednesday,",
"Thursday,",
"Friday,",
"Saturday,",
"Sunday,",
", 2004",
"Subscriptions",
"Publish Comments",
"add eProps",
"eprop",
"eProps",
"add comments",
"comment",
"comments",
"email it",
"view entire profile",
"sign my guestbook",
"My Blogrings",
"Posting Calendar",
"Get Involved!",
"sign out",
"Name",
"Birthday",
"Gender",
"Location",
"Website",
"Email",
"Stats",
"Member since");



// *** ADD THE REPLACING MONTHS OR DAYS BELOW
var newWordsDates = new Array(
"jAnUaRy",
"fEbRuArY",
"mArCh",
"ApRiL",
"mAy",
"jUnE",
"jUlY",
"aUgUsT",
"sEpTeMbEr",
"oCtObEr",
"nOvEmBeR",
"dEcEmBeR",
"",
"",
"",
"",
"",
"",
"",
", 2oO4",
"pErZoNz",
"pUbLiSh dOsE cOmmEnTz",
"GiMMe a EpRoPPeR",
"ePrOp",
"ePrOpZ",
"GiMMe a CoMMeNt",
"cOmmEnT",
"cOmmEnT",
"EmAiL iT",
"sEE mY wHoLe pRoFiLe",
"wRiTe iN mAii g-bOOk",
"bLoGGeRiNgZ",
"pOsTiNg cAlEnDaR",
"gEt WiT dA pRoGrAm",
"gEt oUt",
"i bE",
"sUmThiN sPeCiAl hApPeNeD oN",
"i bE a",
"iM iN",
"mY xAnGa iZ",
"wRiTe mE!",
"sTatZ",
"i bEEn HeRe SiNcE");


allDivData = document.getElementsByTagName('div');

var collections = new Array(allDivData);

for (var k = 0; k < collections.length; ++k )
{
for (var i = 0; i < collections[k].length; ++i )
{
if (collections[k][i].innerHTML.indexOf('DIV') == -1)
{
for ( var n = 0; n < oldWordsDates.length; ++n )
{
var indx = collections[k][i].innerHTML.indexOf(oldWordsDates[n])
while (indx != -1)
{
var replacement = '';
indx = collections[k][i].innerHTML.indexOf(oldWordsDates[n]);
replacement = collections[k][i].innerHTML.replace(oldWordsDates[n], newWordsDates[n]);
collections[k][i].innerHTML = replacement;
break;
}
}
}
}
}
}
replaceWordsDates();
</script>
<!-- end code provided by createblog.com -->


another thought: it might be that THIS script says 'CHANGES DATE TEXT' could be only for dates. i know in my own xanga i have two separate codes in my website stats, one for dates/days, another for the other stuff. so try omitting the non-date/day stuff in the above script and use this for the other stuff:

CODE
<!-- begin code provided by createblog.com -->
<script type="text/javascript">
//
// ?003 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(
       "Platdujour",
       "read my profile",
       "sign my guestbook",
       "email me",
       "Subscriptions",
       "My Blogrings",
       "eProps",
       "email it"
       );
   // *** add the replacing words or fragments below
   var newWords = new Array(
       "PLATDUJOUR",
       "de moi",
       "laissez-moi une note!",
       "dromero986@comcast.net",
       "J'ADORE",
       "MA FAMILLE",
       "bubbles",
       "bleh"
       );

   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]);
                       collections[k][i].innerHTML = replacement;
                       break;                    
                   }
               }
           }
       }
   }
}
replaceWords();
</script>

<!-- end code provided by createblog.com -->


see if that works
 
LatinaLady
post Jun 5 2004, 08:26 PM
Post #3


Look its...
*******

Group: Official Member
Posts: 5,817
Joined: Feb 2004
Member No: 4,767



try this

http://help.xanga.com/replacelinks.htm
 
angel-roh
post Jun 5 2004, 09:31 PM
Post #4


i'm susan
********

Group: Official Member
Posts: 13,875
Joined: Feb 2004
Member No: 5,029



IT PR0LLY W0RKS FINE F0R 0THERS, BUT THE THING IS THAT MAYBE U G0T S0 MANY C0DES IN UR XANQA THAT IT C0ULDNT FIT T0 UR XANQA. IT HAPPENS ALL THE TIME.
 

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