vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: vBulletin Board Mod - View Topic
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
vBulletin Board Mod (14th May 08 at 8:12pm UTC)
This code will create a board mod that resembles the one that is used on vBulletin.

Make sure you have disabled the 'forum name' row in the Forum Settings.

<style>
.boardtotals{
     display: none;
}
</style>
<script>
/*Board Mod
Created By Wrighty*/

for(i=0; i<get('td','tag').length; i++){
     if(get('td','tag')[i].innerHTML.match(/New Posts/) && get('td','tag')[i].className== "window1 boardstatus"){
          get('td','tag')[i+1].width = '55%';
          var a = get('td','tag')[i].parentNode.insertCell(3);
          with(a){
               className = 'window1';
               width= '50px';
               align= 'center';
               innerHTML = (get('td','tag')[i+1].innerHTML.match(/\s(\d+)\sPosts/))? RegExp.$1 : '0';
          }
          var b = get('td','tag')[i].parentNode.insertCell(3);
          with(b){
               className = 'window1';
               width= '50px';
               align= 'center';
               innerHTML = (get('td','tag')[i+1].innerHTML.match(/(\d+)\sTopics\s/))? RegExp.$1 : '0';
          }
     }
     if(get('td','tag')[i].colSpan == '3'){
          if(get('td','tag')[i].width == '100%' && get('td','tag')[i].className.match(/title1/)){
               get('td','tag')[i].colSpan = '5';
          }
          if(get('td','tag')[i].className.match(/categorytitle/)){
               get('td','tag')[i].colSpan = '5';
               var r = document.createElement('tr');
               var a = document.createElement('td');
               var b = document.createElement('td');
               var c = document.createElement('td');
               var d = document.createElement('td');
               var e = document.createElement('td');
               a.className = b.className = c.className = d.className = e.className = 'title1'
               a.appendChild(document.createTextNode(' '));
               b.appendChild(document.createTextNode('Forum'));
               c.appendChild(document.createTextNode('Last Post'));
               d.appendChild(document.createTextNode('Topics'));
               e.appendChild(document.createTextNode('Posts'));
               r.appendChild(a);
               r.appendChild(b);
               r.appendChild(c);
               r.appendChild(d);
               r.appendChild(e);
               get('td','tag')[i].parentNode.parentNode.insertBefore(r,get('td','tag')[i].parentNode.nextSibling);
          }
     }
}
</script>


Global Footer
VeaZna
Junior Member
**

[Avatar]
"Pickle Weasil"

Posts: 78
Status: Offline
Location: Guess...
Joined:  
Reputation: 1%  


pmwww
Re: vBulletin Board Mod (4th Oct 08 at 5:31pm UTC)
Is there a way to make this code into one of those template things?

ImageImage
dog199200
Guest
Re: vBulletin Board Mod (4th Oct 08 at 7:28pm UTC)
OK first of all you really should of asked this as a code request, in the code request area. I am only posting this here because i bet others will be looking for it as well at some point.


vBulletin Board Mod: Template Version


Board Listing Templates:
Code:
 
  1. <tr id="board_{board_id}">
  2.     <td class="window1 boardstatus" width="0%" align="center">
  3.         {new_posts}
  4.     </td>
  5.     <td class="window2 boardlisting" width="0%" valign="top">
  6.         <span style="float: left; position: relative;  height: 14px; font-size: 12px;" class="boardtitle">
  7.             {board_name}  
  8.         </span>
  9.         <br style="clear: both;" />
  10.         <span style="float: left; position: relative; width: 70%;" class="boarddescription">
  11.             {board_description}
  12.             {if:sub_boards}
  13.                 <br /><font size="1">Sub-Boards: {sub_boards}</font>
  14.             {/if:sub_boards}
  15.         </span>
  16.             <span style="float: right; position: relative;" class="boardtotals">
  17.             <font size="1">
  18.                 {if:moderators}
  19.                     Led By: {moderators}
  20.                 {/if:moderators}
  21.                 </font>
  22.             </span>
  23.         </span>
  24.     </td>
  25.     <td class="window2 lastpost" width="30%"{tip}>
  26.         <font size="2">
  27.         {ifnot:access}
  28.             {if:member}
  29.                 You do not have permission to view this board
  30.             {/if:member}
  31.             {if:guest}
  32.                 Please <a href="/action/login/">Login</a> to view this board
  33.             {/if:guest}
  34.         {/ifnot:access}
  35.         {if:access}
  36.             {if:last_post}
  37.                 {last_post_time}
  38.                 by {last_post_user}<br />
  39.                 in {last_post_topic}
  40.             {/if:last_post}
  41.             {ifnot:last_post}
  42.                 <center>No recent Posts</center>
  43.             {/ifnot:last_post}
  44.         {/if:access}
  45.         </font>
  46.     </td>
  47.     <td class="window2 topic" width="4%"{tip}>
  48.         <center>{total_topics}</center>
  49.     </td>
  50.     <td class="window2 post" width="4%"{tip}>
  51.         <center>{total_posts}</center>
  52.     </td>
  53. </tr>
 

Global Footer:
Code:
 
  1. <script>
  2. /*vBulletin Board Mod: Template Version
  3. To be used with HTML Templating Part #1
  4. Wrighty*/
  5.  
  6. var fix = {
  7.     d: get('td','tag'),
  8.     init: function(){
  9.         for(a = 0; a < this.d.length - 1; a++){
  10.             if(this.d[a].className.match(/categorytitle/) || (this.d[a].className == "title1" && this.d[a].innerHTML.match(/<b>Sub-Board\sName<\/b>/i))) {
  11.                 var x = document.createElement('tr');
  12.                 var y = document.createElement('td');
  13.                     y.innerHTML = ' ';
  14.                     y.className = 'title1';
  15.                 x.appendChild(y);
  16.                 var y = document.createElement('td');
  17.                     y.innerHTML = 'Board Name';
  18.                     y.className = 'title1';
  19.                 x.appendChild(y);
  20.                 var y = document.createElement('td');
  21.                     y.innerHTML = 'Last Post';
  22.                     y.className = 'title1';
  23.                 x.appendChild(y);
  24.                 var y = document.createElement('td');
  25.                     y.innerHTML = 'Topics';
  26.                     y.className = 'title1';
  27.                 x.appendChild(y);
  28.                 var y = document.createElement('td');
  29.                     y.innerHTML = 'Posts';
  30.                     y.className = 'title1';
  31.                 x.appendChild(y);
  32.                 this.d[a].parentNode.parentNode.insertBefore(x, this.d[a].parentNode.nextSibling);
  33.                 this.d[a].colSpan = '5';
  34. if(this.d[a].className == "title1") {
  35. this.d[a].parentNode.style.display = "none";
  36. break;
  37. }
  38.             }
  39.         }
  40.     }
  41. };
  42. fix.init();
  43. </script>
 


No Editing Needed {Smile}
VeaZna
Junior Member
**

[Avatar]
"Pickle Weasil"

Posts: 78
Status: Offline
Location: Guess...
Joined:  
Reputation: 1%  


pmwww
Re: vBulletin Board Mod (4th Oct 08 at 11:03pm UTC)
sorry, I'm still new here

and thanks for the code! {Smile}

ImageImage
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: vBulletin Board Mod (6th Oct 08 at 11:17pm UTC)
Thanks Dwight {Grin} .

Image
click here We have 15 Different Skins/Templates for your vForum
 Printable View

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