CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • civicrm drupal preprocess page
Pages: [1]

Author Topic: civicrm drupal preprocess page  (Read 1532 times)

jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
civicrm drupal preprocess page
November 09, 2011, 03:55:14 pm
Does this do what it appears, in the civicrm.module:
<?php
function civicrm_preprocess_page(&$variables) {   
   // to increase it's flexibility.
     if ( module_exists('date_popup') && ( in_array( arg(0), array('civicrm', 'user') ) ) ) {
      /**
      some stuff with JS commented out here-removing for clarity
       */
            
      // Similar process for CSS but there are 2 CSS related variables.
      // $variables['css'] and $variables['styles'] are both used.
        if ( ! empty( $variables['css'] ) ) {             
           $path = drupal_get_path('module', 'date_popup');
           unset( $variables['css']['all']['module'][$path . '/themes/datepicker.css'] );           
           $variables['styles'] = drupal_get_css( $variables['css'] );
        }
     }
}
?>

Does this avoid conflicts with the datepicker of the Date Popup module? Because it appears to break the IE Unlimited CSS Loader. See here: http://drupal.org/node/745416

I tested this to exclude everything else. It appears something about this :
           $variables['styles'] = drupal_get_css( $variables['css'] );

is breaking IE Unlimited CSS Loader.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • civicrm drupal preprocess page

This forum was archived on 2017-11-26.