Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

iepngfix.htc


Go to End


5 Posts   2698 Views

Avatar
aghy

Community Member, 2 Posts

30 September 2009 at 8:47am

Im having trouble getting iepngfix.htc to work in my silverstripe installation. Im sure its possible to implement but for some reason the script isnt running.

I created a new folder called scripts under domain.com/themes/tutorial/scripts and put the .htc file in there with it referencing the blank.gif in the images folder.

So if anyone has managed to get iepngfix.htc working please could you describe how. I imagine its got something to do with the rewriting of the url that silverstripe is doing but I dont know where to look.

Anyone who wants to have a look at what the script can do check it out --> http://www.twinhelix.com/

Thanks
Aghy

Avatar
zenmonkey

Community Member, 545 Posts

30 September 2009 at 9:05am

Never tried that one, but DD Belated PNG FIx works okay for me

http://www.dillerdesign.com/experiment/DD_belatedPNG/

Avatar
socks

Community Member, 191 Posts

30 September 2009 at 1:22pm

Edited: 30/09/2009 1:22pm

I recall a friend having trouble implementing Twin Helix on a SilverStripe site. I don't know if he ever got it to work. I'm about to try it soon on a current project. Making a note of the DD one, thanks.

On some sites, I actually make different graphics for IE6 so I don't have to worry about the PNG fixes. Usually it's just containers with drop shadows on a textured background. I'll just strip out the drop shadows and be done with it.

I'm still waiting for someone to write a virus for that hides IE6 and installs FF on the desktop and makes it the default browser (maybe even change the icon to the IE one). Or at least updates IE6 to 8. Any takers?

Avatar
Juanitou

Community Member, 323 Posts

1 October 2009 at 2:34am

Hi aghy,

Put blank.gif and iepngfix.htc together in /mysite/javascript (with the appropriate blankImg = 'mysite/javascript/blank.gif';). Then, in your theme /css folder, create, for example, an ie6.css file containing:

img {behavior: url(mysite/javascript/iepngfix.htc) }

Then, in your page controller, you could have:

class Page_Controller extends ContentController {

function init() {
	parent::init();
	// Note: you should use SS template require tags inside your templates
	// instead of putting Requirements calls here.  However these are
	// included so that our older themes still work
	Requirements::themedCSS("layout");
	Requirements::themedCSS("typography");
	Requirements::themedCSS("form");
	// IE hacks
	if($pos = strpos($_SERVER[ 'HTTP_USER_AGENT' ], 'MSIE')) {
		Requirements::themedCSS("ie");
		$version = substr($_SERVER[ 'HTTP_USER_AGENT' ], $pos + 5, 3 );
		if( $version < 7 ) {
			Requirements::themedCSS("ie6");
		}
	}
}

Hope it helps,
Juan

Avatar
aghy

Community Member, 2 Posts

1 October 2009 at 7:58am

Thank you all!
Juan thats spot on that works perfect thank you very much.

Aghy