source: extensions/PWG_Stuffs/main.inc.php @ 3300

Revision 3300, 1.1 KB checked in by patdenice, 11 years ago (diff)

New extension added:
PWG Stuffs (2.0.o)

Line 
1<?php
2/*
3Plugin Name: PWG Stuffs
4Version: 2.0.o
5Description: Insert modules on your gallery
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=190
7Author: P@t
8Author URI: http://www.gauchon.com
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13global $prefixeTable;
14
15define('STUFFS_DIR' , basename(dirname(__FILE__)));
16define('STUFFS_PATH' , PHPWG_PLUGINS_PATH . STUFFS_DIR . '/');
17define('STUFFS_TABLE' , $prefixeTable . 'stuffs');
18
19function stuffs_admin_menu($menu)
20{
21    array_push($menu, array(
22      'NAME' => 'PWG Stuffs',
23      'URL' => get_admin_plugin_menu_link(STUFFS_PATH . 'admin/admin.php')));
24    return $menu;
25}
26
27function set_stuffs_on_index()
28{
29        global $page;
30
31  if (isset($page['section']) and $page['section'] == 'categories')
32  {
33    include_once(STUFFS_PATH . 'include/stuffs.inc.php');
34        }
35}
36
37function set_stuffs_on_picture()
38{
39        include_once(STUFFS_PATH . 'include/stuffs.inc.php');
40}
41
42add_event_handler('get_admin_plugin_menu_links', 'stuffs_admin_menu');
43add_event_handler('loc_begin_index', 'set_stuffs_on_index');
44add_event_handler('loc_begin_picture', 'set_stuffs_on_picture');
45
46?>
Note: See TracBrowser for help on using the repository browser.