Changeset 3061
- Timestamp:
- 07/23/11 14:19:23 (12 years ago)
- Location:
- plugins/contactMe
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/contactMe/_admin.php
r227 r3061 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-20 08 Olivier Meunier and contributors6 # Copyright (c) 2003-2011 Olivier Meunier and dcTeam 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 15 15 preg_match('/plugin.php\?p=contactMe(&.*)?$/',$_SERVER['REQUEST_URI']), 16 16 $core->auth->check('admin',$core->blog->id)); 17 18 $core->addBehavior('adminSimpleMenuAddType',array('contactMeSimpleMenu','adminSimpleMenuAddType')); 19 $core->addBehavior('adminSimpleMenuBeforeEdit',array('contactMeSimpleMenu','adminSimpleMenuBeforeEdit')); 20 21 class contactMeSimpleMenu { 22 23 public static function adminSimpleMenuAddType($items) { 24 $items['contactme'] = new ArrayObject(array(__('Contact me'),false)); 25 } 26 27 public static function adminSimpleMenuBeforeEdit($item_type,$item_select,$args) { 28 global $core; 29 30 if ($item_type == 'contactme') { 31 32 $args[0] = __('Contact me'); 33 $args[1] = __('Mail contact form'); 34 $args[2] .= $core->url->getBase('contactme'); 35 } 36 } 37 38 } 17 39 ?> -
plugins/contactMe/_define.php
r2354 r3061 16 16 /* Description*/ "Add a simple contact form on your blog", 17 17 /* Author */ "Olivier Meunier and contributors", 18 /* Version */ '1. 1',18 /* Version */ '1.2', 19 19 /* Permissions */ 'admin' 20 20 ); -
plugins/contactMe/_prepend.php
r227 r3061 12 12 if (!defined('DC_RC_PATH')) { return; } 13 13 14 $core->url->register('contactme','contact','^contact(?:/(.+))?$',array('urlContactMe','contact')); 15 14 16 require dirname(__FILE__).'/_widgets.php'; 15 17 ?> -
plugins/contactMe/_public.php
r2354 r3061 16 16 __('Message'); 17 17 18 $core->url->register('contactme','contact','^contact(?:/(.+))?$',array('urlContactMe','contact'));19 20 18 $core->tpl->addValue('ContactMeURL',array('tplContactMe','ContactMeURL')); 21 19 $core->tpl->addBlock('ContactMeIf',array('tplContactMe','ContactMeIf')); … … 30 28 $core->tpl->addValue('ContactMeMessage',array('tplContactMe','ContactMeMessage')); 31 29 30 $core->addBehavior('publicBreadcrumb',array('extContactMe','publicBreadcrumb')); 31 32 class extContactMe 33 { 34 public static function publicBreadcrumb($context,$separator) 35 { 36 if ($context == 'contactme') { 37 return __('Contact me'); 38 } 39 } 40 } 32 41 33 42 class urlContactMe extends dcUrlHandlers
Note: See TracChangeset
for help on using the changeset viewer.