View Full Version : # of blog entries/modified xangas


cheesysmookums
01-10-2005, 03:28 AM
I have the script to limit the number of blog entries per page but does it work on xangas that aren't originals? because I have customized modules and it's not working? Is that the reason why? Here's the script btw ..

<script>
// By: Paul Chen (Kaiyotee)
// Blogring.net

numberOfEntries = 2; //Change this value here...

if(location.pathname=='/home.aspx'){
var tds = document.getElementsByTag Name ('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.pa rentNode.parentNode.paren tNode;
for(j=1;j<numberOfEntries;j++){
stuff=stuff.nextSibling.n extSibling.nextSibling
if(stuff.tagName=='BR'){
stuff=stuff.previousSibli ng;
}
}
for(i=0;i<20;i++){
if(stuff.tagName=='HR' && stuff.nextSibling.tagName =='TABLE')
{
stuff.nextSibling.removeN ode(true);
break;
}
stuff = stuff.nextSibling;
stuff.style.display='none ';
}}
</script>

vickfan77
01-10-2005, 03:41 AM
where do you enter the code, and if i just copy and paste it and take out the // things should it work?

JiNgLeBeLLz77
01-10-2005, 04:07 AM
no take the // out. put it as the first code in your website stats.

vickfan77
01-10-2005, 10:21 PM
wow idk if im HTML illiterate or what, but i cant seem to get this to work, and advice?

this is how i put it in:

<script>

numberOfEntries = 1;
if(location.pathname=='/home.aspx'){
var tds = document.getElementsByTag Name ('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.pa rentNode.parentNode.paren tNode;
for(j=1;j<numberOfEntries;j++){
stuff=stuff.nextSibling.n extSibling.nextSibling
if(stuff.tagName=='BR'){
stuff=stuff.previousSibli ng;
}
}
for(i=0;i<20;i++){
if(stuff.tagName=='HR' && stuff.nextSibling.tagName =='TABLE')
{
stuff.nextSibling.removeN ode(true);
break;
}
stuff = stuff.nextSibling;
stuff.style.display='none ';
}}
</script>

JiNgLeBeLLz77
01-11-2005, 12:22 AM
oops. sorry i meant *DON'T* take the // out. just put it as the first code in website stats :stickout: my mistake =\ sorry.

cheesysmookums
01-11-2005, 12:45 AM
Yeah I tried it and it didn't work ... ?

JiNgLeBeLLz77
01-11-2005, 10:53 PM
this is the same code... but it should work... just in case the forum put spaces in it or whatever.

http://www.createblog.com/forums/index.php?showtopic=42673