Dotclear

source: plugins/blogroll/_admin.php @ 2230:e63e48e1c53b

Revision 2230:e63e48e1c53b, 1.6 KB checked in by Dsls, 12 years ago (diff)
  • New adminDashboardFavorites behavior introduced, adapted several plugins to it
  • Added ability to move the whole favorite with title_cb, now renamed dashboard_cb
  • new pages and pages shortcuts are now functional, closes #1727
  • Moved preferences.php to new notifications system
Line 
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 -----------------------------------------
12if (!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
18function blogroll_dashboard($core,$icons)
19{
20     $icons['blogroll'] = new ArrayObject(array(__('Blogroll'),'plugin.php?p=blogroll','index.php?pf=blogroll/icon.png'));
21}
22function 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}
32function 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
43require dirname(__FILE__).'/_widgets.php';
44?>
Note: See TracBrowser for help on using the repository browser.

Sites map