The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I need the two variables, not sure if that's what I can reefer to them as.
Its for my forum statistics panel. Last Registered User Top Poster thanks ahead of time |
#2
|
||||
|
||||
![]()
There's already a variable for the Latest User.
Latest User: Code:
$newusername = $vbulletin->userstats['newusername']; SELECT userid, usergroupid, IF(displaygroupid=0, usergroupid, displaygroupid) AS displaygroupid, username, posts FROM " . TABLE_PREFIX . "user WHERE posts > 0 ORDER BY posts DESC LIMIT 1");[/sql] Use $topposter[username], $topposter[userid], $topposter[usergroupid], or $topposter[posts] as variables. |
#3
|
|||
|
|||
![]()
thanks, so do I paste these right in the template? No right?
Is it possible to just use $newusername and $topposter[username] without that code? no huh? some help needed ![]() |
#4
|
||||
|
||||
![]()
Depending on what page you're trying to display these on, you can use Plugins.
|
#5
|
|||
|
|||
![]()
FORUMHOME template
maybe in the future FORUMDISPLAY and SHOWTHREAD let me know how it can be done for FORUMHOME, and if it can for the other two templates. thanks ahead of time. |
#6
|
||||
|
||||
![]()
Create a New Plugin using Hook Location "forumhome_start". Fill it with this:
Code:
$topposter = $db->query_first(" SELECT userid, usergroupid, IF(displaygroupid=0, usergroupid, displaygroupid) AS displaygroupid, username, posts FROM " . TABLE_PREFIX . "user WHERE posts > 0 ORDER BY posts DESC LIMIT 1"); $newusername = $vbulletin->userstats['newusername']; |
#7
|
|||
|
|||
![]()
works great! THANK YOU! I used $topposter[username] and $newusername
so if I want to use this plugin on another template I just change the hook location, correct? Thanks again.. |
#8
|
||||
|
||||
![]()
Right, or you can make another hook using the same contents, but change the location. Forumdisplay is (I believe) forumdisplay_start and Showthread is (Again, I believe) showthread_start.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|