Auburn
Not New Member
Posts: 34
Auburn said 0 great things
|
Post by Auburn on Oct 23, 2009 13:14:25 GMT -8
My forum: halloforigin.proboards.com/I really like this site's recent-posts code. I was just wondering if a variation of the code could be made where it also removes the spacing between each recent post? And also the "Result X out of Y" so that all posts mesh together just as threads in a board mesh. This is sorta what I mean: i33.tinypic.com/2qsbc3q.png
|
|
|
Post by Wormopolis on Oct 23, 2009 16:18:39 GMT -8
I will see what I can do!
|
|
|
Post by Wormopolis on Oct 23, 2009 21:30:10 GMT -8
code in database updated.
|
|
Auburn
Not New Member
Posts: 34
Auburn said 0 great things
|
Post by Auburn on Oct 24, 2009 13:40:01 GMT -8
Nice!! and I see that you've applied it to this forum also xD yay! thanks!
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Jan 1, 2010 6:36:54 GMT -8
Hi and thanks for your codes, I've started adding some of the library codes to my forum. Re this code. Is it possible to conditionally call it please? possibly with a parameter from the call so that the user has the choice of two buttons to view the last XX posts expanded form or in summary form activating this procedure. Appreciate any suggestion. Sav (Chris.) Link to my forum
|
|
|
Post by Wormopolis on Jan 1, 2010 13:23:26 GMT -8
wouldn't be difficult at all. it would basically require wrapping the code in a location check and putting something in the url: <script type="text/javascript"> <!-- // collapsed/expandable posts in view recent // v 1.5 // by Wormopolis - [url]wormocodes.proboards.com[/url] // Do not repost - keep header intact
var keepAuthorName=true; //move author name up so its visible when collapsed var keepSpacing=false; var keepResultCount=false;
var expandlink= "<font size=1>EXPAND</font>"; //can use HTML if you want to customize or make image var collapselink= "<font size=1>COLLAPSE</font>"; //can use HTML if you want to customize or make image
// no need to edit below if (location.href.match(/docollapse/)) { document.write("<div id='tempdiv' style='cursor:pointer' onclick='if (this.parentNode.parentNode.previousSibling.style.display==\"none\") {this.parentNode.parentNode.previousSibling.style.display=\"\"; this.parentNode.parentNode.nextSibling.style.display=\"\"; this.innerHTML=\""+collapselink+"\"; } else { this.parentNode.parentNode.previousSibling.style.display=\"none\"; this.parentNode.parentNode.nextSibling.style.display=\"none\"; this.innerHTML=\""+expandlink+"\"; }' style='display:none'></div>");
togLink=document.getElementById('tempdiv').cloneNode(true); togLink.style.display=""; togLink.innerHTML=expandlink; togLink.align="right"; for (tds=document.getElementsByTagName('td'), g=0; g<tds.length; g++) { if (tds[g].width=="20%" && tds[g].className=="catbg" && tds[g].innerHTML.match(/Author/)) { tds[g].nextSibling.appendChild(togLink.cloneNode(true)); tds[g].parentNode.previousSibling.style.display="none"; tds[g].parentNode.nextSibling.style.display="none"; pTable=tds[g].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; if (!keepSpacing) pTable.previousSibling.style.display = pTable.previousSibling.previousSibling.previousSibling.style.display = "none"; if (!keepSpacing && !pTable.previousSibling.previousSibling.previousSibling.previousSibling.nodeName.match(/table/i)) pTable.previousSibling.previousSibling.previousSibling.previousSibling.style.display ="none"; if (!keepResultCount) pTable.previousSibling.previousSibling.style.display = "none";
if (keepAuthorName) { auth = tds[g].parentNode.nextSibling.firstChild.getElementsByTagName('a')[1].nextSibling.cloneNode(true); tds[g].appendChild(document.createElement('br')); tds[g].appendChild(auth); if (auth.nodeName.match(/text/i)) auth.nodeValue+=" (Guest)"; } } } }
// --> </script>
and if you make a link to it, add "&docollapse" to the end of the link: www.wormocodes.com/index.cgi?action=recent&docollapse
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Jan 1, 2010 23:48:15 GMT -8
Many thanks for the reply, out most of the day, will take a look this evening
Sav.
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Jan 2, 2010 13:01:48 GMT -8
Great stuff thanks
Sav
|
|
|
Post by Wormopolis on Jan 2, 2010 16:03:47 GMT -8
you are welcome!
|
|