|
Post by eveready on Nov 15, 2009 8:29:15 GMT -8
Can you make it so just the admin can see it, then? Then I will still be able to know who made the posts.
Your fix above worked, and it all looks good.
|
|
|
Post by Wormopolis on Nov 15, 2009 9:24:12 GMT -8
replace:
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>"+(lstpstCell.getElementsByTagName('a')[0] && lstpstCell.getElementsByTagName('a')[0].className.match(/group(1|2|3)/) ? "Last post: "+lstpstCell.innerHTML : "" )+"</td></tr></table>";
with:
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>"+(pb_username.match(stafflist) ? "Last post: "+lstpstCell.innerHTML : "" )+"</td></tr></table>";
and at the top, under the variable for the announce icon, add this variable: var stafflist=/admin|wormopolis|user2/;
|
|
|
Post by Wormopolis on Nov 15, 2009 9:24:43 GMT -8
I just saw a weird glitch when logged in as user... give me a bit.
|
|
|
Post by eveready on Nov 15, 2009 10:02:28 GMT -8
Correct me if I'm wrong, but for the last post stuff, isn't the code hiding the entire last post information rather than just who posted it? Can the date and time be separated from the poster with only the poster being hidden? Maybe that's the glitch you're talking about, I don't know.
|
|
|
Post by Wormopolis on Nov 15, 2009 15:50:45 GMT -8
no.. the glitch was actually when a guests viewed and Im still not sure what was causing it, but I patched around it.
seperating the "by username" is possible but annoying as hell.
|
|
|
Post by Wormopolis on Nov 15, 2009 16:05:20 GMT -8
updated script:
<script type="text/javascript"> <!-- // eveready thread remodel // by Wormopolis // keep header intact
if (!location.href.match(/everthread/)) {
var statsicon="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/morestatsicon.gif"; var announceIcon="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/exclm_small.png"; var stafflist=/admin|wormopolis|danger/; //people who can see last post info
for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) { if (tds.width=='5%' && tds.nextSibling.width=='5%' && tds.nextSibling.nextSibling.width!='5%' && !tds.nextSibling.nextSibling.id.match(/watcher/) && tds.parentNode.rowIndex!=0) { holdrow=tds.parentNode.rowIndex; 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; subCell.id='watcher'+i; subCell.innerHTML=subCell.innerHTML.replace(/Announcement:/,'<img src="'+announceIcon+'" border="0">'); 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.innerHTML=temp2.innerHTML.replace(/Pages:/,''); 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: "+(pb_username.match(stafflist) ? lstpstCell.innerHTML : lstpstCell.innerHTML.split(/<br>/i)[0] )+"</td></tr></table>"; subCell.appendChild(subDiv); subCell.appendChild(statDiv); nwcl=lstpstCell.parentNode.insertCell(-1);
if (holdrow==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.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; 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>
but you are going to need to go back and do all those edits again. I cant test the code with your edits. just the edits from the first page of this thread should suffice. the other edits I think I already incorporated.
|
|
|
Post by eveready on Nov 16, 2009 4:01:54 GMT -8
OK, I did all of that. I think everything is order, except in the 'subject' bar where it said 'stats' before, now it has one of the flip images there instead. Unless I messed something up when I was making the edits.
|
|
|
Post by Wormopolis on Nov 16, 2009 5:56:01 GMT -8
part of that fix for guests had me changing a line you needed to edit.
FIND THIS:
if (holdrow==1)
CHANGE TO:
if (holdrow==2)
|
|
|
Post by eveready on Nov 16, 2009 6:23:41 GMT -8
That'll about do it, right?
Looks good on my end.
|
|
|
Post by Wormopolis on Nov 16, 2009 8:34:06 GMT -8
that should be it!
Im marking this done. I like this remodel and am thinking of using a slightly modified version on WC. Your name will remain in the header.
|
|
|
Post by eveready on Nov 16, 2009 9:31:57 GMT -8
Alright..... thanks a bunch. Really appreciate you walking me through everything.
p.s. I don't need any credit. lol
|
|
|
Post by Wormopolis on Nov 16, 2009 9:35:10 GMT -8
It was your concept, and it was more then just a small change to something. Your name deserves to be attached to it.
|
|