The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Widget - Show random members with picture Details »» | |||||||||||||||||||||||||||||
Widget - Show random members with picture
Developer Last Online: Jun 2010
#Function:
#Installation:
#code to use custom profile picture as the source of picture Code:
$member_count = 3; ob_start(); require_once('./includes/functions_user.php'); require_once('./includes/functions_bigthree.php'); // Get Random Members $newusers_get = vB::$db->query_read(" SELECT ".TABLE_PREFIX."user.userid AS userid, ".TABLE_PREFIX."user.username AS username, ".TABLE_PREFIX."customprofilepic.dateline AS dateline FROM ".TABLE_PREFIX."customprofilepic LEFT JOIN ".TABLE_PREFIX."user ON ".TABLE_PREFIX."customprofilepic.userid=".TABLE_PREFIX."user.userid WHERE ".TABLE_PREFIX."customprofilepic.visible = 1 ORDER BY RAND() LIMIT $member_count"); $output_bits = '<p align="center"'; while($newuser = vB::$db->fetch_array($newusers_get)) { $output_bits .= '<a href="member.php?u='.$newuser[userid].'"><img src="image.php?u='.$newuser[userid].'&dateline='.$newuser[dateline].'&type=profile" alt="'.$newuser[username].'"/><br />'.$newuser[username].'</a><br />'; } $output_bits .= '</p>'; $output = $output_bits; ob_end_clean(); Code:
$member_count = 3; ob_start(); require_once('./includes/functions_user.php'); require_once('./includes/functions_bigthree.php'); // Get Random Members $newusers_get = vB::$db->query_read(" SELECT ".TABLE_PREFIX."user.userid AS userid, ".TABLE_PREFIX."user.username AS username, ".TABLE_PREFIX."customavatar.dateline AS dateline FROM ".TABLE_PREFIX."customavatar LEFT JOIN ".TABLE_PREFIX."user ON ".TABLE_PREFIX."customavatar.userid=".TABLE_PREFIX."user.userid WHERE ".TABLE_PREFIX."customavatar.visible = 1 ORDER BY RAND() LIMIT $member_count"); $output_bits = '<p align="center"'; while($newuser = vB::$db->fetch_array($newusers_get)) { $output_bits .= '<a href="member.php?u='.$newuser[userid].'"><img src="image.php?u='.$newuser[userid].'&dateline='.$newuser[dateline].'" alt="'.$newuser[username].'"/><br />'.$newuser[username].'</a><br />'; } $output_bits .= '</p>'; $output = $output_bits; ob_end_clean(); Screenshots
Supporters / CoAuthors Show Your Support
|
Comments |
#82
|
|||
|
|||
is possible to show 3 random users per month?
i mean the same 3 users during a whole month |
#83
|
|||
|
|||
This works on vb 4.1.1 and by the way works as a sideblock when used as php
|
#84
|
|||
|
|||
@rob just set the cache time to a month (do the math to figure out how many minutes are in 30 days), then clear the cache on the 1st of next month.
i have the same problem as dooch the first user has no link. |
#85
|
||||
|
||||
I know this thread is old and all, but for those that were having problems with the first item not being linked I have solved the problem with the help of my Super Moderator on my website. He noticed that the following line was malformed. I am showing the original and the corrected versions in the hope it helps some of you. Take care!
PHP Code:
PHP Code:
|
Благодарность от: | ||
Konsolenheld |
#86
|
|||
|
|||
avatars dosnt seem to show up, and neither the catch up, also i apply the fix savage mentions.. but still im having the same problem (the first dosnt show up)
|
#87
|
||||
|
||||
rob01, your avatars are stored in the DB, yes?
|
#88
|
|||
|
|||
good stuff, SON!
|
#89
|
|||
|
|||
I can't get this work. I my widget window I have only this:
Quote:
Any help please? |
#90
|
||||
|
||||
Quote:
$usergroup_limit=something |
#91
|
||||
|
||||
Quote:
The first item not being linked! |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|