vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Moved Topic Icon

Moved Topic Icon - Posted By Marc (cr0w) on 10th Feb 08 at 3:55pm
This code lets you choose an icon for moved topics, instead of the locked topic icon.

Default Icon: Image

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. //Moved Topic Icon by Cr0w
  4. //Do not repost
  5.  
  6. var MoveImg = "http://img73.imageshack.us/img73/4863/movedjh2.gif" //Moved Topic Icon URL
  7. var showMoved = 0; // 0 = Hide "Moved:" from topic link, 1 = Show "Moved:" in topic link
  8.  
  9. var td=document.getElementsByTagName('td');
  10. for(t=0;t<td.length;t++){
  11. if(td[t].innerHTML.match(/Moved:/) && td[t].className.match(/window2/) && location.href.match(/board/) && td[t].width=="54%"){
  12. td[t-1].getElementsByTagName('img')[0].src = MoveImg;
  13. if(showMoved==0) td[t].innerHTML = td[t].innerHTML.replace('Moved: ','')
  14. }
  15. }
  16. //-->
  17. </script>
 


Global Footer.

Re: Moved Topic Icon - Posted By Michael (wrighty) on 10th Feb 08 at 4:14pm
You stoled it... I Was going to make this...

Mine would have been better! {Tongue Out}

Re: Moved Topic Icon - Posted By Marc (cr0w) on 10th Feb 08 at 4:16pm
 
You stoled it... I Was going to make this...

Mine would have been better! {Tongue Out}


I made this code in August 2006. {Tongue Out}

Re: Moved Topic Icon - Posted By Michael (wrighty) on 10th Feb 08 at 4:23pm
oh dear... slight problem I just realised, if there's multi topic moderation, it'll remove the checkbox...

you're better off using something like:

td[t-1].getElementByTagName('img')[0].src = MoveImg

{Smile}

Re: Moved Topic Icon - Posted By Marc (cr0w) on 10th Feb 08 at 6:01pm
Fixed. {Smile}