The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I was wondering what's the vbulletin code for fetching the user avatar and his/her user name.
|
|
#2
|
||||
|
||||
|
PHP Code:
|
|
#3
|
|||
|
|||
|
thanks Dismounted, I wondering how to do this:
i want to make a kind of user avatar gallery, but i don't want it to show all my users but just the ones that want to be shown, any idea how to make this (even if just prototype) Thanks for quick help
|
|
#4
|
|||
|
|||
|
You'd have to create user CP permissions so they can select if to show or not. Then you'd have to grab each user's avatar and place them in the gallery.
|
|
#5
|
|||
|
|||
|
what about if i let them join a user group and only show pictures for this user group but how can i just show the pictures from a certain user group
--------------- Added [DATE]1248979590[/DATE] at [TIME]1248979590[/TIME] --------------- guys how should i enter the code? should i put it in template or php file for the custom vb page |
|
#6
|
|||
|
|||
|
any help here please?
|
|
#7
|
|||
|
|||
|
php page. templates won't accept php.
|
|
#8
|
|||
|
|||
|
but where should i put it and then what should i put in the template here is the code of the page:
Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'imamac'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'imamac',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Im a Mac';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('imamac') . '");');
$userinfo = fetch_userinfo($userid, 2);
$test123 = "test";
echo "$test123";
?>
|
|
#9
|
||||
|
||||
|
Now this is a little more complicated. You'll have to create a query to fetch the avatars (instead of using the function), and join the userfield table to check if it should be shown. This requires more in-depth PHP knowledge, and can't really be done in a short tutorial.
|
|
#10
|
|||
|
|||
|
Quote:
thanks |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|