The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
![]() Quote:
Thanks for the pointers, I was a little rusty since it's been a few months since I wrote any mods. I'll add these changes and repost. |
#12
|
||||
|
||||
![]()
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. |
#13
|
|||
|
|||
![]()
Code was changed above to reflect changes. It's stored in a html table with 100% width, just hold it in a container/div of the required width. Still call using $Top5. It caches the top posters when a user visits forumhome. It could be optimized a bit by using a cron instead but I'll leave that to you, however it shouldn't be a problem.
|
#14
|
||||
|
||||
![]()
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. |
#15
|
|||
|
|||
![]() Quote:
![]() |
#16
|
||||
|
||||
![]()
#848484 for the nick
#FFFF00 for the number Thank you Bellardia!!!!!!!! |
#17
|
|||
|
|||
![]()
Glad to help
![]() Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="top5posters" active="1"> <title>Top 5 Posters</title> <description>Gets a string of the top five posters, and parses where $Top5 is included in a template</description> <version>0.1</version> <url /> <versioncheckurl /> <dependencies> </dependencies> <codes> </codes> <templates> </templates> <plugins> <plugin active="1" executionorder="5"> <title>Top5Posters</title> <hookname>forumhome_start</hookname> <phpcode><![CDATA[global $vbulletin; $GrabString = $vbulletin->db->query_read("select `username`, `posts` from `".TABLE_PREFIX."user` ORDER BY `posts` DESC limit 0, 4;"); while ($GrabTop = $vbulletin->db->fetch_array($GrabString)) { $Top5Store[] = '<tr><td width="100%" style="color:#848484;">'.$GrabTop['username'].'</td><td style="white-space:nowrap; color:#FFFF00">'.$GrabTop['posts'].'</td></tr>'; } $Top5Store = '<table width="100%" border="0" style="color:#FF0">'.implode('', $Top5Store).'</table>'; htmlspecialchars_uni($Top5Store); build_datastore('TopPosters', $Top5Store); unset($GrabTop, $Top5Store, $GrabString);]]></phpcode> </plugin> <plugin active="1" executionorder="10"> <title>Parse Names</title> <hookname>global_start</hookname> <phpcode><![CDATA[$Top5 = $vbulletin->TopPosters;]]></phpcode> </plugin> <plugin active="1" executionorder="5"> <title>DataStore</title> <hookname>init_startup</hookname> <phpcode><![CDATA[$datastore_fetch[] = "'TopPosters'"; $Top5 = $vbulletin->TopPosters;]]></phpcode> </plugin> </plugins> <phrases> </phrases> <options> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> </product> |
#18
|
||||
|
||||
![]()
Bellardia.....PERFECT!!
Thanks so much, looks GREAT. Thanks so much for being patient and so helpful!!! ![]() ![]() ![]() ![]() ![]() |
#19
|
||||
|
||||
![]()
What's the point of putting the data into the datastore when you're going to update it every time? You need to add a "time to live" on the variable (e.g. TIMENOW + 10 mins), then check if this time is up, if it is not, don't update the cache, but use the data already in the cache.
|
#20
|
||||
|
||||
![]() 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. ![]() Thank you!! |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|