|
Post by eveready on Nov 11, 2009 3:45:56 GMT -8
Ok, did it. Your code seems to be working perfectly now. The ialex icon code doesn't work though as clicking the top icons does nothing.
Thanks a lot for your time. There's no way I could figure any of this out on my own.
|
|
|
Post by Wormopolis on Nov 11, 2009 10:07:15 GMT -8
no problem. I suspected iAlex's code and mone would clash once I saw how he was doing his stuff. Im looking through his code currently to see which one of ours would be easier to edit to make both work.
I will solve it however.
|
|
|
Post by eveready on Nov 12, 2009 11:46:09 GMT -8
Just a heads up on something else I've discovered. When making a new thread, none of the buttons on the posting page function. For instance the 'post message' button, UBB buttons, the smileys, etc... they respond the same way as the team icons do in the thread list.
edit: Sorry, that's just in Google Chrome, which is what I've been using. I just tried firefox and the buttons were fine.
|
|
|
Post by Wormopolis on Nov 13, 2009 7:21:45 GMT -8
change this:
if (!location.href.match(/everthread/)) {
to this:
if (!location.href.match(/action=(modify)?post/) && !location.href.match(/everthread/)) {
|
|
|
Post by eveready on Nov 13, 2009 8:03:35 GMT -8
Turns out it wasn't your code. I stuck the 'remove "announcement:" from thread titles' code in there (from PBS) since I usually use it on my forums and it was causing the problems. Never had a similar problem on my other boards though. Anyways, I removed it. Maybe you'd consider throwing that function into this code?
|
|
|
Post by Wormopolis on Nov 13, 2009 14:42:50 GMT -8
I have the main function of this code working already, so before I add something new in there, lets get your other codes working with it first before we add that in.
I came up with an analogy for this.
Lets say you have a barbie doll. You ask me to make your barbie doll a really nice dress. however you already pulled off her arms and glued them to her head. I can make the dress for a normal doll.. but it takes a little more effort to make it work with mutant barbie.
|
|
|
Post by Wormopolis on Nov 14, 2009 3:34:23 GMT -8
I cant find a way to modify my code to make Alex's code work, so we are going to have to make a small change to his (which would still make his code work regardless of mine being there).
find this line:
if(iTd.item(i).className.match(/catbg|windowbg(2)?/) && iTd.item(i).width.match(/^4(8|3)%/) && iTd.item(i+1).firstChild && iTd.item(i+1).firstChild.nodeName=="IMG"){
change to:
if(iTd.item(i).className.match(/catbg|windowbg(2)?/) && iTd.item(i).width.match(/^4(8|3)%/) && iTd.nextSibling.firstChild && iTd.nextSibling.firstChild.nodeName=="IMG"){
|
|
|
Post by eveready on Nov 14, 2009 6:10:19 GMT -8
Ok, change has been made. No noticeable change yet though.
|
|
|
Post by Wormopolis on Nov 14, 2009 8:41:39 GMT -8
dammit. I missed something.
change this:
do{ if(iTd.item(i).className.match(/catbg|windowbg(2)?/) && iTd.item(i).width.match(/^4(8|3)%/) && iTd.nextSibling.firstChild && iTd.nextSibling.firstChild.nodeName=="IMG"){ iTd.item(i).parentNode.style.display=''; if(iImage_ID!="all" && iTd.item(i+1).firstChild.alt!=iImage_ID){ iTd.item(i).parentNode.style.display='none'; } } i--; }
to this:
do{ if(iTd.item(i).className.match(/catbg|windowbg(2)?/) && iTd.item(i).width.match(/^4(8|3)%/) && iTd.nextSibling.firstChild && iTd.nextSibling.firstChild.nodeName=="IMG"){ iTd.item(i).parentNode.style.display=''; if(iImage_ID!="all" && iTd.nextSibling.firstChild.alt!=iImage_ID){ iTd.item(i).parentNode.style.display='none'; } } i--; }
|
|
|
Post by eveready on Nov 14, 2009 10:10:30 GMT -8
You seem to have got it, as far as I can see. I'll keep checking to see if I can find any problems, but at first glance, it looks perfect. Great job!
Without sounding too greedy, perhaps you would be able to incorporate a couple other tweaks for the threads to be exactly the way I envisioned (mainly because I'm unsure of the compatibility of other codes out there).
1) I already mentioned I would like the 'Announcement:'' removed, but on further thought, I would like it to be changed to an image.
2) In the Last Post info, I am looking to have the 'by [username]' part removed, but not for staff.
3) When there is more than one page, I would like the 'pages' part removed so instead of [Pages: 1,2] it would just be [1,2].
I apologize for the extra demands, and hopefully I don't sound too demanding.
Thanks Wormo...... this code is coooooooool.
|
|
|
Post by Wormopolis on Nov 14, 2009 12:24:37 GMT -8
1. done
2. done
3. done
|
|
|
Post by Wormopolis on Nov 14, 2009 14:16:09 GMT -8
for 1:
add this:
var announceIcon="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/exclm_small.png";
under this:
var statsicon="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/morestatsicon.gif";
and then replace this:
subCell=categCell.nextSibling;
with this:
subCell=categCell.nextSibling; subCell.innerHTML=subCell.innerHTML.replace(/Announcement:/,'<img src="'+announceIcon+'" border="0">');
for 2:
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>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>"+(lstpstCell.getElementsByTagName('a')[0] && lstpstCell.getElementsByTagName('a')[0].className.match(/group(1|2|3)/) ? "Last post: "+lstpstCell.innerHTML : "" )+"</td></tr></table>";
and for 3:
replace:
temp2=subCell.getElementsByTagName('font')[1];
with:
temp2=subCell.getElementsByTagName('font')[1]; temp2.innerHTML=temp2.innerHTML.replace(/Pages:/,'');
|
|
|
Post by eveready on Nov 14, 2009 21:12:14 GMT -8
#1 and #3 are perfect.
I think I did a poor job of explaining #2, so let me try again.
the last post info normally reads like:
Last post: Today at 11:00pm by username
I want it to remain this way when staff are viewing.
However, when a member is viewing I want it to read like (for all threads):
Last post: Today at 11:00pm
Reason being is I have a code that allows moderators to post anonymously, so I don't want their usernames showing up in the last post for regular members to see.
Sorry bout that. Hopefully that was clearer.
And just one more little thing.
There is a problem with the alignment when using advanced moderation if there are announcements on the board.
Stickies are fine, it's just messed up for announcements.
|
|
|
Post by Wormopolis on Nov 15, 2009 8:02:35 GMT -8
replace this:
if (tds.width=='5%' && tds.nextSibling.width=='5%' && !tds.getElementsByTagName('input')[0] && tds.parentNode.rowIndex!=0) {
with:
if (tds.width=='5%' && tds.nextSibling.width=='5%' && tds.nextSibling.nextSibling.width!='5%' && tds.parentNode.rowIndex!=0) {
|
|
|
Post by Wormopolis on Nov 15, 2009 8:18:41 GMT -8
there isn't really a goodf way of determining if someone is staff from that page. The only way to do this would be to list the usernames of everyone you considered staff.
|
|