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 |
#2
|
|||
|
|||
Can you make this avatar instead?
|
#3
|
|||
|
|||
yes sure... give me some time then i will make an avatar version too...
|
#4
|
|||
|
|||
to show the profile picture using avatar function use this code instead
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 user.userid AS userid, user.username AS username, customavatar.dateline AS dateline FROM ".TABLE_PREFIX."customavatar LEFT JOIN ".TABLE_PREFIX."user ON ".TABLE_PREFIX."customavatar.userid=".TABLE_PREFIX."user.userid WHERE 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].'" alt="'.$newuser[username].'"/><br />'.$newuser[username].'</a><br />'; } $output_bits .= '</p>'; $output = $output_bits; ob_end_clean(); |
#5
|
|||
|
|||
That didn't work
|
#6
|
|||
|
|||
|
#7
|
|||
|
|||
Is there anyway to make the profile pics smaller?
|
#8
|
||||
|
||||
I get a database error on content.php every time I put this widget on!?
Code:
Database error in vBulletin 4.0.1: Invalid SQL: SELECT user.userid AS userid, user.username AS username, customprofilepic.dateline AS dateline FROM vbcustomprofilepic LEFT JOIN vbuser ON vbcustomprofilepic.userid=vbuser.userid WHERE customprofilepic.visible = 1 ORDER BY RAND() LIMIT 3; MySQL Error : Unknown column 'user.userid' in 'field list' Error Number : 1054 |
#9
|
|||
|
|||
yes you can add in width and height to the img code example like below:
Code:
$output_bits .= '<a href="member.php?u='.$newuser[userid].'"><img src="image.php?u='.$newuser[userid].'&dateline='.$newuser[dateline].'" alt="'.$newuser[username].' width="50px" height="50px""/><br />'.$newuser[username].'</a><br />'; Quote:
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 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(); |
#10
|
|||
|
|||
i got the links to the profiles, but not profile picture? what's wrong? thanks
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|