source: extensions/showcase_subscribe/main.inc.php @ 15874

Last change on this file since 15874 was 11762, checked in by plg, 13 years ago

make the plugin compatible with Piwigo 2.1

File size: 767 bytes
Line 
1<?php
2/*
3Plugin Name: Showcase Register
4Version: auto
5Description: Register on Piwigo Showcase (piwigo.org/showcase)
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=
7Author: plg
8Author URI: http://piwigo.wordpress.com
9*/
10
11if (!defined('PHPWG_ROOT_PATH'))
12{
13  die('Hacking attempt!');
14}
15
16/* Plugin admin */
17add_event_handler('get_admin_plugin_menu_links', 'showcase_subscribe_menu');
18function showcase_subscribe_menu($menu)
19{
20  if (preg_match('/^2.1/', PHPWG_VERSION))
21  {
22    $url = get_admin_plugin_menu_link(dirname(__FILE__).'/admin.php');
23  }
24  else
25  {
26    $url = get_root_url().'admin.php?page=plugin-showcase_subscribe';
27  }
28 
29  array_push(
30    $menu,
31    array(
32      'NAME' => 'Showcase',
33      'URL'  => $url,
34      )
35    );
36
37  return $menu;
38}
39?>
Note: See TracBrowser for help on using the repository browser.