|
Post by eveready on Nov 8, 2009 2:01:09 GMT -8
I've got a thread remodel to throw at you for you to consider. Basically, what I would like is for both icon columns on the left to be removed, as well as the 'started by', 'views', 'replies', and 'last post' columns. Currently the '[pages 1,2] info is under the thread title, and I would like it to be directly right of the thread title. This stuff is easy enough, I'm sure. However, I would also like a new column added on the far right called 'Stats'. This column would contain an image. When the image is clicked, the cell with the thread title in it will 'flip' (reveal another layer, I guess) and show the 'started by', 'views', 'replies', and 'last post' stats that were previously hidden (as in the image below). Example... before flip (the second thread): After flip: To throw a wrench in things (perhaps not) I use side tables, as well as two other thread codes that you can find in my headers/footers 1) a code that inserts an image in the thread title cell, aligned right that when you click it, it opens the thread in a new window, and 2) a new icon column added that displays an image marking/categorizing the thread. When you click on the images at the top of the thread, all irrelevant threads are hidden. Not sure if any of these will have an effect. Anyways, let me know if your interested. hockeytest.proboards.com/index.cgi?board=general
|
|
|
Post by Wormopolis on Nov 8, 2009 4:08:43 GMT -8
I am very intrigued.
and the sorting code is cool.. if only it could get results from later pages. I think I remember someone requesting a code like this on support and they got mad at me when I kept telling them it would only fetch 1 page worth of topics.
|
|
|
Post by eveready on Nov 8, 2009 4:39:34 GMT -8
I think I remember someone requesting a code like this on support and they got mad at me when I kept telling them it would only fetch 1 page worth of topics. Wasn't me. lol You're a glutton for punishment.
|
|
|
Post by Wormopolis on Nov 8, 2009 10:24:20 GMT -8
|
|
|
Post by eveready on Nov 9, 2009 3:40:26 GMT -8
Looks great and that was really fast. I imagine the hard part will be getting the codes to work together.
|
|
|
Post by Wormopolis on Nov 9, 2009 3:57:20 GMT -8
actually.. If you run my code AFTER theirs, it might not be that bad. assuming they didnt do anything really crazy, it might just be changing a couple of numbers.
|
|
|
Post by Wormopolis on Nov 9, 2009 4:11:38 GMT -8
thread in new window code might get spooked.. I will have to see what happens.
<script type="text/javascript"> <!-- // eveready thread remodel // by Wormopolis // keep header intact
if (true) {
var statsicon="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/morestatsicon.gif";
for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) { if (tds.width=='5%' && tds.nextSibling.width=='5%' && !tds.getElementsByTagName('input')[0] && tds.parentNode.rowIndex!=0) { moddy=0; overlord=tds.parentNode.parentNode; if (tds.previousSibling) { chkCell=tds.previousSibling; moddy=1; overlord=overlord.parentNode; } activCell=tds; categCell=tds.nextSibling; subCell=categCell.nextSibling; startCell=subCell.nextSibling; replCell=startCell.nextSibling; viewsCell=replCell.nextSibling; lstpstCell=viewsCell.nextSibling; subDiv=document.createElement('div'); statDiv=document.createElement('div'); statDiv.style.display="none"; if (subCell.getElementsByTagName('font').length>1) { temp=document.createTextNode(' '); temp2=subCell.getElementsByTagName('font')[1]; temp2.replaceChild(temp, temp2.firstChild); } while (subCell.childNodes.length) subDiv.appendChild(subCell.firstChild); statDiv.innerHTML="<table width='100%'><tr><td width='34%'>Started by: "+startCell.innerHTML+"</td><td width='33%'>replies: "+replCell.innerHTML+"</td><td width='33%'>views: "+viewsCell.innerHTML+"</td></tr><tr><td colspan=3>Last post: "+lstpstCell.innerHTML+"</td></tr></table>"; subCell.appendChild(subDiv); subCell.appendChild(statDiv); nwcl=lstpstCell.parentNode.insertCell(-1); nwcl.className='catbg'; nwcl.onclick=function() {sbcl=this.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling; hold=sbcl.firstChild.style.display; sbcl.firstChild.style.display=sbcl.firstChild.nextSibling.style.display; sbcl.firstChild.nextSibling.style.display=hold;}; nwimg=document.createElement('img'); nwimg.border=0; nwimg.src=statsicon; if (tds.parentNode.rowIndex==1) { grab=subCell.getElementsByTagName('font')[0].cloneNode(true); grab.firstChild.firstChild.firstChild.nodeValue="Stats"; nwcl.appendChild(grab); nwcl.className='catbg'; } else { nwcl.className='windowbg'; nwcl.appendChild(nwimg); } nwcl.width="4%"; nwcl.align="center"; startCell.style.display =replCell.style.display =viewsCell.style.display =lstpstCell.style.display =activCell.style.display =categCell.style.display ="none"; overlord.rows[0].cells[0].colSpan = overlord.rows[overlord.rows.length-1].cells[0].colSpan =(2+moddy); if (moddy==1) overlord.rows[overlord.rows.length-2].cells[0].colSpan =(2+moddy); } }
} // --> </script>
|
|
|
Post by eveready on Nov 9, 2009 6:12:43 GMT -8
Yeah, it's a little whack. I tried it in every position, but it showed up the same. There seems to be a colspan issue or something. The team icon column is missing and the last post column is still there. And the stats links and the team icon links on the top don't function. Oh, and there are five threads, but 7 stat images. Other than that it's terrific. And the thread in new window seems to work fine!
|
|
|
Post by Wormopolis on Nov 9, 2009 6:49:43 GMT -8
I knew the code wouldnt work out of the box. I wrote it without your previous mod in mind. I needed to see it on your forum with your other 2 codes running in order to see what needs to be modded.
|
|
|
Post by Wormopolis on Nov 9, 2009 7:02:45 GMT -8
change this:
if (true) {
to this:
if (!location.href.match(/everthread/)) {
|
|
|
Post by eveready on Nov 9, 2009 9:34:55 GMT -8
changed
|
|
|
Post by Wormopolis on Nov 10, 2009 16:46:28 GMT -8
change this:
startCell=subCell.nextSibling;
to this:
startCell=subCell.nextSibling.nextSibling;
and change this:
2+moddy
to this:
3+moddy
(2 spots for that one)
|
|
|
Post by eveready on Nov 10, 2009 19:55:48 GMT -8
Ok, I made those changes.
|
|
|
Post by Wormopolis on Nov 10, 2009 20:47:58 GMT -8
getting closer (looks normal again)
change this:
nwcl.onclick=function() {sbcl=this.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling; hold=sbcl.firstChild.style.display; sbcl.firstChild.style.display=sbcl.firstChild.nextSibling.style.display; sbcl.firstChild.nextSibling.style.display=hold;};
to this:
nwcl.onclick=function() {sbcl=this.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling; hold=sbcl.firstChild.style.display; sbcl.firstChild.style.display=sbcl.firstChild.nextSibling.style.display; sbcl.firstChild.nextSibling.style.display=hold;};
this is the hard part about multiple codes affecting the same thing... it takes some tweaking to make them work with each other. but we will get it.
|
|
|
Post by Wormopolis on Nov 10, 2009 20:51:52 GMT -8
also change this:
if (tds.parentNode.rowIndex==1) {
to this:
if (tds.parentNode.rowIndex==2) {
|
|