vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] VBulletin Board Mod Edit (Wrighty) - View Topic
Topic Rating: *****
Printable View
dog199200
Guest
[F] VBulletin Board Mod Edit (Wrighty) (19th Feb 08 at 1:02am UTC)
Wrighty or someone can you please edit the mod a little more. There is one error i did not catch before:

Image

The Led By: section gets pushed under everything when there is sub-boards and i'd like it to stay in place like the rest of them:

http://deluxeanimeforum.vforums.co.uk/

Code:
 
  1. <style>
  2. .boardtotals{
  3.     display: none;
  4. }
  5. </style>
  6.  
  7. <script>
  8. /*Board Mod
  9. Created By Wrighty*/
  10.  
  11.  
  12. for(i=0; i<get('td','tag').length; i++){
  13.     if(get('td','tag')[i].innerHTML.match(/New Posts/) && get('td','tag')[i].className== "window1"){
  14.         get('td','tag')[i+1].width = '55%';
  15.         if(get('td','tag')[i+1].getElementsByTagName('span')[3] && get('td','tag')[i+1].getElementsByTagName('span')[4] && get('td','tag')[i+1].getElementsByTagName('span')[4].innerHTML.match(/Led By:/) && get('td','tag')[i+1].getElementsByTagName('span')[3].innerHTML.match(/Sub-Boards:/)){
  16.             get('td','tag')[i+1].getElementsByTagName('span')[3].innerHTML += ' | ' + get('td','tag')[i+1].getElementsByTagName('span')[4].innerHTML
  17.             get('td','tag')[i+1].getElementsByTagName('span')[4].style.display='none';
  18.         }
  19.         var a = get('td','tag')[i].parentNode.insertCell(3);
  20.         with(a){
  21.             className = 'window1';
  22.             width= '50px';
  23.             align= 'center';
  24.             innerHTML = (get('td','tag')[i+1].innerHTML.match(/\s(\d+)\sPosts/))? RegExp.$1 : '0';
  25.             innerHTML += '<br />Posts'
  26.         }
  27.         var b = get('td','tag')[i].parentNode.insertCell(3);
  28.         with(b){
  29.             className = 'window1';
  30.             width= '50px';
  31.             align= 'center';
  32.             innerHTML = (get('td','tag')[i+1].innerHTML.match(/(\d+)\sTopics\s/))? RegExp.$1 : '0';
  33.             innerHTML += '<br />Topics'
  34.         }
  35.     }
  36.     if(get('td','tag')[i].innerHTML.match(/\/category\//) && get('td','tag')[i].colSpan == '3'){
  37.         get('td','tag')[i].colSpan = '5';
  38.     }
  39. }
  40. </script>
 
Paddy
Full Member
***
Insane Clown

[Avatar]

Posts: 288
Status: Offline
Gender: Male
Location: Buffalo, New York
Age: 35
Joined:  
Reputation: 7%  


pmwwwtwitterskypeaimgtalk
Re: VBulletin Board Mod Edit (Wrighty) (19th Feb 08 at 2:40am UTC)
Try this (untested):

Code:
 
  1. <style>
  2. .boardtotals{
  3.     display: none;
  4. }
  5. </style>
  6.  
  7. <script>
  8. /*Board Mod
  9. Created By Wrighty*/
  10.  
  11.  
  12. for(i=0; i<get('td','tag').length; i++){
  13.     if(get('td','tag')[i].innerHTML.match(/New Posts/) && get('td','tag')[i].className== "window1"){
  14.         get('td','tag')[i+1].width = '55%';
  15.         var a = get('td','tag')[i].parentNode.insertCell(3);
  16.         with(a){
  17.             className = 'window1';
  18.             width= '50px';
  19.             align= 'center';
  20.             innerHTML = (get('td','tag')[i+1].innerHTML.match(/\s(\d+)\sPosts/))? RegExp.$1 : '0';
  21.             innerHTML += '<br />Posts'
  22.         }
  23.         var b = get('td','tag')[i].parentNode.insertCell(3);
  24.         with(b){
  25.             className = 'window1';
  26.             width= '50px';
  27.             align= 'center';
  28.             innerHTML = (get('td','tag')[i+1].innerHTML.match(/(\d+)\sTopics\s/))? RegExp.$1 : '0';
  29.             innerHTML += '<br />Topics'
  30.         }
  31.     }
  32.     if(get('td','tag')[i].colSpan == '3'){
  33.         if(get('td','tag')[i].width == '100%' && get('td','tag')[i].className == 'title1'){
  34.             get('td','tag')[i].colSpan = '5';
  35.        }
  36.         if(get('td','tag')[i].innerHTML.match(/\/category\//) ){
  37.             get('td','tag')[i].colSpan = '5';
  38.        }
  39.     }
  40. }
  41. </script>
 


~Artemis

[edit]Fixed it up to be a bit more elegant, and now there's an example: http://prodigy.vforums.co.uk[/edit]
dog199200
Guest
Re: VBulletin Board Mod Edit (Wrighty) (19th Feb 08 at 4:59am UTC)
thank you {Smile}
Paddy
Full Member
***
Insane Clown

[Avatar]

Posts: 288
Status: Offline
Gender: Male
Location: Buffalo, New York
Age: 35
Joined:  
Reputation: 7%  


pmwwwtwitterskypeaimgtalk
Re: [F] VBulletin Board Mod Edit (Wrighty) (19th Feb 08 at 5:08am UTC)
No problem. Let me know if something needs to be changed or if something stops working.

~Artemis
dog199200
Guest
Re: [F] VBulletin Board Mod Edit (Wrighty) (19th Feb 08 at 5:33am UTC)
ok will do
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: [F] VBulletin Board Mod Edit (Wrighty) (19th Feb 08 at 7:47am UTC)
Thanks Arty! {Smile}
 Printable View

All times are GMT+0 :: The current time is 10:07pm
Page generated in 0.4841 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums