Revision 2378,
1.2 KB
checked in by Osku, 13 years ago
(diff) |
private : version 1.3 - ready for Dotaddict
- PHP 5.3 compliant
- For Dotclear 2.2 & 2.16
- Title and message are now optionnal
- New icon menu
- minor improvements
- Add a LICENSE file
|
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 | |
---|
14 | if (!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 | ); |
---|
21 | |
---|
22 | $s = privateSettings($core); |
---|
23 | |
---|
24 | if ($s->private_flag) |
---|
25 | { |
---|
26 | $core->addBehavior('adminPageHTMLHead','privateadminPageHTMLHead'); |
---|
27 | $core->addBehavior('adminDashboardItems', 'privateDashboardItems'); |
---|
28 | } |
---|
29 | |
---|
30 | function privateDashboardItems($core,$__dashboard_items) |
---|
31 | { |
---|
32 | $__dashboard_items[0][] = '<p class="private-msg">'.__('Password-protected blog').'.</p>'; |
---|
33 | } |
---|
34 | |
---|
35 | function privateadminPageHTMLHead() |
---|
36 | { |
---|
37 | echo '<link rel="stylesheet" href="index.php?pf=private/style/admin.css"type="text/css" media="screen" />'."\n"; |
---|
38 | } |
---|
39 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.