The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Retrieve Avatar Size Information
I have Oblivion Knight's IE PNG transparency fix hack installed, and it's working beautifully except for one problem: It doesn't work for avatars. According to the hack, it's because that the height and width needs to be defined for the avatar in order for the fix to kick in.
So I'm looking for a way to add height and width attributes to the avatar definition in my postbit_legacy. Natch explained a way to do this, but unfortunately his code is for vB 3.0 and the code to modify in question has changed significantly in 3.5 (note that he says to modify functions_showthread.php, which doesn't exist in 3.5). Can someone else possibly figure out how to do this? |
#2
|
||||
|
||||
Are you managing this in a .php file or could you consider setting the width/height values in the template? With this mod, I've forced the avatars, regardless of what the Admin CP settings were, to custom definitions. You could also use a class attribute. Then again, I could be way off the track here of what you're trying to accomplish.
|
#3
|
|||
|
|||
To be more specific, I'd like to be able to accurately draw the width and height from the avatars (using the PHP getimagesize() function as hinted in Natch's code) and put them into variables (or a variable array) that I would use in the postbit_legacy template. I'd rather not hardcode a size into the template as your mod does since it would end up distorting most of the avatars in use on my site.
And two hours of research later, I find it: $post[avwidth] $post[avheight] Unfortunately, even with the width and height specified, it still doesn't work. Probably because the SRC isn't specifying the PNG but is calling a PHP file instead. |
#4
|
||||
|
||||
I checked the vbBux / vbPlaza mod's "vbplaza_updateavatar_start.php" file in the Plugins directory and the coder defined the width/height according to the Usergroup vB settings. It uses PHP protocol so it may give you a start on what you want to do.
|
#5
|
||||
|
||||
The only way you can determine the dimensions of a file at runtime is for the file to be accessible by getimagesize: I do not believe that imag.php? etc will permit this.
Hence I do not believe that process will work unlss you are working on files in the filesystem (if they are remotely hosted, you will ned fopen_wrappers turned on in your php.ini) HTH |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|