View Full Version : How can i get avatar's width and height?
ovnnet
05-19-2008, 03:14 PM
I'm making a mod integration with avatar. I need set condition if avatar width is > 100. But i cannot get its width. $post[avwidth] return width="xx". I need the width number only. How can i do it?
Thank you
ovnnet
05-24-2008, 01:23 PM
Still looking for the help.
Lynne
05-24-2008, 03:52 PM
It looks like you want to play with the code in the class_postbit.php file right around lines 610 or so. That is where the width and height part of the image tag are defined and where you have access to the variables. (This shows up in several other files also, but you seemed to be interested in the postbit. You can do a global search through your files for "avwidth" and find all the places it is used.)
ovnnet
05-25-2008, 11:47 AM
Thank you, i can edit this now
if ($this->post['avwidth'] AND $this->post['avheight'])
{
// $this->post['avw'] = $this->post['avwidth'] ;
// $this->post['avh'] = $this->post['avheight'] ;
$this->post['avwidth'] = 'width="' . $this->post['avwidth'] . '"';
$this->post['avheight'] = 'height="' . $this->post['avheight'] . '"';
}
But i want to create new variable to get only width and height like this, but i still get width="" height="" instead the numbers. Something is wrong?
Lynne
05-25-2008, 04:23 PM
Why don't you just say:
$avwidth = $this->post['avwidth'] ;
$avheight = $this->post['avheight'] ;
and use those new variables?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.