Wow! what a wonderful fix.

A Drupal 5 version of this module would be much appriciated.

Comments

ditto. i modified the info file to see if i could just do that to make it work, but alas... it did not!

; $Id: unlimited_css.info,v 1.1 2009/04/15 10:20:04 antoniodemarco Exp $

name = IE Unlimited CSS Loader
description = Solve the Internet Explorer limitation of loading not more then 30 CSS files per page.
; Information added by drupal.org packaging script on 2009-04-15
version = "5.x-1.0"
core = "5.x"
project = "unlimited_css"
datestamp = "1239800625"

I did not see anything in the function that is all that d6 only... unless it's the preprocess_css variable, but I would have thought that was in 5x as well.

Help?

actually it seems to be having n affect on the site, it's just not fixing the issue:

@import "/sites/all/modules/admin_menu/admin_menu.css";
@import "/sites/all/modules/devel/devel.css";

@import "/sites/all/modules/ubercart/uc_store/uc_store.css";
@import "/sites/all/modules/calendar/calendar.css";
@import "/modules/node/node.css";
@import "/modules/system/admin.css";
@import "/modules/system/defaults.css";
@import "/modules/system/system.css";
@import "/modules/user/user.css";
@import "/modules/poll/poll.css";
@import "/./sites/all/modules/calendar/calendar.css";

@import "/sites/all/modules/cck/content.css";
@import "/sites/all/modules/date/date.css";
@import "/sites/all/modules/event/event.css";
@import "/sites/all/modules/mailhandler/mailhandler.css";
@import "/sites/all/modules/og/og.css";
@import "/sites/all/modules/taxonomy_context/taxonomy_context.css";
@import "/sites/all/modules/taxonomy_list/taxonomy_list.css";
@import "/sites/all/modules/ubercart/uc_attribute/uc_attribute.css";
@import "/sites/all/modules/ubercart/uc_order/uc_order.css";

@import "/sites/all/modules/ubercart/uc_product/uc_product.css";
@import "/sites/all/modules/ubercart/uc_reports/uc_reports.css";
@import "/sites/all/modules/ubercart/uc_roles/uc_roles.css";
@import "/sites/all/modules/ubrowser/ubrowser.css";
@import "/sites/all/modules/cck/fieldgroup.css";
@import "/sites/all/modules/panels/css/panels.css";
@import "/sites/all/themes/zen/zen_classic/style.css";
@import "/sites/all/themes/zen/tabs.css";
@import "/sites/all/themes/zen/zen_classic/html-elements.css";

@import "/sites/all/themes/zen/zen_classic/layout-garland.css";
@import "/sites/all/themes/zen/zen_classic/icons.css";
@import "/sites/all/themes/zen/zen_classic/zen-classic.css";

Drupal.extend({ settings: { "admin_menu": { "margin_top": 1, "tweak_modules": 0 }, "base_path": "/" } });
$(document).ready(function(){ $('.png-fix').pngFix(); });

Hi all,

Since Drupal 5 does not implement the MODULE_preprocess_page() hook (which is the one the module is based on) you need to place an explicit call to unlimited_css_preprocess_page() inside your template.php file; here the code:

function _phptemplate_variables($hook, $vars) {
  if ($hook == 'page') {
    // Hook into color.module
    // in case you use it put unilimited_css call after it
    if (module_exists('color')) {
      _color_page_alter($vars);
    }
    if (module_exists('unilimited_css')) {
      unlimited_css_preprocess_page($vars);
    }
  }
}

Let me know if this solves your problem.

For themes with more complex variable evaluation functions, you may need to redeclare $vars['css'] within the module_exists check:

if (module_exists('unilimited_css')) {
      $vars['css'] = drupal_add_css();
      unlimited_css_preprocess_page($vars);
    }

Our 5.x version was choking by the foreach ($vars['css'] as $media => $types) loop in the module before we realized that the variable was reset by a preceding function call.

Can anyone tell me if they had any luck with the above as I am having trouble reproducing this in my template I am just getting errors.

I edited the file info file.

I added into the Template file.

function _phptemplate_variables($hook, $vars) {
  if ($hook == 'page') {
    // Hook into color.module
    // in case you use it put unilimited_css call after it
    if (module_exists('color')) {
      _color_page_alter($vars);
    }
    if (module_exists('unilimited_css')) {
      $vars['css'] = drupal_add_css();
      unlimited_css_preprocess_page($vars);
    }
  }

but I just get errors.

Fatal error: Cannot redeclare _phptemplate_variables() (previously declared in /home/sites/designerspx.co.uk/public_html/themes/zen/template.php:143) in /home/sites/designerspx.co.uk/public_html/themes/zen/newspx/template.php on line 164

I presume the call for the function is already there and its just being repeated. If anyone had any sucess with it can they let me know what they did.

Thanks for your time.

Status:Active» Closed (won't fix)