vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Top Posters Table - View Topic (Page 1 of 2)Page: 1 2
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
Top Posters Table (3rd Apr 08 at 5:32pm UTC)
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! {Smile}

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! {Smile}
RuhRoe
Full Member
***

Posts: 218
Status: Offline
Gender: Male
Age: 30
Joined:  
Reputation: 5%  


pmxfire
Re: Top Posters Table (18th Jun 08 at 1:53pm UTC)
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:
 
  1. <table border='0' class='border' align='center' cellspacing='1' cellpadding='3' id='w_top_table' width='150px' style='display: none;'>
  2.     <tr>
  3.         <td class='title1' align='center'>Top Posters</td>
  4.     </tr>
  5.     <tr>
  6.         <td class='window1' id='top_holder'></td>
  7.     </tr>
  8. </table><br>
  9.  
  10. <script>
  11. /*Top Posters Table.
  12. Created By Wrighty
  13. No Rip, Repost or anything!*/
  14.  
  15. var _u = 'gamerspark';
  16. var _t = '5';
  17.  
  18. var _l = '<table border="0" width="100%" cellspacing="1" cellpadding="2">';
  19. var _s = document.createElement('script');
  20. _s.src = 'http://'+_u+'.virtualforums.co.uk/javascript/top_posters.php?max='+_t;
  21. _s.type = 'text/javascript';
  22. document.body.appendChild(_s);
  23. function footer(){
  24.     for(i=0;i<top_posters.length;i++){
  25.         _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>';
  26.     }
  27.     _l += '</table>';
  28.     get('top_holder','id').innerHTML = _l
  29.     var _a = document.createElement('a');
  30.     _a.onclick = function(){
  31.         get('w_top_table','id').style.display = (get('w_top_table','id').style.display=='none')? '' : 'none';
  32.     };
  33.     _a.href = 'javascript: void(0);';
  34.     _a.appendChild(document.createTextNode('Top Posters'));
  35.     get('pms','id').firstChild.insertBefore(document.createTextNode(' :: '),get('pms','id').firstChild.firstChild);
  36.     get('pms','id').firstChild.insertBefore(_a,get('pms','id').firstChild.firstChild);
  37. }
  38. </script>
 
Graham
Support Administrator
*****

[Avatar]

Posts: 1,642
Status: Offline
Gender: Male
Location: Sussex, UK
Age: 39
Joined:  

Additional Groups:
Support Team
***


Reputation: 57%  


pmwww
Re: Top Posters Table (18th Jun 08 at 2:02pm UTC)
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' {Smile}
RuhRoe
Full Member
***

Posts: 218
Status: Offline
Gender: Male
Age: 30
Joined:  
Reputation: 5%  


pmxfire
Re: Top Posters Table (18th Jun 08 at 2:42pm UTC)
http://gamerspark.vforums.co.uk
I also added the global footer part and it stlil doesn't work
Graham
Support Administrator
*****

[Avatar]

Posts: 1,642
Status: Offline
Gender: Male
Location: Sussex, UK
Age: 39
Joined:  

Additional Groups:
Support Team
***


Reputation: 57%  


pmwww
Re: Top Posters Table (18th Jun 08 at 2:50pm UTC)
I've registered on your site and it works alright in FF, but seemingly not in IE {Unsure} Is it IE you're using?

I think this will be one for Wrighty to sort out {Smile}
RuhRoe
Full Member
***

Posts: 218
Status: Offline
Gender: Male
Age: 30
Joined:  
Reputation: 5%  


pmxfire
Re: Top Posters Table (18th Jun 08 at 4:54pm UTC)
Yeah i have IE 7. So i'm guessing Wrighty has FF. Thats why it doesn't work?
Graham
Support Administrator
*****

[Avatar]

Posts: 1,642
Status: Offline
Gender: Male
Location: Sussex, UK
Age: 39
Joined:  

Additional Groups:
Support Team
***


Reputation: 57%  


pmwww
Re: Top Posters Table (18th Jun 08 at 5:49pm UTC)
I think it could be a simple browser compatability issue, but Wrighty will know for certain and should be able to provide a cure {Smile}
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Top Posters Table (18th Jun 08 at 7:37pm UTC)
I have fixed it and it seems to work on your forum in IE now! {Smile}

Also updated the first post to the recent version. Let me know if it doesn't work! {Smile}
CåñåÐå™
Full Member
***

[Avatar]

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


pmwww
Re: Top Posters Table (18th Jun 08 at 8:24pm UTC)
It always worked fine in IE7 for me.

Image
click here We have 15 Different Skins/Templates for your vForum
RuhRoe
Full Member
***

Posts: 218
Status: Offline
Gender: Male
Age: 30
Joined:  
Reputation: 5%  


pmxfire
Re: Top Posters Table (18th Jun 08 at 9:16pm UTC)
it works great now thanks!
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Top Posters Table (18th Jun 08 at 9:23pm UTC)
 
it works great now thanks!

{Grin} Happy to help!
[.tR] ookie1
Full Member
***

[Avatar]
Is it choccy?

Posts: 167
Status: Offline
Joined:  
Reputation: 3%  


pm
Re: Top Posters Table (19th Jun 08 at 9:33am UTC)
Will this work in main footers?




Image

Hallelujah! 'tis done; I believe on the Son; I am saved by the blood of the Crucified One!
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Top Posters Table (19th Jun 08 at 4:05pm UTC)
 
Will this work in main footers?


It doesn't matter where you place the code, as long as the first portion is placed above the second. {Smile}

rroll.to— Shorten a link, rickroll your friends.
[.tR] ookie1
Full Member
***

[Avatar]
Is it choccy?

Posts: 167
Status: Offline
Joined:  
Reputation: 3%  


pm
Re: Top Posters Table (20th Jun 08 at 3:25am UTC)
I can't get it to work.

http://chi.vforums.co.uk




Image

Hallelujah! 'tis done; I believe on the Son; I am saved by the blood of the Crucified One!
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Top Posters Table (20th Jun 08 at 3:35am UTC)
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. {Wink}

rroll.to— Shorten a link, rickroll your friends.
 Printable View
Page: 1 2

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