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)

rob01 04-29-2011 04:43 AM

is possible to show 3 random users per month?

i mean the same 3 users during a whole month

jgt58 05-01-2011 08:17 PM

This works on vb 4.1.1 and by the way works as a sideblock when used as php

Wordplay 05-07-2011 10:59 AM

@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.

Savage Circuits 05-17-2011 09:07 PM

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:

$output_bits '<p align="center"'

And the corrected version:

PHP Code:

$output_bits '<p align="center">'


rob01 05-19-2011 07:40 PM

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)

Savage Circuits 05-23-2011 05:11 PM

rob01, your avatars are stored in the DB, yes?

DNN 05-26-2011 11:59 PM

good stuff, SON!

dune3000 05-27-2011 01:34 PM

I can't get this work. I my widget window I have only this:
Quote:

05-27-2011

Any help please?

voter 06-08-2011 07:02 PM

Quote:

Originally Posted by tattooz (Post 2099732)
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(); 


You forgot to include the line
$usergroup_limit=something

Anopheles 06-19-2011 07:38 AM

Quote:

Originally Posted by Savage Circuits (Post 2196900)
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:

$output_bits '<p align="center"'

And the corrected version:

PHP Code:

$output_bits '<p align="center">'


It doesn't work!
The first item not being linked!

Steve_GB 06-19-2011 09:46 AM

Quote:

Originally Posted by Anopheles (Post 2209770)
It doesn't work!
The first item not being linked!

It worked for me and I'm very pleased to at last have the random profile image linked and fully working.

Steve

MySaltyreef 07-10-2011 12:46 AM

works 100%

kamalia 07-19-2011 08:02 AM

there's no option to create widget..i'm using vbulletin 4.1.3 classic (standard)..any idea?

Davey-UK 07-23-2011 06:35 AM

Excellent. Working 100% now in VB4.1.4

I would prefer the Latest members, rather than random members though. Could someone modify it slightly? Please.

Marked installed. :D

cykelmyggen 07-28-2011 06:12 AM

Quote:

Originally Posted by Savage Circuits (Post 2196900)
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:

$output_bits '<p align="center"'

And the corrected version:

PHP Code:

$output_bits '<p align="center">'


Solved problem with first item not being linked, Thanks :). However images aren't showing up?

Konsolenheld 08-25-2011 06:24 PM

Thanks!!

Savage Circuits 09-23-2011 09:42 PM

Yeah, I'm afraid I discontinued use of this widget until the author makes some updates. I had several reports of banned members (spammers on my site) being shown. That's not good. =(

just77me 08-17-2012 12:29 PM

Hello, does anyone has a code that works horizont -> 6 Pictures in a line? There is a guy describing that on a page bevore, but that doesn't show any pictures...

please anyone fixing the code from the first side to view pictures in a line.

Thank you very much.

Greetings

just77me 08-21-2012 09:47 AM

Hello there - can anyone help me to get the horizont version working?

just77me 09-09-2012 07:03 PM

no one there who can help me?

AFemaleProdigy 09-20-2012 11:35 PM

In the line for $output_bits just wrap the link and image in a div with a class name. You can make horizontal layout work with CSS.

Also, it shouldn't show banned users if you use the edited version that specifies a certain usergroup.

I too would like to know how to specify x most recent new users. Anyone have any ideas on how to edit this for that purpose?

John Lester 10-16-2012 09:22 PM

These changes will show the avatars (or profile pics depending on which one you chose to show) only if the member is in the user group(s) you specify. The current code only allows for one user group, this allows for more :)

Delete
Code:

$usergroup_limit = 2;
Replace
Code:

$usergroup_limit
With (you can add other user group ids if you want just follow the format in the ( )'s )
Code:

IN (2, 6, 7)

ringnews24 12-16-2012 04:09 PM

Is it possible to add stats below the picture

Like

Username
Joined Date
Total Posts

And set it to say only show users with posts over 1000 ?


All times are GMT. The time now is 04:09 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.01475 seconds
  • Memory Usage 1,781KB
  • 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
  • (3)bbcode_code_printable
  • (7)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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