View Full Version : Top (10) Posters Module
Acido
05-17-2004, 11:40 PM
2 templates
1 file
Put the topten.php file in the Modules folder
create 2 new templates : adv_portal_topposters and top_posters with the content included in the aproriate txt files.
It give a module with the Top 10 users with more posts
Is you want change the amount of users to show in this module, simpley change the LIMIT option in the php file:
$top_posters = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY posts DESC LIMIT 10");
where LIMIT 10 is the number of userr to include in this query. Yo can change the numbre 10 for 5, 20, or wathelse that you want.
seidel
05-18-2004, 12:45 AM
Hi!
I have vbadvanced homepage 1.1
How put your excellent module?
Please helpme!
Thanks!
Zachery
05-18-2004, 02:01 AM
The modules only work with vBadvanced CMPS
seidel
05-18-2004, 02:29 AM
Oh!, many thanks!
joeychgo
05-18-2004, 06:32 AM
See screenshot ---
Seems to function properly. Nice hack.
But there is no border around it....
Also -- even though I took out the >> on the rest of the page, it came back on this block?
Acido
05-18-2004, 02:21 PM
See screenshot ---
Seems to function properly. Nice hack.
But there is no border around it....
Also -- even though I took out the >> on the rest of the page, it came back on this block?
Sorry for the borders:
In Template: adv_portal_topposters
Find:
<table cellpadding="4" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
Replace it with:
<table cellpadding="4" cellspacing="$stylevar[cellspacing]" border="0" class="tborder" width="100%">
Border Fixed ;)
seidel
05-19-2004, 12:46 AM
Your module is great!
*installed* here expertforum.info/vbulletin
bluesteel
05-19-2004, 08:34 AM
Simple, but good. Thanks!
*installed*
Socket
05-19-2004, 09:10 AM
Cheers Acido just what I needed :)
BoNfiRe
05-19-2004, 09:20 AM
yea thx for that shame I only have 3 posters, and one of them is me lol
joeychgo
05-19-2004, 09:43 AM
Border Fixed ;)
Thats what I like - service with a smile :) thanks alot
Thanks for this Acido, a useful little module - *installed* :)
hpwilhelm
05-21-2004, 02:35 PM
Thanks for a wery usefull add-on! :)
Would it be possible to make it display "Most popular users", Top 10 reputation with points display? :)
Acido
05-21-2004, 02:59 PM
Thanks for a wery usefull add-on! :)
Would it be possible to make it display "Most popular users", Top 10 reputation with points display? :)
I'l try write it tomorrow :)
hpwilhelm
05-21-2004, 03:30 PM
I'l try write it tomorrow :)
Thanks! Looking forward to it! :)
Acido
05-22-2004, 02:26 AM
Thanks! Looking forward to it! :)
I rewrite a new module. But if you want take a easy way, you can change the query in this module, to get people sorted by reputation, posts, referrals... etc
Check the file topten.php
Where you see: SELECT * FROM ".TABLE_PREFIX."user ORDER BY posts DESC LIMIT 10"
you can change that field (posts) by reputation or joindate, lastactivity etc.
Regards. ;)
Zachery
05-22-2004, 06:37 AM
I suggest for larger boards if its possible for you to store this number in the datastore or somthing else, so this doesnt have to be run every time a user browses the board, ^^ just a thought that might speed things up
Acido
05-22-2004, 07:21 AM
I suggest for larger boards if its possible for you to store this number in the datastore or somthing else, so this doesnt have to be run every time a user browses the board, ^^ just a thought that might speed things up
I have not enought skills to do that. :(
Can you help?
Zachery
05-22-2004, 08:22 AM
Sadly im not that good with php ^^ altho Brian should be :p
bluesteel
05-22-2004, 10:36 PM
Made a VERY minor change to this hack.
In adv_portal_topposters template, find
<td width="100%"><span class="smallfont">$top_stats[top_posters]
</span></td>
And replace with
<td width="100%"><ol><span class="smallfont">$top_stats[top_posters]
</span></ol></td>
This should give you something like this
TYorke
06-05-2004, 06:49 PM
Don't forget to also change
$vboptions[blockbullet]
to
$vba_options[portal_blockbullet]
mholtum
06-07-2004, 07:10 AM
ok I followed the instructions. How do I activate it? I dont see it in Edit modules.
mholtum
06-07-2004, 07:13 AM
ok, I got it.. How can I make it look like my other modules? See image I have set up a dot image in the top left corner.. Won't show in the new topten module. Also there is no way for me to deactivate it.. I would like to add the default dot image I have on my other modules.
mholtum
06-07-2004, 07:18 AM
if I go to edit modules there is no title for this Module just "move to" hmmm
mholtum
06-08-2004, 03:01 AM
Anyone??
TYorke
06-09-2004, 06:22 PM
I can't make out what you are referring to because of the super small image you attached
mholtum
06-09-2004, 07:22 PM
Ok, sorry.. If you go to my site http://www.ravensrealm.net you will notice a small orange dot in the left corner of all my boxes.. I have this set to default.. It has appeared on every mudule I have created except this on..
Also when I go to edit Mods. I have no title for Top Ten, just a "Move to: [‹-] [«-]"
TYorke
06-10-2004, 02:14 AM
Ok, sorry.. If you go to my site http://www.ravensrealm.net you will notice a small orange dot in the left corner of all my boxes.. I have this set to default.. It has appeared on every mudule I have created except this on..
Also when I go to edit Mods. I have no title for Top Ten, just a "Move to: [‹-] [«-]"
I posted the fix for that above :)
Don't forget to also change
Code:
$vboptions[blockbullet]
to
Code:
$vba_options[portal_blockbullet]
mholtum
06-10-2004, 03:12 AM
So, as I assume, I am a retard.. :) And why dont I have a title in the edit mods section? I can't deactivate / activiate the module if I wanted to..
TYorke
06-10-2004, 07:18 PM
So, as I assume, I am a retard.. :) And why dont I have a title in the edit mods section? I can't deactivate / activiate the module if I wanted to..
Did you add a title to begin with? :D
mholtum
06-11-2004, 03:21 AM
Yes, at least I think I did... :confused: Ok, lets say I didnt.. Can I add it now? Or am I hosed?
tHe Rk
06-12-2004, 07:33 PM
Well done! I like it:cool:
bluesteel
06-13-2004, 11:53 AM
Ok, sorry.. If you go to my site http://www.ravensrealm.net you will notice a small orange dot in the left corner of all my boxes.. I have this set to default.. It has appeared on every mudule I have created except this on..
Also when I go to edit Mods. I have no title for Top Ten, just a "Move to: [‹-] [«-]"
Hi there,
Could you please tell me how to change my default so as to get a different gif to appear in the blocks like your orange dot?
Thanks!
mholtum
06-13-2004, 12:15 PM
look for the main options block and put in the IMG code I inserted <img src="/forum/images/dot.gif">
So, vBa CMPS / Default Settings / Enter your code
bluesteel
06-13-2004, 12:20 PM
Sorted!!
Thanks for the quick reply. Appreciated.
Al
mholtum
06-13-2004, 12:31 PM
Now you have to show me what you did. Link?
Nice one! Thanks
*installs*
I got this error
Unable to add cookies, header already sent.
File: /home2/home/public_html/modules/topten.php
Line: 15
I got this same error for your other top_rep hack acido
Fiber
08-07-2004, 03:34 AM
I can't beleive this! lol This is such a a simple install, but for some reason not working.
Everything is there except for the posters content?
LOL, this make no sense.
Fiber
Fiber
08-11-2004, 07:33 PM
Apparently this is not supported anymore.
Fiber
sully02
08-22-2004, 03:33 AM
I'm guessing not. I installed it, but cannot see the posters.
sully02
08-22-2004, 03:41 AM
Fiber, I think I figured out the problem.
Did you name your second template as topposters? As in without an underscore? If so, try putting an underscore in, so it reads top_posters.
It worked for me, and now I have the information up.
venomx
09-05-2004, 01:18 AM
I suggest for larger boards if its possible for you to store this number in the datastore or somthing else, so this doesnt have to be run every time a user browses the board, ^^ just a thought that might speed things up
Yeah this is why I have not added this to my site. :(
socals
09-05-2004, 02:35 AM
Using the following SQL statement, you can copy the top 10 posters into a database called topposters (with userid, username & posts fields)
INSERT INTO topposters (userid, username, posts) SELECT userid, username, posts FROM user WHERE posts > 0 ORDER BY posts DESC LIMIT 10
Made a VERY minor change to this hack.
In adv_portal_topposters template, find
<td width="100%"><span class="smallfont">$top_stats[top_posters]
</span></td>
And replace with
<td width="100%"><ol><span class="smallfont">$top_stats[top_posters]
</span></ol></td>
This should give you something like this
Can user's avatar be dispayed too ?
Since this mod seems not to be supported anymore, i made my own custom one...
Got it working on my site, if anyone is interested here is the link :)
http://www.vbadvanced.com/forum/showthread.php?t=1542
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.