source: extensions/Register_PhpBB/main.inc.php @ 7727

Last change on this file since 7727 was 7727, checked in by Eric, 13 years ago

Initial repository based on old 1.2a version

  • Property svn:eol-style set to LF
File size: 1.9 KB
Line 
1<?php
2/*
3Plugin Name: Register PhpBB
4Version: 1.2a
5Description: Ce plugin permet d'enregistrer automatiquement un utilisateur de PWG dans un forum PhpBB. Rendez-vous dans le panneau d'administration du plugin pour finaliser les paramètres - This plugin allows to automatically register a PWG user in a PhpBB forum. Go to plugin administration panel to finalize the settings. Based on original Mod by Flipflip.
6Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=129
7Author: Eric
8Author URI: http://www.infernoweb.net
9*/
10if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
11
12/* ******************* */
13/* Class of the plugin */
14/* ******************* */
15class Register_PhpBB
16{
17/* Set the administration panel of the plugin */
18  function plugin_admin_menu($menu)
19  {
20    array_push($menu,
21        array(
22          'NAME' => 'Register PhpBB',
23          'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/reg_phpbb_admin.php')
24        )
25      );
26    return $menu;
27  }
28
29/* User adding */
30  function PhpBB_Adduser($register_user)
31  {
32        include_once (PHPWG_ROOT_PATH.'/include/constants.php');
33        include_once (dirname(__FILE__).'/include/constants.php');
34        load_conf_from_db('param like \'phpbb\\_%\'');
35        global $conf;
36        if ($conf['phpbb_status'])
37                include (dirname(__FILE__).'/reg_phpbb_adduser.php');
38  }
39
40/* User deletion */
41   function PhpBB_Deluser($user_id)
42  {
43        include_once (PHPWG_ROOT_PATH.'/include/constants.php');
44        include_once (dirname(__FILE__).'/include/constants.php');
45        load_conf_from_db('param like \'phpbb\\_%\'');
46        global $conf;
47        if ($conf['phpbb_status'])
48                include (dirname(__FILE__).'/reg_phpbb_deluser.php');
49  }
50}
51
52$obj = new Register_PhpBB(); /* class loading */
53
54add_event_handler( 'register_user', array(&$obj, 'PhpBB_Adduser') );
55add_event_handler( 'delete_user', array(&$obj, 'PhpBB_Deluser') );
56add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'plugin_admin_menu') );
57set_plugin_data($plugin['id'], $obj);
58?>
Note: See TracBrowser for help on using the repository browser.