|
Post by tunescool on Jul 31, 2010 23:17:07 GMT -8
could you get this code to exclude certain thread ids? <script type="text/javascript"> <!-- // Sticky/Announce Thread Hide // by Wormopolis - www.wormocodes.comfor (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) { if (tds .width=="5%"&& tds.className.match(/windowbg/)) { if (tds.getElementsByTagName('img').length && tds.getElementsByTagName('img')[0].src.match(/(sticky|announcement)/i)) { tds.parentNode.style.display='none'; } } }
// --> </script>
what you said in the last post
exclude thread id[5678] - relocate to board id[boardid]
now that i moved some into a hidden forum(main page), the link to the hidden board(sub board) would still work as long as i have "everyone" still in the "viewable by" in modify board? which are boards in a hidden forum that i havent hidden yet till im done putting ids into the code. or it doesnt matter if "everyone can view" is in the drop down. sorry i know i never make sense to you
|
|
|
Post by Wormopolis on Aug 2, 2010 22:50:40 GMT -8
see if this is what you are after... <script type="text/javascript"> <!-- // Sticky/Announce Thread Hide // by Wormopolis - www.wormocodes.comexcludeArray=new Array(); excludeArray['123']="redirectboardname"; excludeArray['4321']="redirectboardname"; excludeArray['512']="redirectboardname"; // the number in the brackets is the thread id for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) { if (tds .width=="5%"&& tds.className.match(/windowbg/)) { if (tds.getElementsByTagName('img').length && tds.getElementsByTagName('img')[0].src.match(/(sticky|announcement)/i)) { tcell=tds.nextSibling.nextSibling; tname=tcell.getElementsByTagName('b')[0].getElementsByTagName('a')[0]; tid=tname.href.split('thread=')[1]; if (excludeArray[tid]) { tname.href="/index.cgi?board="+excludeArray[tid]; } else { tds.parentNode.style.display='none'; } } } }
// --> </script>
this way, if you wanted to direct to a specific thread, then get the id of the target thread and make the "redirectboardname" be something like: "g2&action=display&thread=100"; instead of just "g2";
make sense?
|
|
|
Post by tunescool on Aug 3, 2010 0:14:17 GMT -8
|
|
|
Post by Wormopolis on Aug 3, 2010 1:44:26 GMT -8
the id in the brackets is the id of the stickied thread. so thread "photoshoots" for example, the thread id would be 3061
|
|
|
Post by Wormopolis on Aug 3, 2010 1:45:12 GMT -8
and thread would have to be a sticky or an announcement per original code.
|
|
|
Post by tunescool on Aug 3, 2010 2:48:50 GMT -8
excludeArray['4860']="evantalk&action=display&thread=4860"; excludeArray['4862']="evansvids&action=display&thread=4862";
well the first time i did have the wrong board id in, ive been air heading everything lately. when i replaced the board id the thread still took me to general ID. so i took the code out and put it back in; it takes me to the rite url(with the rite board id), but now gives me a "The thread you are trying to access does not exist" error. before i took the code out i got an "invalid add module" error. and i did try a new array with the rite id but got the same message. now i get the same error message for both after i reinstalled the code "The thread you are trying to access does not exist"
|
|
|
Post by Wormopolis on Aug 3, 2010 3:46:07 GMT -8
the number in the brackets shouldnt be the same as the number at the end. the number in the brackets is the id of the sticky thread.
if you dont have a specific thread you want to redirect TO, JUST put the board id
"evanstalk"
|
|
|
Post by tunescool on Aug 3, 2010 4:35:45 GMT -8
ok i swear i tried that before and it didnt work, it made sense so i tried it. works now. i was just doing what you had written there when you posted the code. i read, "if you wanted to target a thread" as the sticky i just made cause i never had any plan to relocate to a thread. thanks for the modification
|
|
|
Post by Wormopolis on Aug 3, 2010 22:50:09 GMT -8
ah. I wasnt sure if you were intending to go to a thread so I added it in there in case you were heading in that direction.
|
|
|
Post by tunescool on Aug 4, 2010 4:49:40 GMT -8
im glad you did anyway ill need to do it for my new forum for rules and forum stuff. and i took your idea for your Hiya thread, maybe itll be good for people joining to be talking rite away on my forum. i put that navigation on your site to the rite side thinking i wasnt gonna have any problem reading what i was typing in the quick reply, but now i cant move it back in my modify profile and i cant read threads hardly at all it covers up the rite side
|
|
|
Post by Wormopolis on Aug 4, 2010 16:22:13 GMT -8
I dont understand what you are talking about in that last part.
|
|
|
Post by tunescool on Aug 4, 2010 16:26:51 GMT -8
your navigation and thread log
|
|
|
Post by Wormopolis on Aug 4, 2010 18:17:16 GMT -8
Oh I see.. you mean on THIS site. so the dropdown doesnt have the option of putting it on the left anymore? can you increase the window size?
|
|
|
Post by tunescool on Aug 4, 2010 19:00:01 GMT -8
it does have the option in the dropdown but ive tried like 3 or 4 times to change it back. i cant really get my window any bigger
|
|
|
Post by Wormopolis on Aug 4, 2010 19:08:21 GMT -8
select right again, then select left. I will havew to fix that.
|
|