source: trunk/plugins/event_tracer/tracer_admin.php @ 1580

Last change on this file since 1580 was 1580, checked in by rvelices, 18 years ago
  • plugins can add now their page to the admin page
  • new plugin (event_tracer) that demonstrate it and useful to see all calls

to trigger_event

  • Property svn:eol-style set to native
File size: 920 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4global $template;
5$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/tracer_admin.tpl') );
6
7if ( isset($_POST['eventTracer_filters']) )
8{
9  $v = $_POST['eventTracer_filters'];
10  $v = str_replace( "\r\n", "\n", $v );
11  $v = str_replace( "\n\n", "\n", $v );
12  $this->my_config['filters'] = explode("\n", $v);
13  $this->my_config['show_args'] = isset($_POST['eventTracer_show_args']);
14  $this->save_config();
15  global $page;
16  array_push($page['infos'], 'event tracer options saved');
17}
18$template->assign_var('EVENT_TRACER_FILTERS', implode("\n", $this->my_config['filters'] ) );
19$template->assign_var('EVENT_TRACER_SHOW_ARGS', $this->my_config['show_args'] ? 'checked="checked"' : '' );
20$template->assign_var('EVENT_TRACER_F_ACTION', $my_url);
21
22$template->assign_var_from_handle( 'PLUGIN_ADMIN_CONTENT', 'plugin_admin_content');
23?>
Note: See TracBrowser for help on using the repository browser.