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 |
#72
|
|||
|
|||
Same here, sometimes it shows all photos, sometimes it shows some of them and sometimes none....?
|
#73
|
|||
|
|||
i have the same problems
|
#74
|
|||
|
|||
Ok, this is for a block in the forum or the CMS widget, assuming that you have avatars set to filesystem, NOT database
Be sure to change the member count to however many you want to show. Also, look down at the bottom of the code where the <img src= tag is and make sure the path to the forums directory is right for your board. I hope this works for you. PHP Code:
|
#75
|
|||
|
|||
I tweaked this widget to work HORIZONTALLY. Let me know if it's good. You can change the member count and the avatar size. Also, if you do not want to limit it to a certain usergroup, remove this line "$usergroup_limit = 2;"
Code:
$member_count = 8; $usergroup_limit = 2; 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."user.avatarrevision AS avatarrevision, ".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 = '<table cellpadding="5"><tr>'; while($newuser = vB::$db->fetch_array($newusers_get)) { $output_bits .= '<td><a href="member.php?u='.$newuser[userid].'"><img src="/customavatars/avatar'.$newuser[userid].'_'.$newuser[avatarrevision].'.gif" alt="'.$newuser[username].'"/ width="100" height="100"><br />'.$newuser[username].'</a></td>'; } $output_bits .= '</tr></table>'; $output = $output_bits; ob_end_clean(); |
#76
|
|||
|
|||
Is there a way to show recent new member avatar not random member ?
displayed horizontaly or verticaly automaticly ? or random member avataro showed horizontaly and vertically automatic adjust ? Installed nominated and rated, thank you very much for the widget code |
#77
|
||||
|
||||
will this work with forums? if not will you make one that works?
|
#78
|
||||
|
||||
Check out post 73 :up: |
#79
|
||||
|
||||
thanks! , im using vbseo on my forum donno if that's what is making the avatars not show up?
|
#80
|
||||
|
||||
how can i move it to other parts of the forum?
|
#81
|
|||
|
|||
the first random member has no link to their profile?
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|