This topic was locked 15th May 08 at 10:20pm by Michael |
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 35 Joined:
pmwww | [F] Sub-boards brackets "[..]" (14th May 08 at 6:16pm UTC) | | I need a code that will put [] before and after the sub board names that shows up on the parent board so like:
some board Some boards Description Sub-boards: [sub-board 1] [sub-board 2] [sub-board 3] etc.
If you need any more info, please say so.
Thanks, Darkmage | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: Sub-boards brackets "[..]" (15th May 08 at 3:15pm UTC) | | Try this!
<script> /*Sub-Boards in [] Created By Wrighty*/
var x = get('font','tag');
for(c=0; c<x.length; c++){ if(x[c].innerHTML.match(/Sub-Boards/) && x[c].size == '1'){ var f = x[c].getElementsByTagName('a'); for(y=0;y<f.length;y++){ f[y].parentNode.insertBefore(document.createTextNode('['), f[y]); f[y].parentNode.insertBefore(document.createTextNode(']'), f[y].nextSibling); } } } </script>
Global Footer | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 35 Joined:
pmwww | Re: Sub-boards brackets "[..]" (15th May 08 at 8:05pm UTC) | | Thanks, is there anyway they can be white, and it be separated with "-" instead of the "," Thanks. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: Sub-boards brackets "[..]" (15th May 08 at 8:16pm UTC) | | Try this!
<script> /*Sub-Boards in [] Created By Wrighty*/
var x = get('font','tag');
for(c=0; c<x.length; c++){ if(x[c].innerHTML.match(/Sub-Boards/) && x[c].size == '1'){ x[c].innerHTML = x[c].innerHTML.replace(/,/,' -'); var f = x[c].getElementsByTagName('a'); var l = document.createElement('font'); l.appendChild(document.createTextNode('[')); l.color = '#FFFFFF'; var r = document.createElement('font'); r.appendChild(document.createTextNode(']')); r.color = '#FFFFFF'; for(y=0;y<f.length;y++){ f[y].parentNode.insertBefore(l.cloneNode(true), f[y]); f[y].parentNode.insertBefore(r.cloneNode(true), f[y].nextSibling); } } } </script>
Global Footer | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 35 Joined:
pmwww | Re: Sub-boards brackets "[..]" (15th May 08 at 9:51pm UTC) | | Thanks it works ^_^ | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: Sub-boards brackets "[..]" (15th May 08 at 10:20pm UTC) | |
Welcome | |
|