[16928] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
| 3 | // | Piwigo - a PHP based photo gallery | |
---|
| 4 | // +-----------------------------------------------------------------------+ |
---|
[26461] | 5 | // | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | |
---|
[16928] | 6 | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | |
---|
| 7 | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | |
---|
| 8 | // +-----------------------------------------------------------------------+ |
---|
| 9 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 10 | // | it under the terms of the GNU General Public License as published by | |
---|
| 11 | // | the Free Software Foundation | |
---|
| 12 | // | | |
---|
| 13 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 14 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 15 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 16 | // | General Public License for more details. | |
---|
| 17 | // | | |
---|
| 18 | // | You should have received a copy of the GNU General Public License | |
---|
| 19 | // | along with this program; if not, write to the Free Software | |
---|
| 20 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 21 | // | USA. | |
---|
| 22 | // +-----------------------------------------------------------------------+ |
---|
| 23 | |
---|
| 24 | add_event_handler('tabsheet_before_select', 'add_core_tabs', 0, 2); |
---|
| 25 | |
---|
| 26 | function add_core_tabs($sheets, $tab_id) |
---|
| 27 | { |
---|
| 28 | switch($tab_id) |
---|
| 29 | { |
---|
| 30 | case 'album': |
---|
| 31 | global $admin_album_base_url; |
---|
[23382] | 32 | $sheets['properties'] = array('caption' => '<span class="icon-pencil"></span>'.l10n('Properties'), 'url' => $admin_album_base_url.'-properties'); |
---|
[23029] | 33 | $sheets['sort_order'] = array('caption' => '<span class="icon-shuffle"></span>'.l10n('Manage photo ranks'), 'url' => $admin_album_base_url.'-sort_order'); |
---|
| 34 | $sheets['permissions'] = array('caption' => '<span class="icon-lock"></span>'.l10n('Permissions'), 'url' => $admin_album_base_url.'-permissions'); |
---|
| 35 | $sheets['notification'] = array('caption' => '<span class="icon-mail-alt"></span>'.l10n('Notification'), 'url' => $admin_album_base_url.'-notification'); |
---|
[16928] | 36 | break; |
---|
| 37 | |
---|
| 38 | case 'albums': |
---|
| 39 | global $my_base_url; |
---|
[23382] | 40 | $sheets['list'] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'cat_list'); |
---|
| 41 | $sheets['move'] = array('caption' => '<span class="icon-move"></span>'.l10n('Move'), 'url' => $my_base_url.'cat_move'); |
---|
[23029] | 42 | $sheets['permalinks'] = array('caption' => '<span class="icon-link"></span>'.l10n('Permalinks'), 'url' => $my_base_url.'permalinks'); |
---|
[16928] | 43 | break; |
---|
| 44 | |
---|
| 45 | case 'batch_manager': |
---|
| 46 | global $manager_link; |
---|
| 47 | $sheets['global'] = array('caption' => l10n('global mode'), 'url' => $manager_link.'global'); |
---|
| 48 | $sheets['unit'] = array('caption' => l10n('unit mode'), 'url' => $manager_link.'unit'); |
---|
| 49 | break; |
---|
| 50 | |
---|
| 51 | case 'cat_options': |
---|
| 52 | global $link_start, $conf; |
---|
[23029] | 53 | $sheets['status'] = array('caption' => '<span class="icon-lock"></span>'.l10n('Public / Private'), 'url' => $link_start.'cat_options&section=status'); |
---|
| 54 | $sheets['visible'] = array('caption' => '<span class="icon-block"></span>'.l10n('Lock'), 'url' => $link_start.'cat_options&section=visible'); |
---|
[16928] | 55 | if ($conf['activate_comments']) |
---|
[23029] | 56 | $sheets['comments'] = array('caption' => '<span class="icon-chat"></span>'.l10n('Comments'), 'url' => $link_start.'cat_options&section=comments'); |
---|
[16928] | 57 | if ($conf['allow_random_representative']) |
---|
| 58 | $sheets['representative'] = array('caption' => l10n('Representative'), 'url' => $link_start.'cat_options&section=representative'); |
---|
| 59 | break; |
---|
| 60 | |
---|
| 61 | case 'comments': |
---|
[25084] | 62 | $sheets[''] = array('caption' => l10n('User comments'), 'url' => ''); |
---|
[16928] | 63 | break; |
---|
[25237] | 64 | |
---|
| 65 | case 'users': |
---|
| 66 | $sheets[''] = array('caption' => '<span class="icon-users"> </span>'.l10n('User list'), 'url' => ''); |
---|
| 67 | break; |
---|
[25449] | 68 | |
---|
| 69 | case 'groups': |
---|
| 70 | $sheets[''] = array('caption' => '<span class="icon-group"> </span>'.l10n('Groups'), 'url' => ''); |
---|
| 71 | break; |
---|
| 72 | |
---|
[16928] | 73 | case 'configuration': |
---|
| 74 | global $conf_link; |
---|
[25372] | 75 | $sheets['main'] = array('caption' => l10n('General'), 'url' => $conf_link.'main'); |
---|
[16928] | 76 | $sheets['sizes'] = array('caption' => l10n('Photo sizes'), 'url' => $conf_link.'sizes'); |
---|
| 77 | $sheets['watermark'] = array('caption' => l10n('Watermark'), 'url' => $conf_link.'watermark'); |
---|
| 78 | $sheets['display'] = array('caption' => l10n('Display'), 'url' => $conf_link.'display'); |
---|
| 79 | $sheets['comments'] = array('caption' => l10n('Comments'), 'url' => $conf_link.'comments'); |
---|
| 80 | $sheets['default'] = array('caption' => l10n('Guest Settings'), 'url' => $conf_link.'default'); |
---|
| 81 | break; |
---|
| 82 | |
---|
| 83 | case 'help': |
---|
| 84 | global $help_link; |
---|
| 85 | $sheets['add_photos'] = array('caption' => l10n('Add Photos'), 'url' => $help_link.'add_photos'); |
---|
| 86 | $sheets['permissions'] = array('caption' => l10n('Permissions'), 'url' => $help_link.'permissions'); |
---|
| 87 | $sheets['groups'] = array('caption' => l10n('Groups'), 'url' => $help_link.'groups'); |
---|
| 88 | $sheets['virtual_links'] = array('caption' => l10n('Virtual Links'), 'url' => $help_link.'virtual_links'); |
---|
| 89 | $sheets['misc'] = array('caption' => l10n('Miscellaneous'), 'url' => $help_link.'misc'); |
---|
| 90 | break; |
---|
| 91 | |
---|
| 92 | case 'history': |
---|
| 93 | global $link_start; |
---|
[23382] | 94 | $sheets['stats'] = array('caption' => '<span class="icon-signal"></span>'.l10n('Statistics'), 'url' => $link_start.'stats'); |
---|
| 95 | $sheets['history'] = array('caption' => '<span class="icon-search"></span>'.l10n('Search'), 'url' => $link_start.'history'); |
---|
[16928] | 96 | break; |
---|
| 97 | |
---|
| 98 | case 'languages': |
---|
| 99 | global $my_base_url; |
---|
[23382] | 100 | $sheets['installed'] = array('caption' => '<span class="icon-language"></span>'.l10n('Installed Languages'), 'url' => $my_base_url.'&tab=installed'); |
---|
| 101 | $sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&tab=update'); |
---|
| 102 | $sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Add New Language'), 'url' => $my_base_url.'&tab=new'); |
---|
[16928] | 103 | break; |
---|
| 104 | |
---|
| 105 | case 'nbm': |
---|
| 106 | global $base_url; |
---|
| 107 | $sheets['param'] = array('caption' => l10n('Parameter'), 'url' => $base_url.'?page=notification_by_mail&mode=param'); |
---|
| 108 | $sheets['subscribe'] = array('caption' => l10n('Subscribe'), 'url' => $base_url.'?page=notification_by_mail&mode=subscribe'); |
---|
| 109 | $sheets['send'] = array('caption' => l10n('Send'), 'url' => $base_url.'?page=notification_by_mail&mode=send'); |
---|
| 110 | break; |
---|
| 111 | |
---|
| 112 | case 'photo': |
---|
| 113 | global $admin_photo_base_url; |
---|
| 114 | $sheets['properties'] = array('caption' => l10n('Properties'), 'url' => $admin_photo_base_url.'-properties'); |
---|
[23029] | 115 | $sheets['coi'] = array('caption' => '<span class="icon-crop"></span>'.l10n('Center of interest'), 'url' => $admin_photo_base_url.'-coi'); |
---|
[16928] | 116 | break; |
---|
| 117 | |
---|
| 118 | case 'photos_add': |
---|
| 119 | global $conf; |
---|
[23382] | 120 | $sheets['direct'] = array('caption' => '<span class="icon-upload"></span>'.l10n('Web Form'), 'url' => PHOTOS_ADD_BASE_URL.'&section=direct'); |
---|
| 121 | $sheets['applications'] = array('caption' => '<span class="icon-network"></span>'.l10n('Applications'), 'url' => PHOTOS_ADD_BASE_URL.'&section=applications'); |
---|
[16928] | 122 | if ($conf['enable_synchronization']) |
---|
[23382] | 123 | $sheets['ftp'] = array('caption' => '<span class="icon-exchange"></span>'.l10n('FTP + Synchronization'), 'url' => PHOTOS_ADD_BASE_URL.'&section=ftp'); |
---|
[16928] | 124 | break; |
---|
| 125 | |
---|
| 126 | case 'plugins': |
---|
| 127 | global $my_base_url; |
---|
[23382] | 128 | $sheets['installed'] = array('caption' => '<span class="icon-equalizer"></span>'.l10n('Plugin list'), 'url' => $my_base_url.'&tab=installed'); |
---|
| 129 | $sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&tab=update'); |
---|
| 130 | $sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Other plugins'), 'url' => $my_base_url.'&tab=new'); |
---|
[16928] | 131 | break; |
---|
| 132 | |
---|
| 133 | case 'rating': |
---|
| 134 | $sheets['rating'] = array('caption' => l10n('Photos'), 'url' => get_root_url().'admin.php?page=rating'); |
---|
| 135 | $sheets['rating_user'] = array('caption' => l10n('Users'), 'url' => get_root_url().'admin.php?page=rating_user'); |
---|
| 136 | break; |
---|
| 137 | |
---|
| 138 | case 'themes': |
---|
| 139 | global $my_base_url; |
---|
[23382] | 140 | $sheets['installed'] = array('caption' => '<span class="icon-brush"></span>'.l10n('Installed Themes'), 'url' => $my_base_url.'&tab=installed'); |
---|
| 141 | $sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&tab=update'); |
---|
| 142 | $sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Add New Theme'), 'url' => $my_base_url.'&tab=new'); |
---|
[16928] | 143 | break; |
---|
| 144 | |
---|
| 145 | case 'updates': |
---|
| 146 | global $my_base_url; |
---|
| 147 | $sheets['pwg'] = array('caption' => l10n('Piwigo Update'), 'url' => $my_base_url); |
---|
| 148 | $sheets['ext'] = array('caption' => l10n('Extensions Update'), 'url' => $my_base_url.'&tab=ext'); |
---|
| 149 | break; |
---|
| 150 | } |
---|
| 151 | |
---|
| 152 | return $sheets; |
---|
| 153 | } |
---|
| 154 | |
---|
| 155 | ?> |
---|