This topic was locked 12th Mar 08 at 4:52pm by Michael |
Alex Bailey Senior Member
   
Posts: 503 Status: Offline Gender: Male Location: Uk Age: 33 Joined:
pmmsnaim | [F] Remove :: (11th Mar 08 at 5:52pm UTC) | | Can i have a code to remove :: between new thread etc and have it spaced by 2px | |
ting-tong2k6@hotmail.com |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: Remove :: (11th Mar 08 at 6:17pm UTC) | |  Code: - <script type="text/javascript">
- /*Remove :: from Menu
- Created By Wrighty
- support.virtualforums.co.uk*/
-
- var menu = document.getElementById('welcome_table').getElementsByTagName('td')[2];
-
- menu.innerHTML = menu.innerHTML.replace(new RegExp("::","g"),'');
- </script>
| |
rroll.to— Shorten a link, rickroll your friends. |
|
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: Remove :: (11th Mar 08 at 6:19pm UTC) | | Not in menu he said!
In the space between new topic etc....
I'll try to get to this tonight! | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: Remove :: (11th Mar 08 at 6:20pm UTC) | | Not in menu he said! In the space between new topic etc.... I'll try to get to this tonight!
Oops, my bad. | |
rroll.to— Shorten a link, rickroll your friends. |
|
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: Remove :: (11th Mar 08 at 7:42pm UTC) | | try:
<script> /*Remove :: from buttons Usual Copyright stuff here! Wrighty*/
for(i=0; i<get('td','tag').length;i++){ if(get('td','tag')[i].innerHTML.match(/ :: /) && get('td','tag')[i].className.match(/title(1|2)/)){ get(''td','tag')[i].innerHTML = get(''td','tag')[i].innerHTML.replace(/ :: /,' '); } } </script>
Untested, .... Also, Global Footer... Should work! | |
|
Alex Bailey Senior Member
   
Posts: 503 Status: Offline Gender: Male Location: Uk Age: 33 Joined:
pmmsnaim | Re: Remove :: (11th Mar 08 at 9:34pm UTC) | | Nope doesnt work | |
ting-tong2k6@hotmail.com |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: Remove :: (11th Mar 08 at 9:58pm UTC) | |  Code: - <script>
- <!--
- /* Remove :: */
-
- var td = get('td','tag');
- for(i=0;i<td.length;i++){
- if(td[i].innerHTML.match(/::/) && td[i].className.match(/title(1|2)/)){
- td[i].innerHTML = td[i].innerHTML.replace(/ ::/,'');
- }
- }
- //-->
- </script>
| |
rroll.to— Shorten a link, rickroll your friends. |
|
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: Remove :: (11th Mar 08 at 10:01pm UTC) | | No...
<script> /*Remove :: from buttons Usual Copyright stuff here! Wrighty*/
for(i=0; i<get('td','tag').length;i++){ if(get('td','tag')[i].innerHTML.match(/ :: /) && get('td','tag')[i].className.match(/title(1|2)/)){ get('td','tag')[i].innerHTML = get('td','tag')[i].innerHTML.replace(/ :: /g,' '); } } </script> | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: Remove :: (11th Mar 08 at 10:05pm UTC) | | No...
<script> /*Remove :: from buttons Usual Copyright stuff here! Wrighty*/
for(i=0; i<get('td','tag').length;i++){ if(get('td','tag')[i].innerHTML.match(/ :: /) && get('td','tag')[i].className.match(/title(1|2)/)){ get('td','tag')[i].innerHTML = get('td','tag')[i].innerHTML.replace(/ :: /g,' '); } } </script>
You had a quote instead of an apostrophe in one spot, but I decided to rewrite the code, why is mine wrong? | |
rroll.to— Shorten a link, rickroll your friends. |
|
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: Remove :: (11th Mar 08 at 10:31pm UTC) | | You aren't removing them all, it's longer and also contains a variable. Mine is better and works! | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: Remove :: (11th Mar 08 at 10:40pm UTC) | | You aren't removing them all, it's longer and also contains a variable. Mine is better and works!
It contains a variable because the get() function doesn't cache, thus every time you use get(), you're recreating the array of the hundred-and-something td's on the page; thus a variable is much more efficient. | |
rroll.to— Shorten a link, rickroll your friends. |
|
Alex Bailey Senior Member
   
Posts: 503 Status: Offline Gender: Male Location: Uk Age: 33 Joined:
pmmsnaim | Re: Remove :: (12th Mar 08 at 3:57pm UTC) | | Lol code battle going on Anyway thanks for the code. It worked. XD | |
ting-tong2k6@hotmail.com |
|
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: Remove :: (12th Mar 08 at 4:51pm UTC) | | Yey!
I win!
 | |
|