vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: vBulletin Board Mod - View Topic
 |  |
| 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 | 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]](http://a.deviantart.com/avatars/v/e/veazna.gif) "Pickle Weasil" Posts: 78 Status: Offline Location: Guess... Joined:
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? | |
|
| 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: - <tr id="board_{board_id}">
- <td class="window1 boardstatus" width="0%" align="center">
- {new_posts}
- </td>
- <td class="window2 boardlisting" width="0%" valign="top">
- <span style="float: left; position: relative; height: 14px; font-size: 12px;" class="boardtitle">
- {board_name}
- </span>
- <br style="clear: both;" />
- <span style="float: left; position: relative; width: 70%;" class="boarddescription">
- {board_description}
- {if:sub_boards}
- <br /><font size="1">Sub-Boards: {sub_boards}</font>
- {/if:sub_boards}
- </span>
- <span style="float: right; position: relative;" class="boardtotals">
- <font size="1">
- {if:moderators}
- Led By: {moderators}
- {/if:moderators}
- </font>
- </span>
- </span>
- </td>
- <td class="window2 lastpost" width="30%"{tip}>
- <font size="2">
- {ifnot:access}
- {if:member}
- You do not have permission to view this board
- {/if:member}
- {if:guest}
- Please <a href="/action/login/">Login</a> to view this board
- {/if:guest}
- {/ifnot:access}
- {if:access}
- {if:last_post}
- {last_post_time}
- by {last_post_user}<br />
- in {last_post_topic}
- {/if:last_post}
- {ifnot:last_post}
- <center>No recent Posts</center>
- {/ifnot:last_post}
- {/if:access}
- </font>
- </td>
- <td class="window2 topic" width="4%"{tip}>
- <center>{total_topics}</center>
- </td>
- <td class="window2 post" width="4%"{tip}>
- <center>{total_posts}</center>
- </td>
- </tr>
Global Footer:
 Code: - <script>
- /*vBulletin Board Mod: Template Version
- To be used with HTML Templating Part #1
- Wrighty*/
-
- var fix = {
- d: get('td','tag'),
- init: function(){
- for(a = 0; a < this.d.length - 1; a++){
- if(this.d[a].className.match(/categorytitle/) || (this.d[a].className == "title1" && this.d[a].innerHTML.match(/<b>Sub-Board\sName<\/b>/i))) {
- var x = document.createElement('tr');
- var y = document.createElement('td');
- y.innerHTML = ' ';
- y.className = 'title1';
- x.appendChild(y);
- var y = document.createElement('td');
- y.innerHTML = 'Board Name';
- y.className = 'title1';
- x.appendChild(y);
- var y = document.createElement('td');
- y.innerHTML = 'Last Post';
- y.className = 'title1';
- x.appendChild(y);
- var y = document.createElement('td');
- y.innerHTML = 'Topics';
- y.className = 'title1';
- x.appendChild(y);
- var y = document.createElement('td');
- y.innerHTML = 'Posts';
- y.className = 'title1';
- x.appendChild(y);
- this.d[a].parentNode.parentNode.insertBefore(x, this.d[a].parentNode.nextSibling);
- this.d[a].colSpan = '5';
- if(this.d[a].className == "title1") {
- this.d[a].parentNode.style.display = "none";
- break;
- }
- }
- }
- }
- };
- fix.init();
- </script>
No Editing Needed | |
| VeaZna Junior Member
 
![[Avatar]](http://a.deviantart.com/avatars/v/e/veazna.gif) "Pickle Weasil" Posts: 78 Status: Offline Location: Guess... Joined:
pmwww | Re: vBulletin Board Mod (4th Oct 08 at 11:03pm UTC) | | sorry, I'm still new here
and thanks for the code! | |
|
| CåñåÐå™ Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/images-hrn.jpeg) Posts: 427 Status: Offline Gender: Male Location: Toronto Ontario Joined:
pmwww | Re: vBulletin Board Mod (6th Oct 08 at 11:17pm UTC) | | Thanks Dwight . | |
 click here We have 15 Different Skins/Templates for your vForum |
| |
 |  |
|