The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||||||
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 |
#62
|
|||
|
|||
![]() Quote:
So I would also appreciate a choice for avatars NOT being stored in the database ![]() It would also be great to limit the ramdom users to the last 500 og 1000 users logged in ![]() Anyway this is still a great widget for the once who can use it ![]() ![]() |
#63
|
|||
|
|||
![]()
I modified it a little to work with custom avatars stored in the file system. Might not be the best way but it works, hopefully this helps out.
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."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 = '<p align="center"'; while($newuser = vB::$db->fetch_array($newusers_get)) { $output_bits .= '<a href="member.php?u='.$newuser[userid].'"><img src="/customavatars/avatar'.$newuser[userid].'_'.$newuser[avatarrevision].'.gif" alt="'.$newuser[username].'"/><br />'.$newuser[username].'</a><br />'; } $output_bits .= '</p>'; $output = $output_bits; ob_end_clean(); |
#64
|
|||
|
|||
![]()
Regardless which setup you are using, if you want to limit it just to a single usergroup find line:
After Code:
$member_count = 3; Code:
$usergroup_limit = 6; Code:
WHERE ".TABLE_PREFIX."customavatar.visible = 1 Code:
WHERE ".TABLE_PREFIX."customavatar.visible = 1 AND ".TABLE_PREFIX."user.usergroupid = $usergroup_limit |
#65
|
|||
|
|||
![]()
This is a nice add-on. I am completely new to Vb and php. If someone could advise me of how to limit this to logged in members, that would be great. Again, nice add-on.
|
#66
|
|||
|
|||
![]()
Installed and works great in CMS with v4.03 .. thanks .. :up:
Any chance of getting similar piece of code to create a "block" for the side block function in v4? Regards, Badger:up: |
#67
|
|||
|
|||
![]()
Installed nominated and rated, thank you very much for this widget code
Is there a way to show this horizontaly not verticaly? That is can we display avatars/profile pic left to right instead up and down? |
#68
|
|||
|
|||
![]() Quote:
nice mod, installed & working great on CMS v4.0.3 |
#69
|
|||
|
|||
![]()
I'd really like that too
![]() |
#70
|
|||
|
|||
![]()
In 4.04 for some reason only the 2nd or 3rd avatar can be clicked, not the first. I can't find why...
|
#71
|
|||
|
|||
![]()
Hallo ... i use VB 4.0.6 ... the widget shows the name of the user but not a picture ... what`s wrong? THX
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|