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

Last change on this file since 9568 was 9542, checked in by flop25, 13 years ago

new system when posting checkbox
testing the auto version

File size: 1.5 KB
Line 
1<?php
2/*
3Plugin Name: adult_content
4Version: auto
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') );
24add_event_handler('register_user', array(&$adult_content, 'on_register') );
25// Ajout une entrée dans le menubar
26add_event_handler('blockmanager_register_blocks', array(&$adult_content, 'register_ac_menubar_blocks'));
27add_event_handler('blockmanager_apply', array(&$adult_content, 'placer_identification'));
28//block on index
29
30/*
31global $conf;
32add_event_handler('loc_begin_index', array(&$adult_content, 'set_block_on_index'));
33*/
34
35add_event_handler('loc_end_picture', 'comment_manage');
36function comment_manage()
37{
38        global $user, $template, $conf;
39        if ( isset($conf['comments_forall']) ) {
40        if ( ($user['username']=='18' or $user['username']=='16') and !$conf['comments_forall'] )
41        {
42                $template->clear_assign('comment_add');
43        }}
44}
45$adult_content = new Adultcontent($plugin_name, $plugin_path);
46set_plugin_data($adult_content->plugin_name, $adult_content);
47
48?>
Note: See TracBrowser for help on using the repository browser.