• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

New Logo

Started by José Roca, August 02, 2007, 06:42:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca

 
Problem solved. IE6 users will see the old logo and the others the new logo.

I have modified the index template from


   if(!($settings['logo_not_show']))
   {
      if (empty($settings['header_logo_url']))
         echo '
                  <a href="', $scripturl, '"><img src="', $settings['images_url'] . '/'. $settings['theme_main_color'], '/logo.jpg" style="margin: 0px;" alt="', $context['forum_name'], '" title="', $context['forum_name'], '"/></a>';
      else
         echo '
                  <a href="', $scripturl, '"><img src="', $settings['header_logo_url'], '" style="margin: 0px;" alt="', $context['forum_name'], '" /></a>';
   }


to


   if(!($settings['logo_not_show']))
   {
      if (empty($settings['header_logo_url']))
         echo '
                  <a href="', $scripturl, '"><img src="', $settings['images_url'] . '/'. $settings['theme_main_color'], '/logo.jpg" style="margin: 0px;" alt="', $context['forum_name'], '" title="', $context['forum_name'], '"/></a>';
      elseif (strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0'))
         echo '
                  <a href="', $scripturl, '"><img src="/images/forum_logo_01.gif" style="margin: 0px;" alt="', $context['forum_name'], '" /></a>';
      else
         echo '
                  <a href="', $scripturl, '"><img src="', $settings['header_logo_url'], '" style="margin: 0px;" alt="', $context['forum_name'], '" /></a>';
   }


Everybody happy? :)

PS Tested with FireFox, Opera and Internet Explorer 6.0.

Kent Sarikaya

Is the original Logo a jpg or png? I thought jpg didn't support transparency?
Anyways nice to see how to code that sort of fix, thanks Jose!

José Roca

#17
 
The original logo is a transparent .gif. I did it with an icon editor, just to have something to show. Patrice's logo is a transparent .png, that can handle progressive opacity and more than 256 colors.

Theo Gottwald

Jose, you are amazing again.
Now you get even a web-programmer in your spare-minutes. :-)

Patrice Terrier

José

If I remember well you also speak french, don't you?  ;D

Here is the solution to display correctly transparent PNG even with IE6...
Java script
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

José Roca

 
Mais oui, but the theme is written in php, not html. Anyway, IE6 users visiting this forum will we few.

Theo Gottwald

I would also favour php because the JAVA Script is disabled if the browser settings are set to safe.
PHP should work under any conditions as its server based.

Patrice Terrier

Then here is a PHP solution
PNG in PHP

Note: they improperly speak of PNG 24-bit, but indeed they should write PNG 32-bit.
24-bit has no room for the alpha channel, it must use full ARGB  instead of RGB.

If interrested I can show you how to display full 32-bit ARGB image preserving the alpha channel.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

José Roca

 
Don't force me to do many changes. The template isn't mine and with every version of the forum software I have to install a new version of it and redo the changes, and I have no idea of php programming.

Theo Gottwald

As said, actually it works perfectly.
Never change a running system ..? :-)