Dotclear

source: plugins/private/_admin.php @ 2117

Revision 2117, 1.1 KB checked in by Osku, 14 years ago (diff)

Plugin private : update to last version

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3#
4# This file is part of Private mode, a plugin for Dotclear 2.
5#
6# Copyright (c) 2008-2010 Osku and contributors
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#
12# -- END LICENSE BLOCK ------------------------------------
13
14if (!defined('DC_CONTEXT_ADMIN')) { return; }
15
16$_menu['Plugins']->addItem(__('Private mode'),
17          'plugin.php?p=private','index.php?pf=private/icon.png',
18          preg_match('/plugin.php\?p=private(&.*)?$/',$_SERVER['REQUEST_URI']),
19          $core->auth->check('admin',$core->blog->id));
20         
21if ($core->blog->settings->private_flag)
22{
23     $core->addBehavior('adminPageHTMLHead','privateadminPageHTMLHead');
24     $core->addBehavior('adminDashboardItems', 'privateDashboardItems'); 
25}
26
27function privateDashboardItems($core,$__dashboard_items)
28{
29     $__dashboard_items[1][] = '<p class="private-msg">'.__('Private blog').'.</p>';
30}
31
32function privateadminPageHTMLHead()
33{
34     echo '  <style type="text/css">'."\n".'  @import "index.php?pf=private/css/admin.css";'."\n".'  </style>'."\n";
35}
36?>
Note: See TracBrowser for help on using the repository browser.

Sites map