vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Miscellaneous Images (https://vborg.vbsupport.ru/forumdisplay.php?f=125)
-   -   vbulletin Basic Icons exported to png 8-bit format (https://vborg.vbsupport.ru/showthread.php?t=161459)

Michael Morris 10-29-2007 10:00 PM

vbulletin Basic Icons exported to png 8-bit format
 
1 Attachment(s)
For those not familiar with it, PNG was originally conceived as a replacement for the Compuserve GIF format in the mid-90's. Although the default Adobe Fireworks file format, PNG is also readable by most browsers. Unlike GIF, PNG preserves the opacity of the images - PNG's do not suffer from the halo effect.

There are three flavors of PNG - PNG8, PNG24 and PNG32. Of these PNG32 is the most widely known about. Unfortunately PNG32 images are not read correctly by Internet Explorer 6 or earlier when they have an alpha channel. The resulting gray box effect is quite ugly to look at and has lead to most developers staying away from PNG altogether.

HOWEVER, PNG8 doesn't have this problem. IE 6 and even 5.5 for mac will read these files correctly and preserve their opacity setting. Further, older browsers that can read PNG (most IE 4 or later, Netscape 4 or later) at all will simply drop the colors in the palette with an alpha setting if they don't understand it, otherwise they treat PNG8's as gif files.

The upside of this is the PNG8 files can be read by all browsers. PNG8 is also the lost format of the Internet because, interestingly, only one graphics package will save a file in PNG8 -- Fireworks (and it's done so since at least version 4). Further PNG8 files are considerably smaller than PNG32 files and for small images or images without a wide range of colors PNG32 offers no real advantage over this lost format.

With that long introduction over, the fileset of this modification simply presents all standard vbulletin icons saved in PNG8 with their alpha settings saved. You need only edit the templates of your board changing any pointer to .gif to .png. I haven't tried it, but you should be able to do a find and replace in templates and replace all instances of .gif with .png (BACKUP YOUR TEMPLATES BEFORE DOING THIS).

Dr. Bantham 11-05-2007 11:24 PM

I am having trouble with the PNG images displaying on FORUMHOME. Though the new PNG variants display within the legend at the bottom of the page (e.g. forum_new.png, forum_old.png), the images within the forum list are the old GIF versions (e.g. forum_new.gif, forum_old.gif). I have confirmed that the appropriate templates refer to the PNG files.

Michael Morris 11-08-2007 04:35 PM

Quote:

Originally Posted by Dr. Bantham (Post 1376662)
I am having trouble with the PNG images displaying on FORUMHOME. Though the new PNG variants display within the legend at the bottom of the page (e.g. forum_new.png, forum_old.png), the images within the forum list are the old GIF versions (e.g. forum_new.gif, forum_old.gif). I have confirmed that the appropriate templates refer to the PNG files.

You sure? There are 5 templates here that all much change. FORUMHOME (the legend is near the bottom of the template) forumhome_level1_post, forumhome_level1_nopost, forumhome_level2_post, forumhome_level2_nopost.

If you are unsure of the template responsible go to vbulletin options and in general settings turn on "Display template name in html comments" This will put the template names in the output code so you can see which template needs to be altered.

Zachery 11-08-2007 04:49 PM

If PNG8 doesn't have alpha transparency, why bother using them?

Dr. Bantham 11-08-2007 11:03 PM

Quote:

Originally Posted by Michael Morris (Post 1378511)
You sure? There are 5 templates here that all much change. FORUMHOME (the legend is near the bottom of the template) forumhome_level1_post, forumhome_level1_nopost, forumhome_level2_post, forumhome_level2_nopost.

If you are unsure of the template responsible go to vbulletin options and in general settings turn on "Display template name in html comments" This will put the template names in the output code so you can see which template needs to be altered.

Thanks for pointing out the templates. I had searched and replaced forum_new.gif (etc.) with png file variants Though this worked for FORUMHOME, forumhome_level1_post and forumhome_level2_post were referencing the files as variables ($forum[statusicon].png). It was a quick fix once I knew where to look.

Zachery 11-11-2007 12:41 PM

For anyone who will use this, I suggest my mod.

https://vborg.vbsupport.ru/showthrea...=141493&page=2

mikeroq 11-27-2007 07:18 PM

You can choose between PNG-8 and PNG-24 in Photoshop.

racechick20 11-29-2007 08:15 PM

Michael, off topic slightly but I just wanted to say thanks! Finding this and your wonderful explaination has helped me out of a sticky situation. I had 3 part stretching PNGs w/ partial transparency between my forums and I was horrified when I learned that older browsers could see the ugly grey area. Understanding this stuff enabled me to re-export the images as PNG8 using Paint Shop Pro 9.

Just in case it may help someone else down the line - export > PNG Optimizer > Palette based w/ Optimized Octree > set transparency. It works a treat - the drop shadows went a little wierd but it works with the styling I have used. Thanks again! :up::D


All times are GMT. The time now is 02:44 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
  • Page Generation 0.01225 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete