User login

IE6 Transparent PNG Fix the Drupal Way

This is the IM conversation on implementing a jQuery ie6 PNG fix. Dan's elegant solution will go below... i don't quite follow where he put everything...


just dump it in the theme folder?

benjamin melançon:


and then of course
<script type="text/javascript">

has to be added to all five of your page.tpl.phps

can you gimme the exact line please?

assuming you put the file directly in the your theme's directory

drupal_add_js('jquery.pngFix.js', 'theme');

just put that in the head area?

benjamin melançon
no, that goes in template.php

hmm, looks like i was counting on the 'theme' setting to find your theme, and really all it does is find the theme directory? a little strange

but if that's the case you'll have to have something like:
$theme_path = drupal_get_path('theme', 'zen');
drupal_add_js($theme_path . '/js/inlineFieldLabel.js','theme');

dan hak 11:53
this in what i used :
drupal_add_js(drupal_get_path('theme', 'sky') . '/jquery.pngFix.js', 'theme');

so there!

benjamin melançon 11:53
good for you!

one second

   });' ,

that last one

in template.php

may mean you don't need to edit any of the page.tpl.phps

as is


Searched words: 
Microsoft Internet Explorer Six 6 six (yes, three sixes) transparency portable network graphic pngs images


I have recently written this

I have recently written this article to show you how to export png 8 in Fireworks.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.