The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vB Integration of "Normal display of PNG Alpha Transparency with MSIE" PHP script Details »» | |||||||||||||||||||||||||||
vB Integration of "Normal display of PNG Alpha Transparency with MSIE" PHP script
Developer Last Online: Apr 2022
File Edits: 2 (in one file)
New Files: 1 (forumroot/images/spacer.png) This script, for those that don't know it, is a server-side solution to the faulty display of 24-bit alpha transparencies in MSIE... For more info please read up on the site created by the d00d that wrote the script - all the props go to him! Created in response to my need to bloody well get it right after so many months, as well as https://vborg.vbsupport.ru/showthread.php?t=61091 and https://vborg.vbsupport.ru/showthread.php?t=66846... OK - now to get this integrated to your vB so that any PNG24 images with transparency will display without that ugly grey backdrop in MSIE, please do the following: In includes/functions.php: Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
OK - now the only reason this will not work (except if you neglect to upload this excellent functions.php file) is if your calls to the PNG file of your choice does not have a full definition ... When I say work - your forum will still work no probs, it's just the script will pass over each PNG tag like the Angel of Death over a blood-stained door if you don't fit the bill Will work: <img src="$vboptions[bburl]/images/misc/someimage.png" width="10" height="10" /> Will not work: <img src="$vboptions[bburl]/images/misc/someimage.png" /> Will work: <img src="clear.gif" style="background-image:url($vboptions[bburl]/images/misc/someimage.png);height:10px;width:10px" /> Will not work: <img src="clear.gif" style="background-image:url($vboptions[bburl]/images/misc/someimage.png)" /> Will work: <body style="background-image:url($vboptions[bburl]/images/misc/someimage.png)"> Read over his page if you want more info as I said Enjoy y'all ( and please remember to test this in IE - it will only make a difference if you use IE ) I've also attached for your own testing, the same image used in the test on the original author's site... Have fun kiddies May the PNG24 be with you LOL - well that attachment of the spacer.png doesn't work ;D you need to be able to see the 1x1 attachment to click on it hehe... feel free to grab it from http://www.mobileforces.org/forums/images/spacer.png EDIT 26-08-2004: This links to a HOW-TO on using this with Avatars - it requires a small one-file, one-tempalte hack. EDIT: 07-01-2005 The function this is based on was updated a while back to NOT require the width and height to be explicitly defined, and so this has now been updated to include the latest version of this function. TO UPGRADE: Just replace: PHP Code:
PHP Code:
Supporters / CoAuthors Show Your Support
|
Comments |
#12
|
||||
|
||||
Nope - it's not a tag thing when you have inline styles ...
One option (and I don't know if this will work) is to have some additional code added to the part of showthread that grabs the avatar that will give you the width and height statement ... I'll look into it man... |
#13
|
||||
|
||||
OK - a solution to this is a separate hack:
In includes/functions_showthread.php: Find: PHP Code:
PHP Code:
Find: Code:
<img src="$avatarurl" Code:
<if condition="$avatarimgsrc">$avatarimgsrc </if> Code:
$avatarimgsrc = "style="width:$avatarbits[0]px;height:$avatarbits[1]px" |
#14
|
|||
|
|||
the includes/functions_showthread.php edit resulted in:
Quote:
Quote:
|
#15
|
||||
|
||||
Undo that edit, then point me to your site: I'll take a lok at what your site generates as $avatarurl and then get more info for you.
NOTE: this last bit of this hack is not something that is a part of the original a new hack as I said - so I'm not sure how far I can support PNG avatars... unless you switch your Avatars to store them in the filesystem, as opposed to the database - that might make a difference. |
#16
|
|||
|
|||
I undid it. My site: www.onlinedebate.net/forums
Now, perhaps something of interest. I have vbadvanced CMPS. The avatar displayed w/ a transparent background with CMPS (block in the upper right hand corner). It was when I went to the forums, that all hell broke loose. |
#17
|
||||
|
||||
Question: do you store your avatars in the database or the filesystem?
|
#18
|
||||
|
||||
This will work within templates, right?
|
#19
|
||||
|
||||
Quote:
|
#20
|
||||
|
||||
Can you paste in here the code you have used ?
Remember you need to specify a height and width for the image. |
#21
|
||||
|
||||
he has a new version of his script up that does not require dimensions
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|