Changeset 2117 for plugins/private
- Timestamp:
- 03/10/10 08:58:31 (14 years ago)
- Location:
- plugins/private
- Files:
-
- 6 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/private/_admin.php
r1768 r2117 4 4 # This file is part of Private mode, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2008-2009 Osku and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2008-2010 Osku and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 17 18 preg_match('/plugin.php\?p=private(&.*)?$/',$_SERVER['REQUEST_URI']), 18 19 $core->auth->check('admin',$core->blog->id)); 20 21 if ($core->blog->settings->private_flag) 22 { 23 $core->addBehavior('adminPageHTMLHead','privateadminPageHTMLHead'); 24 $core->addBehavior('adminDashboardItems', 'privateDashboardItems'); 25 } 26 27 function privateDashboardItems($core,$__dashboard_items) 28 { 29 $__dashboard_items[1][] = '<p class="private-msg">'.__('Private blog').'.</p>'; 30 } 31 32 function privateadminPageHTMLHead() 33 { 34 echo ' <style type="text/css">'."\n".' @import "index.php?pf=private/css/admin.css";'."\n".' </style>'."\n"; 35 } 19 36 ?> -
plugins/private/_define.php
r1902 r2117 4 4 # This file is part of Private mode, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2008-2009 Osku and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2008-2010 Osku and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 17 18 /* Description*/ "Protect your blog with a password", 18 19 /* Author */ "Osku and contributors", 19 /* Version */ '1. 1',20 /* Version */ '1.2.1', 20 21 /* Permissions */ 'admin' 21 22 ); -
plugins/private/index.php
r1768 r2117 4 4 # This file is part of Private mode, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2008-2009 Osku and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2008-2010 Osku and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 11 # 11 12 # -- END LICENSE BLOCK ------------------------------------ 12 13 // Setting default parameters if missing configuration14 if (is_null($core->blog->settings->private_flag)) {15 try {16 $core->blog->settings->setNameSpace('private');17 18 // Private mode is not active by default19 $core->blog->settings->put('private_flag',false,'boolean');20 $core->blog->settings->put('private_conauto',false,'boolean');21 $core->blog->triggerBlog();22 http::redirect(http::getSelfURI());23 }24 catch (Exception $e) {25 $core->error->add($e->getMessage());26 }27 }28 13 29 14 // Getting current parameters … … 32 17 $blog_private_title = $core->blog->settings->blog_private_title; 33 18 $blog_private_msg = $core->blog->settings->blog_private_msg; 34 35 if ($blog_private_title === null) {36 $blog_private_title = __('Private blog');37 }38 39 if ($blog_private_msg === null) {40 $blog_private_msg = __('<p class="message">You need the password to view this blog.</p>');41 }42 19 43 20 if (!empty($_POST['saveconfig'])) … … 89 66 <head> 90 67 <title><?php echo __('Private mode'); ?></title> 68 <?php echo dcPage::jsLoad('index.php?pf=private/js/config.js'); ?> 91 69 </head> 92 70 <body> … … 105 83 '<fieldset>'. 106 84 '<legend>'. __('Plugin activation').'</legend>'. 107 '<div class="two-cols">'.108 '<div class="col">'.109 85 '<p class="field">'. 110 86 form::checkbox('private_flag', 1, $private_flag). 111 '<label class=" classic" for="private_flag">'.__('Enable Private mode').'</label>'.87 '<label class=" classic" for="private_flag">'.__('Enable private mode').'</label>'. 112 88 '</p>'. 89 '</fieldset>'. 90 '<fieldset id="misc_options">'. 91 '<legend>'.__('Presentation options').'</legend>'. 113 92 '<p><label class="required" title="'.__('Required field').'">'. 114 93 __('New password:'). … … 119 98 form::password('blog_private_pwd_c',30,255). 120 99 '</label></p>'. 121 '</div>'.122 '<div class="col">'.123 100 '<p>'. 124 101 form::checkbox('private_conauto', 1, $private_conauto). … … 130 107 '</p>'. 131 108 '<p>'.sprintf(__('Don\'t forget to add a <a href="%s">widget</a> allowing disconnection from the blog.'),'plugin.php?p=widgets').'</p>'. 132 '</div>'.133 '</div>'.134 '</fieldset>'.135 '<fieldset>'.136 '<legend>'.__('Presentation options').'</legend>'.137 109 '<p class="col"><label class="required" title="'.__('Required field').'">'. 138 110 __('Private page title:'). 139 111 form::field('blog_private_title',20,255,html::escapeHTML($blog_private_title),'maximal'). 140 ' .</label></p>'.112 '</label></p>'. 141 113 '<p class="area"><label class="required" title="'.__('Required field').'">'. 142 114 __('Private message:'). -
plugins/private/locales/fr/main.po
r1902 r2117 92 92 93 93 #: index.php:111 94 msgid "Enable Private mode"95 msgstr "Activer le mode Privé"94 msgid "Enable private mode" 95 msgstr "Activer le mode privé" 96 96 97 97 #: index.php:113
Note: See TracChangeset
for help on using the changeset viewer.