We did have that but then it had to be modified so that it would link to the users profile although I will try someting that you suggested that I didnt try thank you
Results 41 to 45 of 45
Thread: Newest User code
-
23-03-2012, 02:15 PM #41
www.ultima-auctions.com powered by webid
-
23-03-2012, 04:56 PM #42
-
23-03-2012, 06:32 PM #43If you found my posts helpful, feel free to thumb it upFORCE ME TO WORK HARDER ----> DONATE recived (147 $) THANKS ALL

-
23-03-2012, 09:10 PM #44
-
23-03-2012, 09:36 PM #45
Okay with a mixture of both of your help! I got 3 users showing and them linking properly!
For Last users
in Index.php
Code://last user $query = "SELECT id, nick, reg_date FROM " . $DBPrefix . "users ORDER BY reg_date DESC LIMIT 3"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); while ($lastuser = mysql_fetch_assoc($res)) { $template->assign_block_vars('lastuser', array( 'ID' => $lastuser['id'], 'NICK' => $lastuser['nick'], 'DATA_REG' => FormatDate($lastuser['reg_date']) )); }
For Home.tpl
Code:<!-- BEGIN lastuser --> <ul> <li><a href="{SITEURL}profile.php?user_id={lastuser.ID}">{lastuser.NICK}<br>{lastuser.DATA_REG}</li> </ul> <!-- END lastuser -->
Thank you everyone for your help seriously!! Mega thank you!.. Just away to adapt it to be for last user login!!
Last Log in Code!
For index.php
Note LASTLOGIN does not need FormatDate because it is already in date format on DBCode://last login $query = "SELECT id, nick, lastlogin FROM " . $DBPrefix . "users ORDER BY lastlogin DESC LIMIT 3"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); while ($lastlogin = mysql_fetch_assoc($res)) { $template->assign_block_vars('lastlogin', array( 'ID' => $lastlogin['id'], 'NICK' => $lastlogin['nick'], 'LASTLOGIN' => $lastlogin['lastlogin'] )); }
for home.tpl
these codes will give you a list of 3 users for most recently active and most recently registered. it can be changed to include as many as you want (i assume) and it will link to that users profile so you can easily fdind their active auctions and their feedbackCode:<!-- BEGIN lastlogin --> <ul> <li><a href="{SITEURL}profile.php?user_id={lastlogin.ID}">{lastlogin.NICK}<br>{lastlogin.LASTLOGIN}</li> </ul> <!-- END lastlogin -->
Again thank you everyone who helped
I have learned a hell of a lot doing this! and think I could manipulate code with a little more confidence!
Last edited by Rupert Avery; 23-03-2012 at 09:47 PM.
www.ultima-auctions.com powered by webid



Reply With Quote


Bookmarks