1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
3 | # |
---|
4 | # This file is part of Dotclear 2. |
---|
5 | # |
---|
6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
7 | # Licensed under the GPL version 2.0 license. |
---|
8 | # See LICENSE file or |
---|
9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
10 | # |
---|
11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
12 | if (!defined('DC_CONTEXT_ADMIN')) { return; } |
---|
13 | |
---|
14 | $core->addBehavior('adminDashboardIcons','blogroll_dashboard'); |
---|
15 | $core->addBehavior('adminDashboardFavorites','blogroll_dashboard_favorites'); |
---|
16 | $core->addBehavior('adminUsersActionsHeaders','blogroll_users_actions_headers'); |
---|
17 | |
---|
18 | function blogroll_dashboard($core,$icons) |
---|
19 | { |
---|
20 | $icons['blogroll'] = new ArrayObject(array(__('Blogroll'),'plugin.php?p=blogroll','index.php?pf=blogroll/icon.png')); |
---|
21 | } |
---|
22 | function blogroll_dashboard_favorites($core,$favs) |
---|
23 | { |
---|
24 | $favs->register('blogroll', array( |
---|
25 | 'title' => __('Blogroll'), |
---|
26 | 'url' => 'plugin.php?p=blogroll', |
---|
27 | 'small-icon' => 'index.php?pf=blogroll/icon-small.png', |
---|
28 | 'large-icon' => 'index.php?pf=blogroll/icon.png', |
---|
29 | 'permissions' => 'usage,contentadmin' |
---|
30 | )); |
---|
31 | } |
---|
32 | function blogroll_users_actions_headers() |
---|
33 | { |
---|
34 | return dcPage::jsLoad('index.php?pf=blogroll/_users_actions.js'); |
---|
35 | } |
---|
36 | |
---|
37 | $_menu['Blog']->addItem(__('Blogroll'),'plugin.php?p=blogroll','index.php?pf=blogroll/icon-small.png', |
---|
38 | preg_match('/plugin.php\?p=blogroll(&.*)?$/',$_SERVER['REQUEST_URI']), |
---|
39 | $core->auth->check('usage,contentadmin',$core->blog->id)); |
---|
40 | |
---|
41 | $core->auth->setPermissionType('blogroll',__('manage blogroll')); |
---|
42 | |
---|
43 | require dirname(__FILE__).'/_widgets.php'; |
---|
44 | ?> |
---|