|
Post by Wormopolis on Jun 13, 2009 16:09:36 GMT -8
Browser Tested: IE and FF placement: main footer auto-collapses the posts in the "view recent" function from main board and puts expand/collapse buttons on the right. buttons can be customized with HTML/images. since author name would normally be hidden, added in a variable that would repeat author name in the collapsed view. code: <script type="text/javascript"> <!-- // collapsed/expandable posts in view recent // v 1.5 // by Wormopolis - wormocodes.proboards.com // 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
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>
Preview: HERE
|
|
|
Post by Wormopolis on Oct 23, 2009 18:03:27 GMT -8
update: 2 new variables to hide result count and eliminate spacing between results. (request)
|
|
graesonbelinda
Not New Member
[Sj1:0]
Posts: 6
graesonbelinda said 0 great things
|
Post by graesonbelinda on Feb 9, 2010 12:30:57 GMT -8
I copied this code and put it in my main footer in several different places, but it didn't work any any of those places. Here is my forum poetryjunction.proboards.com/index.cgiWhere do I need to put it??? I just need some help please! Thank you, Belinda
|
|
|
Post by Wormopolis on Feb 9, 2010 16:14:39 GMT -8
I suggest putting it near the top of main footer. currently I do not see it in your footers at all... however I do see a stray <script> tag in there above the "staff in info center" code.
if you put this code back into your main footer I can see if its conflicting with another code.
|
|
graesonbelinda
Not New Member
[Sj1:0]
Posts: 6
graesonbelinda said 0 great things
|
Post by graesonbelinda on Feb 9, 2010 21:20:54 GMT -8
I okay, I will put it back in. I am the new owner of the forum. I am not sure who did all of the previous coding for the forum. I have tried to clean them up a little bit. Some codes were absolutely awful. I know some coding, but not like you, Todge and others. I will add it and if you could, would you please help me in any way possible?
Belinda
|
|
graesonbelinda
Not New Member
[Sj1:0]
Posts: 6
graesonbelinda said 0 great things
|
Post by graesonbelinda on Feb 9, 2010 21:25:53 GMT -8
Oh, if you notice any codes that look really bad, please let me know. I can use all the help I can get. Belinda
|
|
|
Post by Wormopolis on Feb 9, 2010 21:39:11 GMT -8
I see the code is workin in both IE and FF. do you still not see a difference?
you might want to go find a clean copy of this code: // Advance PM Menu v1 by CD // Do not redistribute without permission
|
|
graesonbelinda
Not New Member
[Sj1:0]
Posts: 6
graesonbelinda said 0 great things
|
Post by graesonbelinda on Feb 10, 2010 7:39:08 GMT -8
I see it now, thank you so much. I was wondering exactly the code you have mentioned above does?? If I can't find a clean copy, do you have a code similar to it that I could use?? Thank you very much for all of your help. It is greatly appreciated.
Belinda
|
|
graesonbelinda
Not New Member
[Sj1:0]
Posts: 6
graesonbelinda said 0 great things
|
Post by graesonbelinda on Feb 10, 2010 12:20:21 GMT -8
I have another important question. How could I make a staff board on the left side of the forum underneath my chatbox--well, if you are not a member, you won't be able to see the chatbox. I can give you my old login info if that would help you. I have my old member login info and then I have my main owner admin info. I will take any help you can give. This might be a code you already have. I looked for a bit, but didn't get to get through them all. Once again, thank you for everything.
Belinda
|
|
|
Post by Wormopolis on Feb 10, 2010 23:36:13 GMT -8
I see it now, thank you so much. I was wondering exactly the code you have mentioned above does?? If I can't find a clean copy, do you have a code similar to it that I could use?? Thank you very much for all of your help. It is greatly appreciated. Belinda I am not sure where that code came from to be honest. You might check PBsupport to see if its in that database. There are a few errors it reported which is why I said you should get a clean verision. it looks like some editing was accidentally done to it. Since I dont know what the original code looked like, Im not sure what it would take to fix it.
|
|
|
Post by Wormopolis on Feb 10, 2010 23:40:39 GMT -8
I have another important question. How could I make a staff board on the left side of the forum underneath my chatbox--well, if you are not a member, you won't be able to see the chatbox. I can give you my old login info if that would help you. I have my old member login info and then I have my main owner admin info. I will take any help you can give. This might be a code you already have. I looked for a bit, but didn't get to get through them all. Once again, thank you for everything. Belinda if you are just looking to add in a box, simply just make a <DIV> element that follows the <span id="hiddencontent"> element that you put your cbox in. in the DIV, you can have whatever content you want.
|
|
graesonbelinda
Not New Member
[Sj1:0]
Posts: 6
graesonbelinda said 0 great things
|
Post by graesonbelinda on Feb 11, 2010 9:58:27 GMT -8
I left you a message in my chat box. I told you of course you can see--you are a computer genius! Too add my staff's names, is it just the coding like I do in my news fader, etc. Thanks, Belinda
|
|
|
Post by Wormopolis on Feb 12, 2010 0:37:34 GMT -8
Yep. Its just HTML. I normally dont do HTML requests, but if you need help with it, make a new thread in requests and keep this thread focused on the collapse code.
|
|