source: extensions/regenerateThumbnails/main.inc.php @ 32332

Last change on this file since 32332 was 10002, checked in by patdenice, 14 years ago

Add plugin URI and descriptions.

File size: 1.6 KB
Line 
1<?php
2/*
3Plugin Name: Thumbnails Regeneration
4Version: auto
5Description: Regenerate gallery's thumbnails.
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=525
7Author: P@t
8Author URI: http://www.gauchon.com
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12define('REGENERATE_THUMBNAILS_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
13
14add_event_handler('loc_begin_admin', 'rg_add_thumbnails_tab');
15add_event_handler('loc_begin_element_set_global', 'rg_element_set_global_add_action');
16add_event_handler('ws_add_methods', 'add_regenerate_thumbnails_method');
17
18function rg_add_thumbnails_tab()
19{
20  global $page;
21
22  if (isset($_GET['page']) and in_array($_GET['page'], array('thumbnail', 'plugin-regenerateThumbnails')))
23  {
24    load_language('plugin.lang', REGENERATE_THUMBNAILS_PATH);
25    include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
26
27    if ($_GET['page'] == 'plugin-regenerateThumbnails')
28      $page['tab'] = 'regenerateThumbnails';
29    else
30      $page['tab'] = 'thumbnail';
31
32    $tabsheet = new tabsheet();
33    $tabsheet->add('thumbnail', l10n('Thumbnail creation'), get_root_url().'admin.php?page=thumbnail');
34    $tabsheet->add('regenerateThumbnails', l10n('Regenerate Thumbnails'), get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__)));
35    $tabsheet->select($page['tab']);
36    $tabsheet->assign();
37  }
38}
39
40function rg_element_set_global_add_action()
41{
42  include(REGENERATE_THUMBNAILS_PATH.'element_set_global_action.php');
43}
44
45function add_regenerate_thumbnails_method($arr)
46{
47  include_once(REGENERATE_THUMBNAILS_PATH.'ws_functions.inc.php');
48}
49
50?>
Note: See TracBrowser for help on using the repository browser.