Forums
View unanswered posts | View active topics It is currently Tue Sep 30, 2014 3:54 pm



Reply to topic  [ 50 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
 Integrating PIE into WordPress Themes 
Author Message

Joined: Tue Jan 04, 2011 1:07 pm
Posts: 1
Post Re: Integrating PIE into WordPress Themes
I tried using your code within my modified Starkers theme functions.php file and couldn't get it to work. When I would refresh the page after uploading the functions.php it would give me an error. I could not see what was wrong with the code.

So then I just inserted the if IE statement into my header and that was fine. I guess its sloppy to have it sitting in the header like that, but I'm not so awesome with php yet to debug the problem.

Thanks so much for putting this up!


Tue Jan 04, 2011 1:11 pm
Profile

Joined: Fri Jan 21, 2011 4:50 am
Posts: 2
Post Re: Integrating PIE into WordPress Themes
Heelp, please, i can't figure out how to make it work :/


Fri Jan 21, 2011 6:00 am
Profile

Joined: Thu Jan 20, 2011 4:47 pm
Posts: 16
Post Re: Integrating PIE into WordPress Themes
I can't get the first example to work, I'm using Theme Hybrid and modified it slightly:

Code:
function my_render_ie_pie() {
   ?>
<!--[if lte IE 8]>
<style type="text/css" media="screen">
   div#footer, #respond input#submit {
      behavior: url(<?php echo get_stylesheet_directory_uri(); ?>/pie/PIE.htc');
   }
</style>
<![endif]-->
   <?php
}
add_action('hybrid_head', 'my_render_ie_pie', 8);


I've tried the php, htc and js versions of PIE in the behavior line, none are working. Both the Submit button and red footer box on this page should have the rounded corner treatment in IE8:

http://www.redkitecreative.com/projects ... er-themes/

Can someone help me get this working?


Sat Jan 22, 2011 5:09 pm
Profile

Joined: Sat Feb 05, 2011 7:37 am
Posts: 2
Post Re: Integrating PIE into WordPress Themes
That's a great solution. I wanted to place the styling inside a stylesheet so here is what I came up with. Create a file called ie-pie.css.php and then load the stylesheet using:

Code:
<!--[if LTE IE 8]>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/ie-pie-css.php" type="text/css" media="screen" />
<![endif]-->
<!--[if LTE IE 7]>


Here's how I set up the file. The first part is to locate wp-load.php since we could be in a sub-directory. Then below that is a stylesheet with a php link to PIE.htc.

Code:
<?php    
   
   if ( defined( 'ABSPATH' ) )
       require_once( ABSPATH . 'wp-load.php' );
   else {
      if ( file_exists( '../../../../../wp-load.php' ) )
         require_once('../../../../../wp-load.php');
      elseif ( file_exists( '../../../../wp-load.php' ) )
         require_once('../../../../wp-load.php');
      elseif ( file_exists( '../../../wp-load.php' ) )
         require_once('../../../wp-load.php');
      elseif ( file_exists( '../../wp-load.php' ) )
         require_once('../../wp-load.php');
      elseif ( file_exists( '../wp-load.php' ) )
         require_once('../wp-load.php');
      else
         die( 'Fatal Error: Could not locate wp-load.php' );
   }
   
   header('Content-Type: text/css; charset: UTF-8'); ?>

<!-- This file contains CSS3 styles for Internet Explorer 8 and under  (link
   behavior: url(<?php echo get_template_directory_uri(); ?>/PIE.htc); )-->


.shadow {
   -webkit-box-shadow: 0px 1px 3px #141414;
   -moz-box-shadow: 0px 1px 3px #141414;
   box-shadow: 0px 1px 3px #141414;
   behavior: url(<?php echo get_template_directory_uri(); ?>/includes/PIE.htc);
}


It's just another option for you to try out.


Sat Feb 05, 2011 7:48 am
Profile

Joined: Sat Feb 12, 2011 11:36 am
Posts: 1
Post Re: Integrating PIE into WordPress Themes
Well, does any of this codes works totaly for Wordpress?


Sat Feb 12, 2011 11:38 am
Profile

Joined: Tue Aug 10, 2010 3:42 am
Posts: 6
Location: England
Post Re: Integrating PIE into WordPress Themes
It seems that some people are still having problems with Wordpress integration so I'll repeat my solution which is a bit simpler, but does only work if you have access to the root folder of your (or your client's) site.

1) Place the PIE.htc and PIE.php files in the root folder of the site - not in the Wordpress theme directory.

2) When you add the behaviours to your CSS file use:
Code:
behavior: url(/PIE.php)
- note the / before PIE.php which is an absolute path to the root folder of the site where you put the two files.

That's it.

See this Wordpress site which shows it working: http://www.sunnyfuturesolar.co.uk/

Hope this helps.

_________________
Regards

Graham Armfield
(http://www.coolfields.co.uk)


Mon Feb 14, 2011 5:16 am
Profile WWW

Joined: Wed Feb 16, 2011 9:49 pm
Posts: 2
Post Re: Integrating PIE into WordPress Themes
Since this is what I want to make happen to integrate the PIE successfully into WordPress Theme. But unfortunately, I was failed to integrate the PIE. I should try this code and I am hoping that it is working fine now.

_________________
For website tips about seo company with a free seo


Wed Feb 16, 2011 9:56 pm
Profile

Joined: Wed Mar 23, 2011 7:43 am
Posts: 1
Post Re: Integrating PIE into WordPress Themes
@billrobbins

I can confirm it works. I came up with something similar, but, the concept is the same, and it works cool.


Wed Mar 23, 2011 7:54 am
Profile

Joined: Mon Aug 01, 2011 1:53 pm
Posts: 2
Post Re: Integrating PIE into WordPress Themes
Hey guys,

I am having a bit of a hard time getting this to work in my WP Theme. I have added the following code in my functions.php file

Code:
/**
* Attach CSS3PIE behavior to elements
* Add elements here that need PIE applied
*/
function my_render_ie_pie() {
   echo '
<!--[if lte IE 8]>
<style type="text/css" media="screen">
  ul#brands li, .meta, #contactform input, #contactform textarea {
      behavior: url('.trailingslashit(get_bloginfo('template_url')).'pie/PIE.php);
   }
</style>
<![endif]-->
';
}
add_action('wp_head', 'my_render_ie_pie', 8);


However when the page loads in IE 8 or 7 it looks like it is removing the background or something on the elements that require a box shadow or rounded corner.

My site is http://trewknowledge.com/wordpress/news

And the element on this page is the white box that contains the post date.

Any suggestions welcomed!


Mon Aug 01, 2011 2:01 pm
Profile

Joined: Sat Aug 21, 2010 11:12 am
Posts: 223
Post Re: Integrating PIE into WordPress Themes
It's a z-index issue: http://css3pie.com/documentation/known-issues/#z-index
If I disable the #main div background I can see the white boxes with rounded corners and shadows.

_________________
PIE needs more community support persons! Time is money, which means you can fund PIE development by answering support questions.


Mon Aug 01, 2011 2:37 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 50 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.