The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Random User Widget
Hello,
is it possible to display a couple of users but random order? I want to display (eg 15 ) User in a row. But every pageload it should display random users. Is there a template function or tag for randomize something? Or do anybody have any other idea? Thanks |
#2
|
||||
|
||||
I try to get a random number like this:
PHP Code: PHP Code:
in template: HTML Code:
<vb:if condition="$page['random'] == 1>do something</vb:if> <vb:if condition="$page['random'] == 2>do something more <vb:else /> do something else </vb:if> Is there a possible way to get a random number so I could change sortorder about a if condition=random ==1 / 2 /3 eg or could I change the limit of data so I can change the "selection" by a if on timenow = monday ... or any other way? Iam totally become desperate on this thing! Any help pleeeeease... I just try to do a list of 15 different (random) user. Iam very thankfull for any help I could get! Thanks a lot again! Got it: Creat a new php-file "random.php" (place it into ...includes/vb5/frontend/controller/ : PHP Code:
{vb:action random_result, random, randomnum} {vb:raw $random_result} Question: How could I get max(userid) to limit the random? Because I got no answer to this poor forum-system (without a good code documentation and unfortunately no support) I did the following: go to core/vb/db/mysql/querydefs.php and find: PHP Code:
PHP Code:
HTML Code:
{vb:set config, {vb:php array}} {vb:set config.perpage, {vb:raw widgetConfig.number_of_users}} {vb:set config.sortfield, 'random'} Iam not that got in php...so I have to find workarounds :-) |
#3
|
||||
|
||||
how could i call for a certain usergroup to collect members of that group
|
#4
|
||||
|
||||
$user['usergroupid']=6;
$profile[]=''; $result=vB_Api::instance('user')->getUsersFromCriteria($user,$profile,$options = array()); print_r($result); Note: Requires admin permissions |
#5
|
||||
|
||||
thanks bro, really got me thinking ....
be safe |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|