author | Dan |
Sun, 18 Jan 2009 18:10:21 -0500 | |
changeset 323 | 58fa63f7f23b |
parent 318 | eec2dfd2f0a3 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/* |
|
3 |
Plugin Name: CSS Backend |
|
23
320acf077276
At last, I fixed all those phased-out enano.homelinux.org links!
Dan
parents:
0
diff
changeset
|
4 |
Plugin URI: http://enanocms.org/ |
0 | 5 |
Description: Provides the page Special:CSS, which is used in template files to reference the style sheet. Disabling or deleting this plugin will result in site instability. |
6 |
Author: Dan Fuhry |
|
318 | 7 |
Version: 1.0.6 |
23
320acf077276
At last, I fixed all those phased-out enano.homelinux.org links!
Dan
parents:
0
diff
changeset
|
8 |
Author URI: http://enanocms.org/ |
0 | 9 |
*/ |
10 |
||
11 |
/* |
|
12 |
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
285 | 13 |
* Version 1.0.4 |
0 | 14 |
* Copyright (C) 2006-2007 Dan Fuhry |
15 |
* |
|
16 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
17 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
20 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
21 |
*/ |
|
22 |
||
23 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
24 |
||
25 |
$plugins->attachHook('base_classes_initted', ' |
|
26 |
global $paths; |
|
27 |
$paths->add_page(Array( |
|
28 |
\'name\'=>\'CSS\', |
|
29 |
\'urlname\'=>\'CSS\', |
|
30 |
\'namespace\'=>\'Special\', |
|
31 |
\'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', |
|
32 |
)); |
|
33 |
'); |
|
34 |
||
35 |
// function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace> |
|
36 |
||
37 |
function page_Special_CSS() { |
|
38 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
39 |
header('Content-type: text/css'); |
|
40 |
if(isset($_GET['printable']) || $paths->getParam(0) == 'printable') { |
|
41 |
echo $template->get_css('_printable.css'); |
|
42 |
} else { |
|
43 |
echo $template->get_css(); |
|
44 |
} |
|
45 |
} |
|
46 |
||
47 |
?> |