Is it possible to have the top 5 or 10 poster of the forum code please.
Where ever it will be easier for you to have .![]()
http://tropolis.virtualforums.co.uk/
You don't need a code for that, just go to Members>top posters.
You don't need a code for that, just go to Members>top posters.
I believe he means displayed on any page.![]()
Personally I have too much to do to take on another server-side code right now, but wait and see if Wrighty can get this for you.![]()
I do believe that this will require a server side feature. An external database etc. So Unfortunately this can't be done!![]()
(Also it's against our request rules, but don't worry!)
Sorry. If I get some time, I'll possibly create a code that does this for everyone.![]()
Ok cool thanks Wrighty .I do believe that this will require a server side feature. An external database etc. So Unfortunately this can't be done!![]()
(Also it's against our request rules, but don't worry!)
Sorry. If I get some time, I'll possibly create a code that does this for everyone.![]()
No worries Marc thanks .Personally I have too much to do to take on another server-side code right now, but wait and see if Wrighty can get this for you. Smiley
Wrighty, don't say I never give you anything![]()
http://USERNAME.virtualforums.co.uk/javascript/top_posters.php?max=5
That'll return a javascript array of the top posters, their display name, their class and the number of posts they have. I'll let someone else deal with the formatting of it though![]()
Ross
Now, how do you want this to look?
Ross, I
you forever.
![]()
Woot!! Thanks Ross.
Which one of you is taking this on.
I will!![]()
Let me know what you want it to look like etc...![]()
I was thinking it could be an link like in between the infro center and the last category.
But then i also thought may be you can do what would be easy for you to code.
A nice table at the top of the forum with a link added to the links in the user bar saying: 'Top Posters' That will show and hide the table?
That's a much better idea Wrighty.
I try to please. I'll work on this either tonight, or tomorrow night!
![]()
Cool thank you bro.
Try this:
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 = 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>
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!![]()
This is great Wrighty and it works fine, thank you for doing it.
No problem!![]()