nBm
11-05-2012, 07:18 PM
Hi guys,
I've got a problem. I uploaded in my forum a plugin for use the avatar variable ({vb:raw cus_avatar}) in headinclude template, but i want that the image will be resized in 100x100, whatever the size.
The script is this:
if ($vbulletin->userinfo['userid'])
{
require_once('./includes/functions_user.php');
$avatar_url = fetch_avatar_url($vbulletin->userinfo['userid']);
$avatar = $avatar_url[0];
$cus_avatar = '<a href="profile.php?do=editavatar"><img src="'.$avatar.'" border="0" alt="" /></a>';
$templater = vB_Template::create('headinclude');
$templater->register('cus_avatar', $cus_avatar);
vB_Template::preRegister('headinclude',array('cus_ avatar' => $cus_avatar));
$templater->render();
}
I tried to use spans or divs, but in vain.
There is a method for insert into the php code the image resizing?
Thanks :)
I've got a problem. I uploaded in my forum a plugin for use the avatar variable ({vb:raw cus_avatar}) in headinclude template, but i want that the image will be resized in 100x100, whatever the size.
The script is this:
if ($vbulletin->userinfo['userid'])
{
require_once('./includes/functions_user.php');
$avatar_url = fetch_avatar_url($vbulletin->userinfo['userid']);
$avatar = $avatar_url[0];
$cus_avatar = '<a href="profile.php?do=editavatar"><img src="'.$avatar.'" border="0" alt="" /></a>';
$templater = vB_Template::create('headinclude');
$templater->register('cus_avatar', $cus_avatar);
vB_Template::preRegister('headinclude',array('cus_ avatar' => $cus_avatar));
$templater->render();
}
I tried to use spans or divs, but in vain.
There is a method for insert into the php code the image resizing?
Thanks :)