• gman243

    (@gman243)


    I noticed that the Easy Fancybox plug-in was not working when I transferred a site for a client from another platform to our own. I viewed the source in Firefox and then tried to view the .css file. Instead of loading a .css file with styles, it actually loaded the entire PHP contents of the “easy-fancybox.css.php” file:

    <?php
    /* -------------------------------------
        Easy Fancybox Styleheet Conversion
       ------------------------------------- */
    
      header('Content-type: text/css; charset=utf-8', true);
      ob_start("iepathfix_compress");

    And it goes on. Obviously there is a setting on the server end that prevents the .php file from parsing as a .css file.

    However, why is the plug-in relying on such a variable? I mean, it seems like the only reason for this .php.css file is for version control–however there is only the one version in the first place. It seems like it creates more problems than its worth.

    For both the sites I have manually included the .css file and it works fine.

    Thanks!

    http://wordpress.org/extend/plugins/easy-fancybox/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gman243

    (@gman243)

    For anyone having this issue, you can manually enqueue the style by:

    1. Opening the “easy-fancybox.php” file
    2. Going to line 429 or searching for:
    wp_enqueue_style('easy-fancybox.css', plugins_url(FANCYBOX_SUBDIR.'/easy-fancybox.css.php', __FILE__), false, FANCYBOX_VERSION, 'screen');

    3. Add this line below it to manually include the .css file:
    wp_enqueue_style('easy-fancybox-manual-css', plugins_url(FANCYBOX_SUBDIR.'/fancybox/jquery.fancybox-1.3.4.css', __FILE__));

    However, I don’t actually recommend editing the plug-in or theme files if at all possible. The better suggestion would be to create a child theme and enqueue the style manually using a custom functions.php file. Or finding a plug-in that lets you manually include stylesheets (if it exists).

    Hi gman243,

    The CSS needs to be altered dynamically to get IE8 working correctly. You can drop support for IE8 but it is likely that anyone with IE8 coming to your site will experience weird ‘lock-ups’ where the browsers stops responding to chew on what is normally considered simple CSS. It’s a bummer but that’s IE for you.

    In any case, strange that it does not work on your server. Is it a Windows server?

    Do you have a link to your site?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The .PHP .CSS file does not render on my host’ is closed to new replies.