| Current Path : /home/magalijoj/www/blog/plugins/contact/ |
| Current File : /home/magalijoj/www/blog/plugins/contact/_admin.php |
<?php
# ***** BEGIN LICENSE BLOCK *****
# This is Contact, a plugin for DotClear.
# Copyright (c) 2005 k-net. All rights reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****
$adminaccess = $core->blog->settings->get('contact_adminaccess');
$adminaccess = $adminaccess === null ? 0 : $adminaccess;
if ($core->auth->isSuperAdmin()
|| ($adminaccess == 1 && $core->auth->check('admin',$core->blog->id))
|| $adminaccess == 0) {
$_menu['Plugins']->addItem(__('Contact'),'plugin.php?p=contact','index.php?pf=contact/icon.png',
preg_match('/plugin.php\?p=contact(&.*)?$/',$_SERVER['REQUEST_URI']),
$core->auth->check('usage,contentadmin',$core->blog->id));
}
$core->addBehavior('initWidgets',array('contactBehaviors','initWidgets'));
class contactBehaviors
{
public static function initWidgets(&$widgets)
{
$widgets->create('contact',__('Contact'),array('tplContact','contactWidget'));
$widgets->contact->setting('title',__('Title: (Use %I for Contact icon)'),'%I Contact');
$widgets->contact->setting('homeonly',__('Home page only'),0,'check');
$widgets->contact->setting('usesubtitle',__('Display the link in a subtitle'),0,'check');
$widgets->contact->setting('subtitle',__('If yes, subtitle :'),__('Contact me !'));
}
}
?>