Changeset 2475 for plugins/private
- Timestamp:
- 07/10/10 19:18:49 (13 years ago)
- Location:
- plugins/private
- Files:
-
- 1 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/private/_admin.php
r2378 r2475 14 14 if (!defined('DC_CONTEXT_ADMIN')) { return; } 15 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 ); 16 $menu_class = ''; 21 17 22 18 $s = privateSettings($core); … … 25 21 { 26 22 $core->addBehavior('adminPageHTMLHead','privateadminPageHTMLHead'); 27 $ core->addBehavior('adminDashboardItems', 'privateDashboardItems');23 $menu_class = 'private-blog'; 28 24 } 29 25 30 function privateDashboardItems($core,$__dashboard_items) 31 { 32 $__dashboard_items[0][] = '<p class="private-msg">'.__('Password-protected blog').'.</p>'; 33 } 26 $_menu['Plugins']->addItem(__('Private mode'), 27 'plugin.php?p=private','index.php?pf=private/icon.png', 28 preg_match('/plugin.php\?p=private(&.*)?$/',$_SERVER['REQUEST_URI']), 29 $core->auth->check('admin',$core->blog->id), 30 $menu_class 31 ); 34 32 35 33 function privateadminPageHTMLHead() -
plugins/private/_public.php
r2378 r2475 88 88 $s = privateSettings($core); 89 89 $password = $s->blog_private_pwd; 90 90 $allowed_types = array('feed','pubfeed','spamfeed','hamfeed','trackback','preview','pagespreview','contactme'); 91 92 #agora trick ? 93 if ($core->auth->userID()) 94 { 95 return; 96 } 97 91 98 if (!isset($session)) 92 99 { … … 109 116 unset($urlp); 110 117 111 if ( $type == 'feed' || $type == 'pubfeed' || $type == 'spamfeed' || $type == 'hamfeed' || $type == 'trackback')118 if (in_array($type,$allowed_types)) 112 119 { 113 120 return; … … 177 184 { 178 185 global $core; 179 $s = privateSettings($core);180 186 $f = $core->tpl->getFilters($attr); 181 return '<?php echo '.sprintf($f,' $s->private_page_title').'; ?>';187 return '<?php echo '.sprintf($f,'privateSettings($core)->private_page_title').'; ?>'; 182 188 } 183 189 … … 185 191 { 186 192 global $core; 187 $s = privateSettings($core);188 193 $f = $core->tpl->getFilters($attr); 189 return '<?php echo '.sprintf($f,' $s->private_page_message').'; ?>';194 return '<?php echo '.sprintf($f,'privateSettings($core)->private_page_message').'; ?>'; 190 195 } 191 196 -
plugins/private/index.php
r2378 r2475 24 24 { 25 25 $private_flag = (empty($_POST['private_flag']))?false:true; 26 $private_conauto_flag = (empty($_POST['private_conauto ']))?false:true;26 $private_conauto_flag = (empty($_POST['private_conauto_flag']))?false:true; 27 27 $private_page_title = $_POST['private_page_title']; 28 28 $private_page_message = $_POST['private_page_message']; … … 30 30 31 31 $s->put('private_flag',$private_flag,'boolean','Private mode activation flag'); 32 $s->put('private_conauto ',$private_conauto_flag,'boolean','Private mode automatic connection option');32 $s->put('private_conauto_flag',$private_conauto_flag,'boolean','Private mode automatic connection option'); 33 33 $s->put('private_page_title',$private_page_title,'string','Private mode public page title'); 34 34 $s->put('private_page_message',$private_page_message,'string','Private mode public welcome message'); … … 68 68 <head> 69 69 <title><?php echo __('Private mode'); ?></title> 70 70 <?php echo dcPage::jsToolBar(). 71 dcPage::jsLoad('index.php?pf=private/js/config.js'); ?> 71 72 </head> 72 73 <body> … … 105 106 '</label></p> 106 107 <p>'. 107 form::checkbox('private_conauto ', 1, $private_conauto_flag).108 '<label class="classic" for="private_conauto ">'. __('Propose automatic connection to visitors').'</label>'.108 form::checkbox('private_conauto_flag', 1, $private_conauto_flag). 109 '<label class="classic" for="private_conauto_flag">'. __('Propose automatic connection to visitors').'</label>'. 109 110 '</p>'. 110 111 '<p class="form-note">'. … … 116 117 '</p></div> 117 118 <div class="col"> 118 <h3>'.__('Home').'</h3>119 119 <p class=""><label>'. 120 __('Title:'). 120 __('Title:').'</label>'. 121 121 form::field('private_page_title',20,255,html::escapeHTML($private_page_title),'maximal'). 122 '</ label></p>122 '</p> 123 123 <p class=""><label>'. 124 __('Message:'). 124 __('Message:').'</label>'. 125 125 form::textarea('private_page_message',30,4,html::escapeHTML($private_page_message),'maximal'). 126 '</ label></p>126 '</p> 127 127 </div></div> 128 128 </fieldset> -
plugins/private/locales/fr/main.po
r2378 r2475 1 # Language: français2 # Module: private - 1. 33 # Date: 2010-0 6-20 21:45:464 # Translated with translater 1. 31 # Language: Français 2 # Module: private - 1.4 3 # Date: 2010-07-08 16:14:19 4 # Translated with translater 1.4.1 5 5 6 6 msgid "" 7 7 msgstr "" 8 8 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: private 1. 3\n"9 "Project-Id-Version: private 1.4\n" 10 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 2010-0 6-20T21:45:46+00:00\n"12 "Last-Translator: Osku\n"11 "PO-Revision-Date: 2010-07-08T16:14:19+00:00\n" 12 "Last-Translator: osku\n" 13 13 "Language-Team: \n" 14 14 "MIME-Version: 1.0\n" 15 15 "Content-Transfer-Encoding: 8bit\n" 16 16 17 #: _admin.php: 1617 #: _admin.php:26 18 18 #: index.php:69 19 #: index.php: 7919 #: index.php:80 20 20 msgid "Private mode" 21 21 msgstr "Mode privé" 22 23 #: _admin.php:3224 msgid "Password-protected blog"25 msgstr "Blog protégé par un mot de passe"26 22 27 23 #: _install.php:40 … … 33 29 msgstr "<p class=\"message\">Vous avez besoin du mot de passe pour visualiser le blog.</p>" 34 30 35 #: _public.php:1 4836 #: _public.php:1 5731 #: _public.php:155 32 #: _public.php:164 37 33 msgid "Wrong password" 38 34 msgstr "Mot de passe incorrect" 39 35 40 #: _public.php:1 6536 #: _public.php:172 41 37 msgid "Disconnected" 42 38 msgstr "Déconnecté(e)" 43 39 44 #: _public.php:22 340 #: _public.php:228 45 41 msgid "Enable automatic connection" 46 42 msgstr "Activer la connexion automatique" … … 54 50 #: index.php:120 55 51 msgid "Title:" 56 msgstr "Titre 52 msgstr "Titre :" 57 53 58 54 #: _widgets.php:24 59 55 msgid "Text:" 60 msgstr "Texte 56 msgstr "Texte :" 61 57 62 58 #: _widgets.php:25 … … 72 68 msgstr "Page d'accueil uniquement" 73 69 74 #: default-templates/private.html:4675 msgid "Password:"76 msgstr "Mot de passe :"77 78 70 #: index.php:40 79 71 msgid "Passwords don't match" … … 84 76 msgstr "Aucun mot de passe défini." 85 77 86 #: index.php:7 678 #: index.php:77 87 79 msgid "Configuration successfully updated." 88 msgstr " La configuration a été correctement enregistrée"80 msgstr "Configuration mise à jour avec succès." 89 81 90 #: index.php:8 582 #: index.php:86 91 83 msgid "Plugin activation" 92 84 msgstr "Activation de l'extension" 93 85 94 #: index.php: 8986 #: index.php:90 95 87 msgid "Enable private mode" 96 88 msgstr "Activer le mode privé" 97 89 98 #: index.php:9 390 #: index.php:94 99 91 msgid "Presentation options" 100 92 msgstr "Options d'affichage" 101 93 102 #: index.php:9 8103 #: index.php:10 294 #: index.php:99 95 #: index.php:103 104 96 msgid "Required field" 105 97 msgstr "Champ obligatoire" 106 98 107 #: index.php: 9999 #: index.php:100 108 100 msgid "New password:" 109 msgstr "Nouveau mot de passe 101 msgstr "Nouveau mot de passe :" 110 102 111 #: index.php:10 3103 #: index.php:104 112 104 msgid "Confirm password:" 113 msgstr "Confirmez le mot de passe 105 msgstr "Confirmez le mot de passe :" 114 106 115 #: index.php:10 8107 #: index.php:109 116 108 msgid "Propose automatic connection to visitors" 117 109 msgstr "Proposer la connexion automatique aux visiteurs" 118 110 119 #: index.php:11 1111 #: index.php:112 120 112 msgid "With this option, the password could be stored in a cookie." 121 113 msgstr "Cette option permet la mémorisation du mot de passe dans un cookie." 122 114 123 #: index.php:11 3115 #: index.php:114 124 116 msgid "But it still remains a choice for the visitor." 125 117 msgstr "Mais ceci reste toutefois à la discrétion du visiteur." 126 118 127 #: index.php:11 5119 #: index.php:116 128 120 msgid "Don't forget to add a <a href=\"%s\">widget</a> allowing disconnection from the blog." 129 121 msgstr "N'oubliez pas d'ajouter un <a href=\"%s\">widget</a> permettant la déconnexion du blog." 130 131 #: index.php:118132 msgid "Home"133 msgstr "Accueil"134 122 135 123 #: index.php:124 -
plugins/private/style/admin.css
r2378 r2475 1 div.private-msg, p.private-msg { 2 padding : 0.5em 0.5em 0.5em 40px; 3 margin-bottom : 1em; 4 -moz-border-radius : 8px; 5 -webkit-border-radius : 8px; 1 #main-menu #private-blog a { 2 padding: 2px; 3 background: #161400; 4 color: #B9B23B; 5 border: 1px solid #161400; 6 -moz-border-radius: 3px; 7 -webkit-border-radius: 3px; 6 8 } 7 p.private-msg{8 padding-top : 1em;9 padding-bottom : 1em;10 }11 div.private-msg, p.private-msg {12 background : #8a8983 url(index.php?pf=private/style/icon_32.png) no-repeat 5px 5px;13 color : #fff;14 }
Note: See TracChangeset
for help on using the changeset viewer.