vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Widget - Show random members with picture (https://vborg.vbsupport.ru/showthread.php?t=235460)

tattooz 09-14-2010 12:44 AM

Quote:

Originally Posted by mse2k (Post 2085464)
Hallo ... i use VB 4.0.6 ... the widget shows the name of the user but not a picture ... what`s wrong? THX

Same here, sometimes it shows all photos, sometimes it shows some of them and sometimes none....?

dang3rzon3 09-16-2010 09:43 PM

Quote:

Originally Posted by mse2k (Post 2085464)
Hallo ... i use VB 4.0.6 ... the widget shows the name of the user but not a picture ... what`s wrong? THX

i have the same problems :mad:

tattooz 09-17-2010 06:19 PM

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:

$member_count 1;

  
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 AND ".TABLE_PREFIX."user.usergroupid = $usergroup_limit
   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="/forums/customavatars/avatar'.$newuser[userid].'_'.$newuser[avatarrevision].'.gif" alt="'.$newuser[username].'"/ width="125" height="125"><br />'.$newuser[username].'</a><br />';
  }
  
$output_bits .= '</p>';
  
$output $output_bits;
  
ob_end_clean(); 


tattooz 01-08-2011 07:21 PM

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();


erikcx 01-27-2011 05:21 PM

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

MrBig 01-28-2011 07:19 AM

will this work with forums? if not will you make one that works?

ProFifaLeagues 01-28-2011 07:28 AM

Quote:

Originally Posted by MrBig (Post 2155593)
will this work with forums? if not will you make one that works?


Check out post 73 :up:

MrBig 01-29-2011 09:40 AM

Quote:

Originally Posted by rammieone (Post 2155596)
Check out post 73 :up:

thanks! , im using vbseo on my forum donno if that's what is making the avatars not show up?

MrBig 02-11-2011 06:00 AM

how can i move it to other parts of the forum?

dooch 04-22-2011 03:37 PM

the first random member has no link to their profile?


All times are GMT. The time now is 04:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01111 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete