The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
latest user
Hi,
I'd like to display the latest 5 users who registered to my forum. What do I have to edit please? Thanks any help? |
#2
|
||||
|
||||
Where do you want it displayed?
Off the top of my head, place something like in the file you want it: PHP Code:
|
#3
|
||||
|
||||
I think if you are going to use query instead of query_first you need to use 'while' like this:
PHP Code:
|
#4
|
||||
|
||||
I'm trying to add the joindate to this, but I'm not sure how format it to display.
heres the code: Code:
$newestmembers = $DB_site->query(" SELECT userid, username, joindate FROM user ORDER BY userid DESC LIMIT 20 "); while ($shownewest=$DB_site->fetch_array($newestmembers)) { $counter++; $newuserid = $shownewest['userid']; $newusername = $shownewest['username']; $newuserjoin = $shownewest['joindate']; $newestbit .= "<a href=\"member.php?u=$newuserid\">$newusername</a> ($newuserjoin)"; if ($counter < 20) { $newestbit .= "<br /> "; } } Code:
Blue[sK] (1117254613) ebad (1117254372) 123qwe (1117254139) pointvu (1117253360) lilbudbud03 (1117252790) tugger9709 (1117252356) TheCraftMaster10 (1117252283) sonnie (1117251372) hellohellorex (1117251360) waterfall2cold (1117250130) LonLey (1117249889) eN.Banged (1117249323) cornpops (1117248783) mokodoko (1117248778) pimpsta123 (1117248764) g4it (1117248533) ace2255 (1117248231) thaphantomone (1117248186) Masta-killa (1117248057) aqz (1117247951) |
#5
|
||||
|
||||
You need to convert the time stamps.
Add something like PHP Code:
@eric: typo |
#6
|
||||
|
||||
Another thing you may want to consider is to cache this info in the datastore to save on queries.
Amy |
#7
|
||||
|
||||
Quote:
I want it to be displayed in the index.php so what code do I have to eliminate? Thanks |
#8
|
|||
|
|||
I recomend installing the Stats Hack
|
#9
|
||||
|
||||
Quote:
|
#10
|
||||
|
||||
Here's the updated one with datastore
index.php: Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
HTML Code:
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div> HTML Code:
<div>Welcome to our newest members, $newestbit </div> (newestmemberscron.php - put in /includes/cron) PHP Code:
.. first time having to use datastore, hopefully it's somewhat right. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|