![]() |
Avatar Resizing
Hi guys,
Have a weird one here but I want to resize an avatar displayed using %. However, when doing it with the below method the image does not display. Code:
<a href="profile.php?{$session[sessionurl]}do=editavatar"><img src="/forum/image.php?u={$bbuserinfo['userid']}" width="30%" height="30%"></a> Code:
/image.php?u=45&height=30%&width=30% Matt |
It seems to me like the first code you posted works. I'm not an html expert, but I think 30% could mean a different thing depending on where you put the code. Also, if a user has no avatar the image will be blank.
|
Hi,
Thanks for your reply. The code is used in a template on the forumhome. The image with the first code simply does not show whereas change it to a pixel ie. width="200" works. It seems to be a problem with the percentage for the img tag. |
Quote:
Try Code:
<table border="0" cellpadding="0" cellspacing="0"><tr><td><a href="profile.php?$session[sessionurl]do=editavatar"><img src="/forum/image.php?u=$bbuserinfo[userid]" width="30%" height="30%"></a></td></tr></table> Of course, this is working on the assumption that you already have the avatar displaying on forumhome without any resizing taking place. |
Quote:
|
Quote:
|
Quote:
|
Sorry to say but that code doesnt work either. The avatar simply does not display...
Cant get my head round it... change the height & width to pixels and it works fine. Furthermore, no. The avatar does not already display on the forumhome Peterska. I am adding a welcome tempate to the top of the forumhome in vb3. My only option may be hard coding it into the image.php file? |
Which browser are you using? Can you show us a little more of the code around where you're putting it?
I don't think changing image.php would work because it wouldn't have any way to know what "30%" meant, and even if it did you would need to call a funciton to resize the mage. |
Yes here is the template. It is a modification of a welcome panel here on vb.org
Code:
<if condition="$vbulletin->options['onoff']"> Well it would sure be possible to send just the GET vars to the php file to then add the % in the variable outputs in the php code? |
All times are GMT. The time now is 02:32 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|