![]() |
Top 5 posters
Is it possible to list the top 5 posters? Such as using a "$"?
TIA -Joseph |
You can't call them by any defined function, but you could make a short plugin that uses a single query to find the top 5, and then style them as you want.
|
Quote:
|
Quote:
Styling them wouldn't be much harder either if using basic styles. However pulling other information with them would take joins (say, color of username, usertitle etc) but nonetheless quite simple in essence. Depending on what your needs are I could write up a quick script for you. |
Quote:
I created a sidebar and I want it to go within "Top 5 Posters" block, 3rd from the top. I just want the nick of the poster on the far left, and number of posts on the far right. With the highest poster on top, to the lowest on bottom. If possible, making the numbers yellow and keeping the names default. I'll open the forum so you can see the side block I'm referring to. Thank you so much for your kindness! -Joseph http://www.warfaith.com/ |
I have class now, so just give me 3-4 hours ;p
|
Quote:
I'll close the forum back up...Thank you!!!!! |
Open a plaintext editor, paste in the code below, and save it as something. Upload it as a product.
Where you want the names to appear, place '$Top5' in the template, and they will be inserted in yellow color. You can specify your own color of yellow by finding and replacing '#ff0' with any hex color of your choice. I just used the default yellow because I don't know what you're after ;) Please don't repost, submit, or distribute without asking! Feel free to use as you need. 1 Query, 0 File edits, 0 Uploads Code:
<?xml version="1.0" encoding="ISO-8859-1"?> |
First, thank you for the time you spent on writing this code.
It partially works. Does not show the number of posts. Just shows users in sequence separated by a comma. |
1) You do not need to evaluate that code...
2) And therefore, do not need addslashes(). 3) You should run htmlspecialchars_uni() on the username. 4) This is the sort of data that the datastore should cache. No one cares if the data is 10 minutes off or so... |
Quote:
Quote:
|
I just want the nick of the poster on the far left, and number of posts on the far right. With the highest poster on top, to the lowest on bottom.
Thank you. |
Quote:
|
Bellardia,
Works great!!! One final request please Bellardia; is it possible to have the nick the system color? It would be nice to only have the number in yellow, and the name in the system color, both are yellow now. Thank you Bellardia. |
Quote:
|
Quote:
#FFFF00 for the number Thank you Bellardia!!!!!!!! |
Glad to help ;) It allows me to practice and learn some of the vb features better anyways.
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> |
Bellardia.....PERFECT!!
Thanks so much, looks GREAT. Thanks so much for being patient and so helpful!!! :):D:eek::up:;):p |
Quote:
|
Quote:
One other thing, not a big deal, but it would be nice if it could be changed. :) The first digit is showing up on the left, instead of the right. Please see graphic; zero under one. It would be nice just to have numbers begin on the far right. https://vborg.vbsupport.ru/external/2009/01/4.bmp Thank you!! |
Hopefully this will be my final revision :x
Fixed alignment, and updates every 20minutes. Code:
<?xml version="1.0" encoding="ISO-8859-1"?> |
Bellardia, you are a "Coding Saint". Now it is PERFECT!!
Today is my birthday; thank you for all the time you spent helping me, fantastic present. Peace my friend. :p:D:):rolleyes::eek::cool:;):up: |
Quote:
First line of the plugin at init_startup, you have too many sets of quotes. Second line is not needed at all. When using build_datastore(), you can set a third parameter, which can automatically unserialize the data for you. Also, you want to run htmlspecialchars_uni on the username, not the whole thing. Finally, you might want to look at the vBulletin Coding Standards document. |
it would be amazing if this could be edited to show the top 10 latest posts for the sidebar.
When I added the latest it only displayed the top 4 posters? |
I'm using an old hack and need to work on this one. If I had the time I'd probably take a better look. I'm shocked that nobody has done a good one for this very popular function.
|
All times are GMT. The time now is 12:48 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|