source: extensions/adult_content/main.inc.php @ 27664

Last change on this file since 27664 was 21057, checked in by flop25, 11 years ago

removed the option for PWG stuffs
added an explicative texte
added new lang key for the PWG Stuff module

File size: 1.5 KB
RevLine 
[9530]1<?php
2/*
3Plugin Name: adult_content
[9542]4Version: auto
[9530]5Description: manage adult content
6Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=141
7Author: Flop25
8Author URI: http://www.planete-flop.fr/
9
10*/
11
12if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
13
14$plugin_name = basename(dirname(__FILE__));
15$plugin_path = dirname(__FILE__).'/';
16define('AC_PATH', dirname(__FILE__).'/' );
17define('AC_NAME', basename(dirname(__FILE__)) );
18
19global $prefixeTable;
20define('AC_CONF' , $prefixeTable . 'ac_config');
21
22include_once(dirname(__FILE__).'/class.inc.php');
23add_event_handler('get_admin_plugin_menu_links', array(&$adult_content, 'ac_lien_menu') );
[10855]24if (!defined('IN_ADMIN') or !IN_ADMIN)
25{
26        add_event_handler('register_user', array(&$adult_content, 'on_register') );
27}
[9530]28// Ajout une entrée dans le menubar
29add_event_handler('blockmanager_register_blocks', array(&$adult_content, 'register_ac_menubar_blocks'));
30add_event_handler('blockmanager_apply', array(&$adult_content, 'placer_identification'));
31//block on index
32
[21047]33add_event_handler('get_stuffs_modules', array(&$adult_content, 'ac_stuffs_module'));
[9530]34
[21047]35
[9530]36add_event_handler('loc_end_picture', 'comment_manage');
37function comment_manage()
38{
39        global $user, $template, $conf;
40        if ( isset($conf['comments_forall']) ) {
41        if ( ($user['username']=='18' or $user['username']=='16') and !$conf['comments_forall'] )
42        {
43                $template->clear_assign('comment_add');
44        }}
45}
46$adult_content = new Adultcontent($plugin_name, $plugin_path);
47set_plugin_data($adult_content->plugin_name, $adult_content);
48
[3331]49?>
Note: See TracBrowser for help on using the repository browser.