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 |
#2
|
|||
|
|||
natch i did not understand what it does, my english is not very bad, but its not enogh to understand that ..
can you explain in in 1 sentende for me please? |
#3
|
||||
|
||||
Look at this page using IE - then look at the same page using Mozilla or another pbrwser - you will see that the Image that is repeated on the page has a grey border where it should be transparent until the "fix" is applied...
This hack provides a way to apply that fix to your forum without having to hack each location where the PNG-24bit transparent images appear. If you want to know more about how mouch work it is, there is a style released on vBt that has this fix applied throuhgout it manually - the coder who wrote it would be able to explain how much more work it is. The reason to do this is because GIF transpararency is good, but the quality of a GIF is terrible unless the filesize if huge - PNG24 files can be tiny filesizes while being large images with HQ transparency and no loss in the compression. More than one sentence, but there you go. |
#4
|
|||
|
|||
ahh okai i understand .. and are png images supported by vb3.0 to make thumbnails within the posting images in a thread?
|
#5
|
||||
|
||||
This script will not pick them up even if this was the case - it's not magic, just detects .png file extensions in <img src tags or style="background: url() definitions
|
#6
|
|||
|
|||
Natch, I got this to work, but not as I need.
It works: See this thread: http://www.onlinedebate.net/forums/s...1368#post41368 The problem I'm having, is that I need this to work with avatars. I add the width/height after the: [/b]<img src="$avatarurl"[/b], but it doesn't work. The complete line of code for the avatar is: PHP Code:
|
#7
|
||||
|
||||
it should work when the info is in the template - can you check for me that you have made the alteration to the avatar in all postbit templates and in all avatar locations ?
You will definitely need to add either style="width:Npx;height:Mpx" or width="N" height="M" to all instances of the avatar: check that you have edited the postbit_legacy tempalte as well as postbit.... |
#8
|
|||
|
|||
I only use the postbit_legacy template (I don't use the other...is it still required to code it even if that template is "disabled"?).
The width/height attributes are there as you can see in the code above. Are you saying that in all places where the avatar is coded, it must have these attributes even if those places are not active? |
#9
|
||||
|
||||
try using style="width:Npx;height:Mpx" instead - let me knwo how you go...
|
#10
|
|||
|
|||
This is what I tried:
PHP Code:
Do I have to have the closing style tag in there? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|