Log In · Register

 
 
Closed TopicStart new topic
Erm.. didnt work
HIMsHeartagram
post Aug 13 2004, 05:33 AM
Post #1


Senior Member
****

Group: Member
Posts: 289
Joined: Jun 2004
Member No: 24,564



I used this code for subcriptions and my blogrings.

QUOTE
<script type="text/javascript">
//
// &Atilde;????????&Atilde;???????&Atilde;??????&Atilde;?????&Atilde;????&Atilde;???&Atilde;??&Atilde;?&Acirc;&copy;2003 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(
        "My Blogrings:"

      );

    // *** add the replacing words or fragments below
    var newWords = new Array(
        "Worthless Blogrings"
         
);

    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>


but it didn't work... anything wrong.??
 
Caustic
post Aug 13 2004, 05:42 AM
Post #2


rawr
*****

Group: Member
Posts: 906
Joined: Jul 2004
Member No: 26,961



Use this:
QUOTE
<script type="text/javascript">
function replaceWords()
{
    // ***add the words or fragments you wish to replace below
    var oldWords = new Array(
        "My Blogrings:");

      );

    // *** add the replacing words or fragments below
    var newWords = new Array(
        "Worthless Blogrings");
         
);

    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>
 
sherryvu
post Aug 13 2004, 09:12 AM
Post #3


Senior Member
*******

Group: Member
Posts: 3,826
Joined: Jan 2004
Member No: 2,330



use the other script for links like subscriptions and blogrings. it's in the xanga scripts section under "replace any text links script"

edit:// nevermind i misunderstood your problem. use the one above and put it in your website stats
 
kpxanqel
post Aug 14 2004, 01:07 AM
Post #4


anna park
*****

Group: Member
Posts: 410
Joined: Jul 2004
Member No: 29,818



website stats
 
HIMsHeartagram
post Aug 14 2004, 05:40 AM
Post #5


Senior Member
****

Group: Member
Posts: 289
Joined: Jun 2004
Member No: 24,564



mmmm no it didnt work again. Grr.
 
HIMsHeartagram
post Aug 14 2004, 05:49 AM
Post #6


Senior Member
****

Group: Member
Posts: 289
Joined: Jun 2004
Member No: 24,564



nvm it did
 
sikdragon
post Aug 14 2004, 06:56 AM
Post #7


Bardic Nation
******

Group: Member
Posts: 1,113
Joined: Aug 2004
Member No: 38,059



why didnt u just edit ur first comment instead of making a new one? yeah sounds easier but it makes you look dumb. why did i make a new reply? did i just type all these letters to make it look like im not just trying to make another post? i mean im so close to the next level, psyche.
 

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