source: extensions/CryptograPHP/main.inc.php @ 10879

Last change on this file since 10879 was 10839, checked in by mistic100, 13 years ago

update extension id

File size: 989 bytes
Line 
1<?php
2/*
3Plugin Name: CryptograPHP
4Version: auto
5Description: Add a CryptograPHP captcha to register and ContactForm pages (thanks to P@t)
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=535
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12define('CRYPTO_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
13
14global $conf;
15
16add_event_handler('init', 'crypto_init');
17
18function crypto_init()
19{
20  if (script_basename() == 'register') 
21    include('register.inc.php');
22  elseif (isset($_GET['/contact'])) 
23    include('contactform.inc.php');
24  else if (script_basename() == 'admin')
25    add_event_handler('get_admin_plugin_menu_links', 'crypto_plugin_admin_menu' );
26}
27
28function crypto_plugin_admin_menu($menu)
29{
30        global $page,$conf;
31
32        array_push($menu,
33                        array(
34                                'NAME' => 'CryptograPHP',
35                                'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))
36                        )
37                );
38        return $menu;
39}
40
41?>
Note: See TracBrowser for help on using the repository browser.