Log In · Register

 
Problems with single entry code.
Birt
post Mar 25 2006, 01:19 AM
Post #1


Senior Member
***

Group: Member
Posts: 84
Joined: Dec 2005
Member No: 323,797



I've been having problems finding a working code for displaying a single entry on my site and finally came across one. It worked a few times, but now it doesn't work at all. Does anyone know why this is happening or know of a code that is guaranteed to work?
 
 
Start new topic
Replies (1 - 5)
YourSuperior
post Mar 25 2006, 01:32 AM
Post #2


;)
*******

Group: Staff Alumni
Posts: 9,573
Joined: Feb 2005
Member No: 99,124



If you're using Firefox then that could be the case, because the code only works in Internet Explorer. Can you post the link to your xanga?
 
Birt
post Mar 25 2006, 01:58 AM
Post #3


Senior Member
***

Group: Member
Posts: 84
Joined: Dec 2005
Member No: 323,797



I'm using Internet Explorer.


CODE
<script>
numberOfEntries = 1; //Change this value here...
if(location.pathname=='/disco____onthedancefloor'){
var tds = document.getElementsByTagName ('a');
for (var i = 0; i < tds.length; i++) {
timeString = tds[i].innerText;
if(timeString.match(/\d+:\d+ [ap]m\b/i)){break;}
}
stuff = tds[i].parentNode.parentNode.parentNode.parentNode.parentNode;
for(j=1;j<numberOfEntries;j++){
stuff=stuff.nextSibling.nextSibling.nextSibling
if(stuff.tagName=='BR'){
stuff=stuff.previousSibling;
}
}
for(i=0;i<20;i++){
if(stuff.tagName=='HR' && stuff.nextSibling.tagName=='TABLE')
{
stuff.nextSibling.removeNode(true);
break;
}
stuff = stuff.nextSibling;
stuff.style.display='none';
}}
</script>


My Xanga.

I apologize for not putting it in the post above.
 
talcumpowder
post Mar 27 2006, 10:36 PM
Post #4


You'll find me in your dreams.
*******

Group: Official Member
Posts: 8,536
Joined: Mar 2005
Member No: 114,010



^ If you always link it like that, then use disco____ontheDANCEFLOOR instead of all lowercase. wink.gif And I merged your posts, please use the edit button next time! Sankyuu.
 
Birt
post Mar 28 2006, 03:28 AM
Post #5


Senior Member
***

Group: Member
Posts: 84
Joined: Dec 2005
Member No: 323,797



Using disco____ontheDANCEFLOOR with uppercase letters made the code not work at all. If I keep it in lowercase, it'll work for a brief second and then go back to displaying 5 entries.
 
Birt
post Mar 29 2006, 07:09 PM
Post #6


Senior Member
***

Group: Member
Posts: 84
Joined: Dec 2005
Member No: 323,797



Here are all of the codes that are in my Website Stats:

CODE
<font face='arial' size='1'><a href='http://www.coolcounters.com'>www.coolcounters.com</a></font><br><script language="javascript">
DOC=document;var data, p;
var agt=navigator.userAgent.toLowerCase();
p='http';
if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';} data = '&r=' + escape(DOC.referrer) + '&n=' + escape(navigator.userAgent) + '&p=' + escape(navigator.userAgent)
if(navigator.userAgent.substring(0,1)>'3') {data = data + '&sd=' + screen.colorDepth + '&sw=' + escape(screen.width+ 'x'+screen.height)};
document.write('<a href="http://redirect.xangahits.com" target="_blank" >');
document.write('<img border=0 hspace=0 '+'vspace=0 src="http://www.coolcounters.com/counter.php?i=559372' + data + '"></a>');
document.write("<scr"+"ipt src='http://www.coolcounters.com/counter.js'></scr"+"ipt>");
</script>






<!-- -----smiley collection below -->
<script type="text/javascript">
//
// *** Smiley Script V 2.2 ***
//
// (c)2003 by EasterEgg, http://www.xanga.com/easteregg
//
// You can use this code freely, as long as the entire script remains intact.
//
// WHAT'S NEW?
//
// 1.0 (February 11, 2003)
// - initial release
//
// 2.0 (May 12, 2003)
// - cross browser: it runs in IE, Netscape, Mozilla and Opera
// - ready for the upcoming (beta tested) changes at Xanga
// - clickable smileys, even for non-IE users, displayed in buttons
// - customizable number of smileys displayed in one row
// - customizable smiley button size
// - easily adjustable: only two arrays to maintain
//
// 2.1 (May 12, 2003)
// - preloading images for faster performance
// - XP Bugfix
//
// 2.2 (May 17, 2003)
// - necessary adjustments made because of recent changes at Xanga
// - made suitable for Mac users!
// - runs only at the comment page for increased performance
//
// HOW TO USE:
// For use at Xanga only. Copy this entire code (including the script tags)
// and paste in the Website Stats box at your Look and Feel page. Make sure
// the previous version of this script (if any) is completely removed first.
//
// The script contains two arrays: "textSmileys" and "realSmileys". The items
// present in the array "textSmileys" will be automatically replaced with the
// corresponding images in the array "realSmileys". You can modify the arrays
// as you see fit, as long as both arrays keep the exact same number of items.
//
// For example, suppose you want to add some smiley to the script... that would mean
// in "textSmileys" you would add a shorthand like ":some_smiley:" or {somesmiley},
// and in "realSmileys" you would add it's url: "http://www.dude.com/some_smiley.gif".
//
// SETTINGS:
// - "maxNumberOfSmileysPerRow": number of smileys that will be displayed in one row.
// Smileys above that number will automatically be added to a new line. 10 by default.
// - "buttonSize": size of the smiley buttons in pixels. 30 px by default.
//
// AVAILABILITY:
// The script has been tested in the latest versions of IE, Netscape,
// Mozilla and Opera (Windows 98).
//

function typeSmiley(sSmiley)
{
    if (document.getElementsByTagName('textarea')[0].getAttribute('name') == 'bdescr')
        var editor = document.getElementsByTagName('textarea')[0];
    else
    {
        var allTextAreas = document.getElementsByTagName('textarea');
        for (i = 0; i < allTextAreas.length; ++i)
        {
            if (allTextAreas[i].getAttribute('name') == 'bdescr')
            {
                var editor = allTextAreas[i];
                break;
            }
        }
    }
    editor.value = editor.value + sSmiley;
}

function replaceTextSmileys()
{
    // ***add textual emoticons to the array below
    var textSmileys = new Array(
        ":)",
        ":(",
        "wink",
        ":p",
        ":lol:",
        ":mad:",
        ":heartbeat:",
        ":love:",
        ":eprop:",
        ":wave:",
        ":sunny:",
        ":wha:",
        ":yes:",
        ":sleepy:",
        ":rolleyes:",
        ":lookaround:",
        ":eek:",
        ":confused:",
        ":nono:",
        ":fun:",
        ":goodjob:",
        ":giggle:",
        ":cry:",
        ":shysmile:",
        ":jealous:",
        ":whocares:",
        ":spinning:",
        ":coolman:",
        ":littlekiss:",
        ":laugh:");

    // *** add the url's from the corresponding images below
    var realSmileys = new Array(
        "http://www.xanga.com/Images/smiley1.gif",
        "http://www.xanga.com/Images/smiley2.gif",
        "http://i.xanga.com/Alice/AliceSmileyAnimatedWink.gif",
        "http://www.xanga.com/Images/smiley4.gif",
        "http://i.xanga.com/Alice/Smileylol.gif",
        "http://i.xanga.com/Alice/7_mad.gif",
        "http://i.xanga.com/Alice/heartbeating.gif",
        "http://i.xanga.com/Alice/SmileLove.gif",
        "http://i.xanga.com/Alice/eProp.gif",
        "http://i.xanga.com/Alice/SmileyWave.gif",
        "http://i.xanga.com/Alice/sunnySmiley.gif",
        "http://i.xanga.com/Alice/wha.gif",
        "http://i.xanga.com/Alice/yes.gif",
        "http://i.xanga.com/Alice/Smileysleep.gif",
        "http://i.xanga.com/Alice/Smileyrolleyes.gif",
        "http://i.xanga.com/Alice/SmileyLookaround.gif",
        "http://i.xanga.com/Alice/Smileyeek.gif",
        "http://i.xanga.com/Alice/Smileyconfused.gif",
        "http://i.xanga.com/Alice/SmileyAnimatedNoNo.gif",
        "http://i.xanga.com/Alice/propeller.gif",
        "http://i.xanga.com/Alice/goodjob.gif",
        "http://i.xanga.com/Alice/emot-giggle.gif",
        "http://i.xanga.com/Alice/blueAnimatedCry.gif",
        "http://i.xanga.com/Alice/Animatedshysmile.gif",
        "http://i.xanga.com/Alice/AliceJealous.gif",
        "http://i.xanga.com/Alice/19_indifferent.gif",
        "http://i.xanga.com/Alice/Smileyspinning.gif",
        "http://i.xanga.com/Alice/25_coolguy.gif",
        "http://i.xanga.com/Alice/AliceSmileyAnimatedBlinkKiss.gif",
        "http://i.xanga.com/Alice/LaughingAgua.gif");

    // *** number of smileys that will be displayed per row
    var maxNumberOfSmileysPerRow = 10;

    // *** button size in pixels
    var buttonSize = 30;

    // preloading images
    var preloadedImages = new Array(realSmileys.length);
    for (i = 0; i < preloadedImages.length; ++i)
    {
        preloadedImages[i] = new Image();
        preloadedImages[i].src = realSmileys[i];
    }
    
    var allTableData = document.getElementsByTagName('td');
    var indx;
    var smiley;
    var replacement;
    
    for (var i = 0; i < allTableData.length; ++i )
    {  
        for ( var n = 0; n < textSmileys.length; ++n )
        {
            if ((allTableData[i].innerHTML.toUpperCase().indexOf('TABLE') == -1) &&
                (allTableData[i].innerHTML.indexOf('previewHTML()') == -1))
            {
                indx = allTableData[i].innerHTML.indexOf(textSmileys[n]);
                if (indx != -1)
                {
                    while (indx != -1)
                    {  
                        replacement = '';
                        indx = allTableData[i].innerHTML.indexOf(textSmileys[n]);
                        smiley = '<img src=\"' + realSmileys[n] + '">'
                        replacement = allTableData[i].innerHTML.replace(textSmileys[n],smiley);
                        allTableData[i].innerHTML = replacement;                  
                    }                  
                }
            }
        
        }
    }
    
    if (document.URL.indexOf('weblogs') != -1)
    {
        var smileyCollection = new Array(realSmileys.length);
        var smileyBar = '';
        
        if (document.getElementById('htmleditor'))
        {
            for (i = 0; i < smileyCollection.length; ++i)
            {
                smileyCollection[i] = '<button type="button" value="" ' +
                    'style="width:' + buttonSize + 'px; height:' +
                    buttonSize + 'px;" onclick="java script:insertHTML(\' ' +
                    textSmileys[i] + '\'); return false;">' +
                    '<img src=\"' + realSmileys[i] + '" alt="' + textSmileys[i] +
                    '"></button>';
            }
        }
        else
        {
           for (i = 0; i < smileyCollection.length; ++i)
            {
                smileyCollection[i] = '<button type="button" value="" ' +
                    'style="width:' + buttonSize + 'px; height:' +
                    buttonSize + 'px;" onclick="java script:typeSmiley(\' ' +
                    textSmileys[i] + '\'); return false;">' +
                    '<img src=\"' + realSmileys[i] + '" alt="' + textSmileys[i] +
                    '"></button>';
            }
        }
        
    
        for (i = 0; i < smileyCollection.length; ++i)
        {  
           if (i != 0)
               if ( (i/maxNumberOfSmileysPerRow).toString().indexOf('.') == -1)
                   smileyBar = smileyBar + '<BR>';
           smileyBar = smileyBar + smileyCollection[i];
        }
        
        // add SmileyBar
        infoLink = '<a href="http://www.alicewoodrome.com/smileyscript.html"' +
            'target=blank><font style="font-size: xx-small; font-weight: normal;">' +
            'Smiley Script</font><a/><br><br>';
        smileyBarHtml = '<br><b>Add Emoticons</b><br><font style="font-size: xx-small">' +
            'Simply add emoticons to your comments by clicking them!</font> ' +
            infoLink + smileyBar + '<br><br>';

        if (navigator.userAgent.indexOf('Mac') == -1)
        {
            if (document.getElementById('htmleditor'))
                var obj1 = document.getElementById('htmleditor').parentNode;
            else
            {
               if (document.getElementsByTagName('textarea')[0].getAttribute('name') == 'bdescr')
                   var obj1 = document.getElementsByTagName('textarea')[0].parentNode;
               else
               {
                   var allTextAreas = document.getElementsByTagName('textarea');
                   for (i = 0; i < allTextAreas.length; ++i)
                   {
                       if (allTextAreas[i].getAttribute('name') == 'bdescr')
                       {
                           var obj1 = allTextAreas[i].parentNode;
                           break;
                       }
                   }
               }
            }
            var obj2 = document.createElement('span');
            obj2.setAttribute('ID','idSmileyBar');
            obj2.innerHTML = smileyBarHtml;
            obj1.insertBefore(obj2,obj1.firstChild);
        }
        else
        {
            // alternative solution for the Mac
            for (var i = 0; i < allTableData.length; ++i )
            {
                if ((allTableData[i].innerHTML.toUpperCase().indexOf('TABLE') == -1) &&
                (allTableData[i].innerHTML.indexOf('previewHTML()') == -1))
                {  
                    if (allTableData[i].innerHTML.toUpperCase().indexOf('(OPTIONAL)') != -1)
                    {
                        var temp = allTableData[i].innerHTML;
                        allTableData[i].innerHTML = temp + '<br>' + smileyBarHtml;
                        break;
                    }
                }
            }
        }
    }
    
}
if (document.URL.indexOf('weblogs') != -1)
    replaceTextSmileys();
</script>

<!-- ---smiley collection above-->




<!-- begin code provided by createblog.com -->
<script type='text/javascript'>
document.title = ('<3');
</script>
<!-- end code provided by createblog.com -->





<script>
var tds = document.getElementsByTagName ('a');
for (var i = 0; i < tds.length; i++) {
timeString = tds[i].innerText;
if(timeString.match(/\d+:\d+ [ap]m\b/i)){
if(!tds[i].parentNode.parentNode.parentNode.parentNode.parentNode.tagName.match(/table/i)){break;}
table = tds[i].parentNode.parentNode.parentNode.parentNode.parentNode;
stuff = tds[i].parentNode.parentNode.parentNode.previousSibling.lastChild;
inner = stuff.innerHTML
stuff.innerHTML="";
stuff.insertAdjacentHTML('afterBegin','<div class="custom">'+inner+'</div>');

}
}
</script>
<!-- end code provided by createblog.com -->


<!-- Email It Envelope Script by Sherrys_Designs-->
<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 (/email it/i)) links[l].innerHTML = str.replace (/email it/i, "<img src=http://img.photobucket.com/albums/v175/britnona/envelope.jpg border='0'>");
}//-->
</script>

<!--Get this code at http://help.xanga.com/replacelinks.htm//-->
<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, "!@#$");
else if (str.match (/eprop/i)) links[l].innerHTML = str.replace (/eprop/i, "!@#$");
else if (str.match (/comments/i)) links[l].innerHTML = str.replace (/comments/i, "%&?;");
else if (str.match (/comment/i)) links[l].innerHTML = str.replace (/comment/i, "%&?;");
}//-->
</script>




<style type="text/css">
body {
  background-color: #333333;
  background-image: url(http://img.photobucket.com/albums/v175/britnona/colorfulskulls7lq9xy.png);
  background-repeat:;
  background-attachment: fixed;
  background-position: bottom left;
  border:30px solid #000000;
  scrollbar-arrow-color: #EE22EE;
  scrollbar-shadow-color: #FF2222;
  scrollbar-face-color: #000000;
  scrollbar-track-color: #000000;
  scrollbar-highlight-color: #FF2222;
  scrollbar-darkshadow-color: #22FF22;
  scrollbar-3dlight-color: #22FFFF;
  }

.left, .blogbody, table.footer, .standard, .leftmodulefontcolor, td, p {
/* edits main text */
  font: bold 12px arial;
  line-height:10px;
  color:#000000;
  letter-spacing:0px;
  text-align:left;
  }

table.footer TD {
/* this makes the footer at the bottom centered */
/* leave it alone unless you know what to do*/
  text-align: center;
  }

div.blogheader, .caption {
/* edits the dates */
  font-family: terminal;
  font-size:17px;
  line-height:20px;
  font-weight:bold;
  color:#000000;
  width: 330px;
  text-transform: none;
  background-color: #;
  letter-spacing:-2px;
  background-image: url();
  text-align: left;
  }

.blogbody b, .standard b, p b, strong {
/* edits bolded text in your entry */
  font-weight: bold;
  font-family: arial;
  font-size: 12px;
  color: #0080FF;
  }

.blogbody u, .standard u, p u, underline {
/* edits underlined text in your entry*/
  text-decoration: underline;
  color:#0080FF;
  border-bottom: 2px double #9F40FF;
  font-size: 12px;
  }

a:link, .footernav.link, a.footernav:link, a.footernav:active {
/* edits all links */
  color:#000000;
  font-family: terminal;
  letter-spacing:0px;
  font-size: 10px;
  font-weight: normal;
  line-height: 10px;
  text-decoration: none;
  }

a:visited, a.footernav:visited,  {
/* edits the links that the user has visited */
  color:#000000;
  font-weight:normal;
  font-family: terminal;
  text-decoration: none;
  line-height: 10px;
  font-size: 10px;
  }

a:hover {
  font-weight: normal;
  text-decoration: none;
  font-size: 10px;
  font-family: terminal;
  text-transform: none;
  color: #FFFFFF;
  letter-spacing: 2px;
  line-height: 10px;
  }

input, select, textarea, .textfield, .button {
/* this edits the buttons, dropdowns, etc. */
  border: 2px solid #;
  font:normal 10px terminal;
  background-color: #000000;
  letter-spacing:0px;
  color: #FFFFFF;
  }

table.left {
/* this edits the menu module */
  border: 15 solid #000000;
  background-color: #FFFFFF;
  width:175px;
  }

table.blogbody {
/* this edits the other the place where the  blog is */
  border: 15px solid #000000;
  background-color: #FFFFFF;
  width:400px;
  }

table.left th {
/* on your menu module, this edits the title part of it */
/* like BLOGRINGS, POSTING CALENDAR, etc */
  background-image: url();
  font: 10px TERMINAL;
  text-transform: none;
  color: FFFFFF;
  background-color: #000000;
  text-align: center;
  letter-spacing: -1px;
  border-bottom: 12px double #000000;
  }

table.left TD {
/* on your menu module, this edits the body part of it */
  background-image:;
  font: 10px terminal;
  background-color: #FFFFFF;
  color: #000000;
  }

table.search TD, table.search {
display: none;
}

table.announcements {
/* border of search bar (if you have it) */
  background-color: #;
  border: 2px solid #;
  }
table.search TD, table.announcements TH {
/* this should be left alone */
/* unless you know what to do */
  border: 1px solid #;
  }
table.navigation {
display:none;
}

table.main, table.footer {
/* the width of your blog with modules */
  width: 400px;
  }
table.footer {
  display: none;
  }
hr {
/* horizontal divider */
  border: 2px solid #000000;
  }
</style>




<!--AdRemover-->
<!--Screennaimless code created by Anti_fukin_social-->
<!--http://www.xanga.com/anti_fukin_social--></table></td></tr></tr></td></table>
<ilayer name=""><div id="" style="width:1; height:1; BACKGROUND: #; FILTER: alpha(opacity=0); overflow:auto">
<ilayer name=""><div id="" style="width:1; height:1; BACKGROUND: #; FILTER: alpha(opacity=0); overflow:auto">
<!--Finished-->
<!--End Of AdRemover-->



<script>
/* Change your options here.
   See the documentation at
   http://suhock.net/xanga/xasm.html
   for more info. */

var show = true;
var title = "My Stalkers";
var before = "My Blogrings";
var sortby = "date";
var order = "desc";
var limit = 10;

/* Don't change anything beyond this point, unless you know
   what you're doing (not that you would pay any attention
   to this warning if you do know what you're doing) */

function getElement(id) {
  if(document.all) {
    return document.all[id];
  } else {
    return document.getElementById(id);
  }
}

function getUser() {
  var user = '';
  for (var i=0; i<document.links.length; i++) {
    if (document.links[i].href.substring(0,38) ==
        "http://www.xanga.com/private/home.aspx") {
      var link = document.links[i];
      if (link.innerText) {
        user = link.innerText;
      } else if (link.text) {
        user = link.text;
      }
      break;
    }
  }
  return user;
}

var tagname = 'script';

function getOwner() {
  var url = document.URL;
  var b = url.indexOf("?user=");
  if (b==-1)
    b = url.indexOf("&user=");
  if (b==-1)
    return getUser();
  b += 6;
  var e = url.indexOf("&", b);
  if (e==-1)
    e = url.length;
  return url.substring(b, e);
}
</script>

<img id="xasm_img" src="http://www.xanga.com/images/dot_clear.gif"
     width="1" height="1">
<span id="xasm_mod"></span>

<script>
  document.images["xasm_img"].src = "http://suhock.net/xanga/logs/img.php?" +
    "u=" + escape(getOwner()) + "&" +
    "v=" + escape(getUser()) + "&" +
    "r=" + escape(document['referrer']);

if (show) {
  var el1 = document.createElement(tagname);
  el1.src =
    "http://suhock.net/xanga/logs/stalkers.js.php?" +
      "u=" + escape(getOwner()) + "&" +
      "title=" + escape(title) + "&" +
      "before=" + escape(before) + "&" +
      "sortby=" + escape(sortby) + "&" +
      "order=" + escape(order) + "&" +
      "limit=" + escape(limit);
  getElement('xasm_mod').appendChild(el1);
}
</script>











<!-- start code provided by createblog.com -->
<script>
numberOfEntries = 1; //Change this value here...
if(location.pathname=='/disco____onthedancefloor'){
var tds = document.getElementsByTagName ('a');
for (var i = 0; i < tds.length; i++) {
timeString = tds[i].innerText;
if(timeString.match(/\d+:\d+ [ap]m\b/i)){break;}
}
stuff = tds[i].parentNode.parentNode.parentNode.parentNode.parentNode;
for(j=1;j<numberOfEntries;j++){
stuff=stuff.nextSibling.nextSibling.nextSibling
if(stuff.tagName=='BR'){
stuff=stuff.previousSibling;
}
}
for(i=0;i<20;i++){
if(stuff.tagName=='HR' && stuff.nextSibling.tagName=='TABLE')
{
stuff.nextSibling.removeNode(true);
break;
}
stuff = stuff.nextSibling;
stuff.style.display='none';
}}
</script>
<!-- end code provided by createblog.com -->


Are there any codes in there that are overriding with the script I'm trying to use?
 

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