News:

Join the Facebook Fan Page.

Main Menu

PNG Fix help

Started by picos, December 11, 2007, 12:30:40 PM

Previous topic - Next topic

picos

I put this in the very top of the boardindex file

<?php
// Version: 1.1; BoardIndex

function template_main()
{
   global $context, $settings, $options, $txt, $scripturl, $modSettings;
   echo '
   <script defer type="text/javascript" src="', $settings['theme_url'], '/pngfix.js"></script>';

Still hasn't worked LOL.  The main body are is still suffering.  :(

Bulakbol

Sorry, maybe it's time for you to use jpg's instead of png's.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

picos

Maybe but i don't under stand why smf can't even call a different css file then so i can use jpegs for ie6 only.  Strange! 

SleePy

The png fix will not work for images loaded via a style.css or similar.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

picos

This isn't strictly true as I have one of my sites using 2 png fixes as one works for the header and the other one works for css....  I just can't the same results with smf.  :(

Sleepy could you tell me how to call a seperate css for IE6 then as i'll use JPEG for IE6 instead.  Thank for all the idas so far folks!

picos

Anyone able to tell me how to call a specific css file for IE6 only?  If I get it working with your help, I'll make it worth your while with a donation or something.  Thanks. 

karlbenson

As I use IE7 as my primary browser I can confirm that I've never had an issue with transparency in PNGs.

picos

Yeha I know this!  LOL  I wish I didn't have to cater for IE6 as everyone else but unfortunately not everyone has the knowledge that us higher beings own and know that ie6 is crap...  ok that's maybe a little controversial but hey, I need to get my png's working in ie6 for a project and I'm hoping that calling on a simple css for ie6 will solve my problems as I'll just make the files in the css JPEGS!  LOL.


Does this make proper and good sense?  :)

SleePy

SMF has built in browser checks for most common browsers.
So if you want something to only work with ie6 you just do a simple php check

if ($context ['browser']['is_ie6'])
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style_ie.css" />';
else
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css" />';


I don't know of this style.css png fix. Got a link? I only know of the method I posted which basically wraps some code with javascript around the images.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

karlbenson


Advertisement: