Revision 1683,
1016 bytes
checked in by kozlika, 14 years ago
(diff) |
Typo, suppression de lignes vides en fin de fichiers .php, ajout du ?> manquant.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[1199] | 1 | <?php |
---|
| 2 | # -- BEGIN LICENSE BLOCK ---------------------------------- |
---|
| 3 | # This file is part of entryCSS, a plugin for Dotclear. |
---|
| 4 | # |
---|
| 5 | # Copyright (c) 2009 - annso |
---|
| 6 | # contact@as-i-am.fr |
---|
| 7 | # |
---|
| 8 | # Licensed under the GPL version 2.0 license. |
---|
| 9 | # A copy of this license is available in LICENSE file or at |
---|
| 10 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
| 11 | # -- END LICENSE BLOCK ------------------------------------ |
---|
| 12 | |
---|
| 13 | if (!defined('DC_RC_PATH')) {return;} |
---|
| 14 | |
---|
| 15 | $core->addBehavior('publicHeadContent', array('publicEntryCSS','publicHeadContent')); |
---|
| 16 | |
---|
| 17 | class publicEntryCSS |
---|
| 18 | { |
---|
| 19 | public static function publicHeadContent(&$core,&$_ctx) |
---|
| 20 | { |
---|
| 21 | if($core->url->type == "post" || $core->url->type == "pages") { |
---|
[1204] | 22 | echo '<style type="text/css">'.self::getCSS($_ctx->posts->post_id).'</style>'; |
---|
[1199] | 23 | } |
---|
| 24 | } |
---|
[1204] | 25 | |
---|
| 26 | public static function getCSS($id_post) |
---|
| 27 | { |
---|
| 28 | global $core, $_ctx; |
---|
| 29 | |
---|
| 30 | $query = 'SELECT post_css FROM '.$core->prefix.'post WHERE post_id = '.$id_post.';'; |
---|
| 31 | $rs = $core->con->select($query); |
---|
| 32 | $value = $rs->f('post_css'); |
---|
| 33 | return $value; |
---|
| 34 | } |
---|
[1199] | 35 | } |
---|
| 36 | |
---|
[1683] | 37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.