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