Changeset 749 for plugins/private
- Timestamp:
- 02/07/09 19:56:46 (15 years ago)
- Location:
- plugins/private
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/private/_define.php
r694 r749 20 20 /* Description*/ "Protect your blog with a password", 21 21 /* Author */ "Osku", 22 /* Version */ '0. 5',22 /* Version */ '0.6', 23 23 /* Permissions */ 'admin' 24 24 ); -
plugins/private/_public.php
r694 r749 20 20 $core->tpl->addValue('PrivateReqPage',array('tplPrivate','PrivateReqPage')); 21 21 $core->tpl->addBlock('IfPrivateMsgError',array('tplPrivate','IfPrivateMsgError')); 22 22 $core->tpl->addValue('PrivatePassRemember',array('tplPrivate','PrivatePassRemember')); 23 23 $core->tpl->addValue('PrivateMsgError',array('tplPrivate','PrivateMsgError')); 24 24 … … 80 80 else 81 81 { 82 // Add cookie test 83 $cookiepass="dc_blog_private_".$core->blog->id; 84 if (!empty($_COOKIE[$cookiepass])) { 85 $cookiepassvalue=(($_COOKIE[$cookiepass]) == 86 $core->blog->settings->blog_private_pwd); 87 } else { 88 $cookiepassvalue=false; 89 } 82 90 if (!isset($_SESSION['sess_blog_private']) || $_SESSION['sess_blog_private'] == "") 83 91 { 92 if ($cookiepassvalue != false) { 93 $_SESSION['sess_blog_private'] = $_COOKIE[$cookiepass]; 94 setcookie($cookiepass,$_COOKIE[$cookiepass],time()+31536000,'/'); 95 return; 96 97 } 84 98 if (!empty($_POST['private_pass'])) 85 99 { … … 87 101 { 88 102 $_SESSION['sess_blog_private'] = md5($_POST['private_pass']); 103 if (!empty($_POST['pass_remember'])) 104 { 105 setcookie($cookiepass,md5($_POST['private_pass']),time()+31536000,'/'); 106 } 89 107 return; 90 108 } … … 148 166 } 149 167 168 public static function PrivatePassRemember($attr) 169 { 170 $res = '<p><label class="classic">'. 171 form::checkbox(array('pass_remember'),1,'','',2).' '. 172 __('Enable automatic connection').'</label></p>'; 173 return $res; 174 } 175 150 176 public static function privateWidgets(&$w) 151 177 { … … 168 194 else 169 195 { 170 return; 196 return; 171 197 } 172 198 } -
plugins/private/default-templates/private.html
r570 r749 38 38 </tpl:IfPrivateMsgError> 39 39 {{tpl:PrivateMsg}} 40 {{tpl:PrivatePassRemember}} 40 41 <p><label>{{tpl:lang Password:}} <input name="private_pass" id="private_pass" type="password" size="30" maxlength="255" value="" tabindex="1" /></label> <input type="submit" class="submit" value="ok" /></p> 41 42 -
plugins/private/locales/_pot/main.pot
r570 r749 9 9 "Project-Id-Version: PACKAGE VERSION\n" 10 10 "Report-Msgid-Bugs-To: \n" 11 "POT-Creation-Date: 200 8-11-25 23:01+0100\n"11 "POT-Creation-Date: 2009-02-07 19:49+0100\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 17 17 "Content-Transfer-Encoding: 8bit\n" 18 18 19 #: _admin.php:18 index.php:9 1 index.php:9519 #: _admin.php:18 index.php:92 index.php:96 20 20 msgid "Private mode" 21 21 msgstr "" … … 29 29 msgstr "" 30 30 31 #: index.php:55 31 #: index.php:47 32 msgid "No password set." 33 msgstr "" 34 35 #: index.php:60 32 36 msgid "No page title." 33 37 msgstr "" 34 38 35 #: index.php: 5939 #: index.php:64 36 40 msgid "No private message." 37 41 msgstr "" 38 42 39 #: index.php: 6943 #: index.php:74 40 44 msgid "Passwords don't match" 41 45 msgstr "" 42 46 43 #: index.php: 7647 #: index.php:81 44 48 msgid "Configuration successfully updated." 45 49 msgstr "" 46 50 47 #: index.php:85 48 msgid "No password set." 49 msgstr "" 50 51 #: index.php:104 51 #: index.php:105 52 52 msgid "Plugin activation" 53 53 msgstr "" 54 54 55 #: index.php:10 755 #: index.php:108 56 56 msgid "Enable Private mode" 57 57 msgstr "" 58 58 59 #: index.php:11 059 #: index.php:111 60 60 msgid "New password:" 61 61 msgstr "" 62 62 63 #: index.php:11 463 #: index.php:115 64 64 msgid "Confirm password:" 65 65 msgstr "" 66 66 67 #: index.php:1 1967 #: index.php:120 68 68 msgid "Presentation options" 69 69 msgstr "" 70 70 71 #: index.php:12 171 #: index.php:122 72 72 msgid "Private page title:" 73 73 msgstr "" 74 74 75 #: index.php:12 575 #: index.php:126 76 76 msgid "Private message:" 77 77 msgstr "" 78 78 79 #: index.php:13 279 #: index.php:133 80 80 msgid "Save configuration" 81 81 msgstr "" 82 82 83 #: _public.php: 4983 #: _public.php:109 _public.php:119 84 84 msgid "Wrong password" 85 85 msgstr "" 86 86 87 #: _public.php: 5887 #: _public.php:127 88 88 msgid "Disconnected" 89 89 msgstr "" 90 90 91 #: _public.php:112 91 #: _public.php:172 92 msgid "Enable automatic connection" 93 msgstr "" 94 95 #: _public.php:190 92 96 msgid "Disconnect" 93 97 msgstr "" -
plugins/private/locales/fr/main.po
r570 r749 89 89 msgstr "Déconnecté(e)" 90 90 91 #: _public.php:172 92 msgid "Enable automatic connection" 93 msgstr "Activer la connexion automatique" 94 91 95 #: _public.php:112 92 96 msgid "Disconnect"
Note: See TracChangeset
for help on using the changeset viewer.