示例#1
0
 function css_magic($css)
 {
     global $phpbb_root_path, $phpEx;
     include $phpbb_root_path . 'wp-united/options.' . $phpEx;
     // temp -- this is called from style.php
     if (defined('USE_CSS_MAGIC') && USE_CSS_MAGIC) {
         //temp
         include $phpbb_root_path . 'wp-united/wpu-css-magic.' . $phpEx;
         $cssMagic = CSS_Magic::getInstance();
         if ($cssMagic->parseString($css)) {
             if (defined('USE_TEMPLATE_VOODOO') && USE_TEMPLATE_VOODOO) {
                 $cssMagic->renameIds("wpu");
                 $cssMagic->renameClasses("wpu");
             }
             $cssMagic->makeSpecificByIdThenClass('wpucssmagic', false);
             $css = $cssMagic->getCSS();
             $cssMagic->clear();
         }
         if (file_exists($phpbb_root_path . "wp-united/theme/reset.css")) {
             $reset = @file_get_contents($phpbb_root_path . "wp-united/theme/reset.css");
         }
         return $reset . $css;
     } else {
         return $css;
     }
 }