Changeset 863 for plugins/private
- Timestamp:
- 03/12/09 00:42:32 (15 years ago)
- Location:
- plugins/private
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/private/_admin.php
r611 r863 1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 2 /***************************************************************\ 3 * This is 'Private', a plugin for Dotclear 2 * 4 * * 5 * Copyright (c) 2008 * 6 * Osku and contributors. * 7 * * 8 * This is an open source software, distributed under the GNU * 9 * General Public License (version 2) terms and conditions. * 10 * * 11 * You should have received a copy of the GNU General Public * 12 * License along with 'Private blog' (see LICENSE); * 13 * if not, write to the Free Software Foundation, Inc., * 14 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 \***************************************************************/ 1 <?php 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of Private mode, a plugin for Dotclear. 4 # 5 # Copyright (c) 2008, 2009 Osku 6 # 7 # Licensed under the GPL version 2.0 license. 8 # A copy of this license is available in LICENSE file or at 9 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 # -- END LICENSE BLOCK ------------------------------------ 11 16 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 17 13 -
plugins/private/_define.php
r749 r863 1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 2 /***************************************************************\ 3 * This is 'Private', a plugin for Dotclear 2 * 4 * * 5 * Copyright (c) 2008 * 6 * Osku and contributors. * 7 * * 8 * This is an open source software, distributed under the GNU * 9 * General Public License (version 2) terms and conditions. * 10 * * 11 * You should have received a copy of the GNU General Public * 12 * License along with 'Private blog' (see LICENSE); * 13 * if not, write to the Free Software Foundation, Inc., * 14 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 \***************************************************************/ 1 <?php 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of Private mode, a plugin for Dotclear. 4 # 5 # Copyright (c) 2008, 2009 Osku 6 # 7 # Licensed under the GPL version 2.0 license. 8 # A copy of this license is available in LICENSE file or at 9 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 # -- END LICENSE BLOCK ------------------------------------ 11 16 12 if (!defined('DC_RC_PATH')) { return; } 17 13 … … 20 16 /* Description*/ "Protect your blog with a password", 21 17 /* Author */ "Osku", 22 /* Version */ '0. 6',18 /* Version */ '0.7-gamma', 23 19 /* Permissions */ 'admin' 24 20 ); -
plugins/private/_prepend.php
r611 r863 1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 2 /***************************************************************\ 3 * This is 'Private', a plugin for Dotclear 2 * 4 * * 5 * Copyright (c) 2008 * 6 * Osku and contributors. * 7 * * 8 * This is an open source software, distributed under the GNU * 9 * General Public License (version 2) terms and conditions. * 10 * * 11 * You should have received a copy of the GNU General Public * 12 * License along with 'Private blog' (see LICENSE); * 13 * if not, write to the Free Software Foundation, Inc., * 14 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 \***************************************************************/ 1 <?php 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of Private mode, a plugin for Dotclear. 4 # 5 # Copyright (c) 2008, 2009 Osku 6 # 7 # Licensed under the GPL version 2.0 license. 8 # A copy of this license is available in LICENSE file or at 9 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 # -- END LICENSE BLOCK ------------------------------------ 11 16 12 if (!defined('DC_RC_PATH')) { return; } 17 13 -
plugins/private/_public.php
r749 r863 1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 2 /***************************************************************\ 3 * This is 'Private', a plugin for Dotclear 2 * 4 * * 5 * Copyright (c) 2008 * 6 * Osku and contributors. * 7 * * 8 * This is an open source software, distributed under the GNU * 9 * General Public License (version 2) terms and conditions. * 10 * * 11 * You should have received a copy of the GNU General Public * 12 * License along with 'Private blog' (see LICENSE); * 13 * if not, write to the Free Software Foundation, Inc., * 14 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 \***************************************************************/ 1 <?php 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of Private mode, a plugin for Dotclear. 4 # 5 # Copyright (c) 2008, 2009 Osku 6 # 7 # Licensed under the GPL version 2.0 license. 8 # A copy of this license is available in LICENSE file or at 9 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 # -- END LICENSE BLOCK ------------------------------------ 11 16 12 if (!defined('DC_RC_PATH')) { return; } 17 13 … … 48 44 $urlp->registerDefault(array('urlPrivate','callbackbidon')); 49 45 50 $path = str_replace(http::getHost(),'',$core->blog->url);51 if ($core->blog->settings->url_scan == 'query_string')52 {53 $path = str_replace(basename($core->blog->url),'',$path);54 }46 //$path = str_replace(http::getHost(),'',$core->blog->url); 47 //if ($core->blog->settings->url_scan == 'query_string') 48 //{ 49 // $path = str_replace(basename($core->blog->url),'',$path); 50 //} 55 51 if (!isset($session)) 56 52 { … … 58 54 $core->con, 59 55 $core->prefix.'session', 60 'dc_privateblog ',61 $path56 'dc_privateblog_sess_'.$core->blog->id, 57 '/' 62 58 ); 63 59 $session->start(); … … 81 77 { 82 78 // Add cookie test 83 $cookiepass="dc_ blog_private_".$core->blog->id;79 $cookiepass="dc_privateblog_cookie_".$core->blog->id; 84 80 if (!empty($_COOKIE[$cookiepass])) { 85 81 $cookiepassvalue=(($_COOKIE[$cookiepass]) == … … 92 88 if ($cookiepassvalue != false) { 93 89 $_SESSION['sess_blog_private'] = $_COOKIE[$cookiepass]; 94 setcookie($cookiepass,$_COOKIE[$cookiepass],time()+31536000,'/');90 //setcookie($cookiepass,$_COOKIE[$cookiepass],time()+31536000,'/'); 95 91 return; 96 92 … … 125 121 { 126 122 $session->destroy(); 123 setcookie($cookiepass,md5($_POST['private_pass']),time()-86400,'/'); 127 124 $_ctx->blogpass_error = __('Disconnected'); 128 125 $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates'); … … 185 182 $res = '<div class="blogout">'. 186 183 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 184 ($w->text ? $w->text : ''). 187 185 '<form action="'.$core->blog->url.'" method="post">'. 188 186 '<p class="buttons">'. 189 187 '<input type="hidden" name="blogout" id="blogout" value="">'. 190 '<input type="submit" value="'. __('Disconnect').'" class="logout"></p>'.188 '<input type="submit" value="'.html::escapeHTML($w->label).'" class="logout"></p>'. 191 189 '</form></div>'; 192 190 return $res; -
plugins/private/_widgets.php
r570 r863 1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 2 /***************************************************************\ 3 * This is 'Private', a plugin for Dotclear 2 * 4 * * 5 * Copyright (c) 2008 * 6 * Osku and contributors. * 7 * * 8 * This is an open source software, distributed under the GNU * 9 * General Public License (version 2) terms and conditions. * 10 * * 11 * You should have received a copy of the GNU General Public * 12 * License along with 'Private blog' (see LICENSE); * 13 * if not, write to the Free Software Foundation, Inc., * 14 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 \***************************************************************/ 1 <?php 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of Private mode, a plugin for Dotclear. 4 # 5 # Copyright (c) 2008, 2009 Osku 6 # 7 # Licensed under the GPL version 2.0 license. 8 # A copy of this license is available in LICENSE file or at 9 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 # -- END LICENSE BLOCK ------------------------------------ 11 16 12 if (!defined('DC_RC_PATH')) { return; } 17 13 … … 24 20 $widgets->create('privateblog',__('Blog logout'),array('tplPrivate','privateWidgets')); 25 21 $widgets->privateblog->setting('title',__('Title:'),''); 22 $widgets->privateblog->setting('text',__('Text:'),'','textarea'); 23 $widgets->privateblog->setting('label',__('Button:'),__('Disconnect')); 26 24 $widgets->privateblog->setting('homeonly',__('Home page only'),0,'check'); 27 25 } -
plugins/private/index.php
r694 r863 1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 2 /***************************************************************\ 3 * This is 'Private', a plugin for Dotclear 2 * 4 * * 5 * Copyright (c) 2008 * 6 * Osku and contributors. * 7 * * 8 * This is an open source software, distributed under the GNU * 9 * General Public License (version 2) terms and conditions. * 10 * * 11 * You should have received a copy of the GNU General Public * 12 * License along with 'Private blog' (see LICENSE); * 13 * if not, write to the Free Software Foundation, Inc., * 14 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 \***************************************************************/ 1 <?php 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of Private mode, a plugin for Dotclear. 4 # 5 # Copyright (c) 2008, 2009 Osku 6 # 7 # Licensed under the GPL version 2.0 license. 8 # A copy of this license is available in LICENSE file or at 9 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 # -- END LICENSE BLOCK ------------------------------------ 16 11 17 12 // Setting default parameters if missing configuration
Note: See TracChangeset
for help on using the changeset viewer.