plugins/SpecialCSS.php
changeset 1227 bdac73ed481e
parent 1081 745200a9cc2a
equal deleted inserted replaced
1226:de56132c008d 1227:bdac73ed481e
     1 <?php
     1 <?php
     2 /**!info**
     2 /**!info**
     3 {
     3 {
     4   "Plugin Name"  : "plugin_specialcss_title",
     4 	"Plugin Name"  : "plugin_specialcss_title",
     5   "Plugin URI"   : "http://enanocms.org/",
     5 	"Plugin URI"   : "http://enanocms.org/",
     6   "Description"  : "plugin_specialcss_desc",
     6 	"Description"  : "plugin_specialcss_desc",
     7   "Author"       : "Dan Fuhry",
     7 	"Author"       : "Dan Fuhry",
     8   "Version"      : "1.1.6",
     8 	"Version"      : "1.1.6",
     9   "Author URI"   : "http://enanocms.org/"
     9 	"Author URI"   : "http://enanocms.org/"
    10 }
    10 }
    11 **!*/
    11 **!*/
    12 
    12 
    13 /*
    13 /*
    14  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
    14  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
    23  
    23  
    24 global $db, $session, $paths, $template, $plugins; // Common objects
    24 global $db, $session, $paths, $template, $plugins; // Common objects
    25 
    25 
    26 function SpecialCSS_paths_init()
    26 function SpecialCSS_paths_init()
    27 {
    27 {
    28   global $paths;
    28 	global $paths;
    29   register_special_page('CSS', 'specialpage_css', false);
    29 	register_special_page('CSS', 'specialpage_css', false);
    30 }
    30 }
    31 
    31 
    32 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
    32 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
    33 
    33 
    34 function page_Special_CSS()
    34 function page_Special_CSS()
    35 {
    35 {
    36   global $db, $session, $paths, $template, $plugins; // Common objects
    36 	global $db, $session, $paths, $template, $plugins; // Common objects
    37   header('Content-type: text/css');
    37 	header('Content-type: text/css');
    38   if ( isset($_GET['printable']) || $paths->getParam(0) == 'printable' )
    38 	if ( isset($_GET['printable']) || $paths->getParam(0) == 'printable' )
    39   {
    39 	{
    40     echo $template->get_css('_printable.css');
    40 		echo $template->get_css('_printable.css');
    41   }
    41 	}
    42   else
    42 	else
    43   {
    43 	{
    44     echo $template->get_css();
    44 		echo $template->get_css();
    45   }
    45 	}
    46 }
    46 }
    47 
    47 
    48 ?>
    48 ?>