Wrighty Very Senior Member
    
![[Avatar]](http://av.wrighty.info/av.png) Posts: 3,269 Status: Offline Gender: Male Joined: 16th Dec 2007
| | Top Posters Table (3rd Apr 08 at 6:32pm) | | This code will put a table at the top of your forum and add a link to the user's bar that allows the member to show and hide the table. make sure you edit it correctly otherwise you'll get the wrong forum's top posters! 
Global/Main Header <table border='0' class='border' align='center' cellspacing='1' cellpadding='3' id='w_top_table' width='150px' style='display: none;'> <tr> <td class='title1' align='center'>Top Posters</td> </tr> <tr> <td class='window1' id='top_holder'></td> </tr> </table><br>
<script> /*Top Posters Table. Created By Wrighty No Rip, Repost or anything!*/
var _u = 'wrighty'; var _t = '5';
var _l = '<table border="0" width="100%" cellspacing="1" cellpadding="2">'; var _s = 'http://'+_u+'.virtualforums.co.uk/javascript/top_posters.php?max='+_t; document.write('<script src = ' + _s + '></sc'+'ript>'); function footer(){ for(i=0;i<top_posters.length;i++){ _l += '<tr><td width="75%" align="left"><a href="/action/view_profile/user/'+top_posters[i][0]+'/" class="'+top_posters[i][2]+'">'+top_posters[i][1]+'</a></td><td width="25%" align="right">'+top_posters[i][3]+'</td></tr>'; } _l += '</table>'; get('top_holder','id').innerHTML = _l var _a = document.createElement('a'); _a.onclick = function(){ get('w_top_table','id').style.display = (get('w_top_table','id').style.display=='none')? '' : 'none'; }; _a.href = 'javascript: void(0);'; _a.appendChild(document.createTextNode('Top Posters')); get('pms','id').firstChild.insertBefore(document.createTextNode(' :: '),get('pms','id').firstChild.firstChild); get('pms','id').firstChild.insertBefore(_a,get('pms','id').firstChild.firstChild); } </script>
Global/Main Footer: <script> footer(); </script>
Edit the red parts. They're the important parts.
Where I have 'Wrighty' is where you want to put the USERNAME of your board. Such as: support. Also, where I have '5' is the number of top posters to display. Max is 10!  | | Back to Top - Link to Post - Last edit: 18th Jun 08 at 8:36pm by Wrighty |
 |
|
mezorro Junior Member
 
![[Avatar]](http://img85.imageshack.us/img85/6882/gamersparkavatar1nv0.png) Posts: 106 Status: Offline Gender: Male Joined: 28th Jan 2008
| | Re: Top Posters Table (18th Jun 08 at 2:53pm) | | Hey Wrighty what do you mean about the username of the board. Do you mean the admins username or the board url like it's support here
Edit: My code isn't working.  Code: - <table border='0' class='border' align='center' cellspacing='1' cellpadding='3' id='w_top_table' width='150px' style='display: none;'>
- <tr>
- <td class='title1' align='center'>Top Posters</td>
- </tr>
- <tr>
- <td class='window1' id='top_holder'></td>
- </tr>
- </table><br>
-
- <script>
- /*Top Posters Table.
- Created By Wrighty
- No Rip, Repost or anything!*/
-
- var _u = 'gamerspark';
- var _t = '5';
-
- var _l = '<table border="0" width="100%" cellspacing="1" cellpadding="2">';
- var _s = document.createElement('script');
- _s.src = 'http://'+_u+'.virtualforums.co.uk/javascript/top_posters.php?max='+_t;
- _s.type = 'text/javascript';
- document.body.appendChild(_s);
- function footer(){
- for(i=0;i<top_posters.length;i++){
- _l += '<tr><td width="75%" align="left"><a href="/action/view_profile/user/'+top_posters[i][0]+'/" class="'+top_posters[i][2]+'">'+top_posters[i][1]+'</a></td><td width="25%" align="right">'+top_posters[i][3]+'</td></tr>';
- }
- _l += '</table>';
- get('top_holder','id').innerHTML = _l
- var _a = document.createElement('a');
- _a.onclick = function(){
- get('w_top_table','id').style.display = (get('w_top_table','id').style.display=='none')? '' : 'none';
- };
- _a.href = 'javascript: void(0);';
- _a.appendChild(document.createTextNode('Top Posters'));
- get('pms','id').firstChild.insertBefore(document.createTextNode(' :: '),get('pms','id').firstChild.firstChild);
- get('pms','id').firstChild.insertBefore(_a,get('pms','id').firstChild.firstChild);
- }
- </script>
| | Back to Top - Link to Post - Last edit: 18th Jun 08 at 2:57pm by mezorro | www.thegamerspark.com |
|
Graham Moderator
     Resident Satirist
![[Avatar]](http://images.mrfrufru.com/13946-wC3t66-porcupinetree.jpg) Mood: Ill :[ Posts: 1,257 Status: Offline Gender: Male Location: Sussex, UK Age: 23 Joined: 9th Dec 2007
| | Re: Top Posters Table (18th Jun 08 at 3:02pm) | | Link to your site? I've tried the original code on my test board and it seems to work ok, so perhaps recopy the code?
As for the "board username" he means the portion before the ".virtualforums.co.uk", so for here it would be 'support'  | | Back to Top - Link to Post |
 |
|
mezorro Junior Member
 
![[Avatar]](http://img85.imageshack.us/img85/6882/gamersparkavatar1nv0.png) Posts: 106 Status: Offline Gender: Male Joined: 28th Jan 2008
| |
Graham Moderator
     Resident Satirist
![[Avatar]](http://images.mrfrufru.com/13946-wC3t66-porcupinetree.jpg) Mood: Ill :[ Posts: 1,257 Status: Offline Gender: Male Location: Sussex, UK Age: 23 Joined: 9th Dec 2007
| | Re: Top Posters Table (18th Jun 08 at 3:50pm) | | I've registered on your site and it works alright in FF, but seemingly not in IE Is it IE you're using?
I think this will be one for Wrighty to sort out  | | Back to Top - Link to Post |
 |
|
mezorro Junior Member
 
![[Avatar]](http://img85.imageshack.us/img85/6882/gamersparkavatar1nv0.png) Posts: 106 Status: Offline Gender: Male Joined: 28th Jan 2008
| |
Graham Moderator
     Resident Satirist
![[Avatar]](http://images.mrfrufru.com/13946-wC3t66-porcupinetree.jpg) Mood: Ill :[ Posts: 1,257 Status: Offline Gender: Male Location: Sussex, UK Age: 23 Joined: 9th Dec 2007
| | Re: Top Posters Table (18th Jun 08 at 6:49pm) | | I think it could be a simple browser compatability issue, but Wrighty will know for certain and should be able to provide a cure  | | Back to Top - Link to Post |
 |
|
Wrighty Very Senior Member
    
![[Avatar]](http://av.wrighty.info/av.png) Posts: 3,269 Status: Offline Gender: Male Joined: 16th Dec 2007
| | Re: Top Posters Table (18th Jun 08 at 8:37pm) | | I have fixed it and it seems to work on your forum in IE now! 
Also updated the first post to the recent version. Let me know if it doesn't work!  | | Back to Top - Link to Post |
 |
|
CåñåÐå™ Full Member
  
![[Avatar]](http://img165.imageshack.us/img165/9797/avatarmarioco6.jpg) Posts: 358 Status: Offline Gender: Male Location: Toronto Ontario Joined: 21st Dec 2007
| | Re: Top Posters Table (18th Jun 08 at 9:24pm) | | | It always worked fine in IE7 for me. | | Back to Top - Link to Post |
 click here We have 15 Different Skins/Templates for your vForum |
|
mezorro Junior Member
 
![[Avatar]](http://img85.imageshack.us/img85/6882/gamersparkavatar1nv0.png) Posts: 106 Status: Offline Gender: Male Joined: 28th Jan 2008
| |
Wrighty Very Senior Member
    
![[Avatar]](http://av.wrighty.info/av.png) Posts: 3,269 Status: Offline Gender: Male Joined: 16th Dec 2007
| |
[.tR] ookie1 Junior Member
 
![[Avatar]](http://3.wimg.co.uk/smxNiV.png) New avvy! Posts: 148 Status: Offline Joined: 16th Jan 2008
| | Re: Top Posters Table (19th Jun 08 at 10:33am) | | | Will this work in main footers? | | Back to Top - Link to Post |
 Now open, well sorta, so start posting.

Hallelujah! 'tis done; I believe on the Son; I am saved by the blood of the Crucified One!
|
|
cout << "Marc is busy"; vChat Developer
     I <3 Ross
![[Avatar]](http://3.wimg.co.uk/Sb4rca.jpg) Posts: 2,953 Status: Offline Gender: Male Location: Ontario, Canada Age: 16 Joined: 9th Dec 2007
Additional Groups: Coding Team
| |
[.tR] ookie1 Junior Member
 
![[Avatar]](http://3.wimg.co.uk/smxNiV.png) New avvy! Posts: 148 Status: Offline Joined: 16th Jan 2008
| | Re: Top Posters Table (20th Jun 08 at 4:25am) | | I can't get it to work.
http://chi.vforums.co.uk | | Back to Top - Link to Post |
 Now open, well sorta, so start posting.

Hallelujah! 'tis done; I believe on the Son; I am saved by the blood of the Crucified One!
|
|
cout << "Marc is busy"; vChat Developer
     I <3 Ross
![[Avatar]](http://3.wimg.co.uk/Sb4rca.jpg) Posts: 2,953 Status: Offline Gender: Male Location: Ontario, Canada Age: 16 Joined: 9th Dec 2007
Additional Groups: Coding Team
| | Re: Top Posters Table (20th Jun 08 at 4:35am) | | Find this line in the Top Posters code:
<table border='0' class='border' align='center' cellspacing='1' cellpadding='3' id='w_top_table' width='150px' style='display: none;'>
Remove the green.  | | Back to Top - Link to Post |

 |
|