Changeset 2254 for trunk/plugins/event_tracer
- Timestamp:
- Mar 6, 2008, 1:25:47 AM (17 years ago)
- Location:
- trunk/plugins/event_tracer
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/event_tracer/event_list.php
r1900 r2254 68 68 $url = get_admin_plugin_menu_link(__FILE__); 69 69 70 $template->assign _vars( array(70 $template->assign( array( 71 71 'NB_EVENTS' => count($events), 72 72 'U_SORT0' => add_url_params($url, array('sort'=>0) ), … … 75 75 ) ); 76 76 77 $template->assign('events', array()); 77 78 foreach ($events as $e) 78 79 { 79 $template->a ssign_block_vars( 'event', array(80 $template->append( 'events', array( 80 81 'TYPE' => $e[0], 81 82 'NAME' => $e[1], -
trunk/plugins/event_tracer/event_list.tpl
r2222 r2254 1 <!-- DEV TAG: not smarty migrated --> 2 There are { NB_EVENTS} calls to triger_event or triger_action.1 {* $Id$ *} 2 There are {$NB_EVENTS} calls to triger_event or triger_action. 3 3 4 4 <table width="99%" class="table2"> 5 5 <tr class="throw"> 6 <th><a href="{ U_SORT0}">Type</a></th>7 <th><a href="{ U_SORT1}">Name</a></th>8 <th><a href="{ U_SORT2}">File</a></th>6 <th><a href="{$U_SORT0}">Type</a></th> 7 <th><a href="{$U_SORT1}">Name</a></th> 8 <th><a href="{$U_SORT2}">File</a></th> 9 9 </tr> 10 <!-- BEGIN event --> 10 {foreach from=$events item=event} 11 11 <tr> 12 <td>{ event.TYPE}</td>13 <td>{ event.NAME}</td>14 <td>{ event.FILE}</td>12 <td>{$event.TYPE}</td> 13 <td>{$event.NAME}</td> 14 <td>{$event.FILE}</td> 15 15 </tr> 16 <!-- END event --> 16 {/foreach} 17 17 </table> -
trunk/plugins/event_tracer/main.inc.php
r2243 r2254 1 1 <?php /* 2 2 Plugin Name: Event tracer 3 Version: 1.8 3 Version: 1.8.a 4 4 Description: For developers. Shows all calls to trigger_event. 5 5 Plugin URI: http://www.phpwebgallery.net … … 19 19 } 20 20 21 function get_config_file_dir() 22 { 23 global $conf; 24 return $conf['local_data_dir'].'/plugins/'; 25 } 26 27 function get_config_file_name() 28 { 29 return basename(dirname(__FILE__)).'.dat'; 30 } 31 21 32 function load_config() 22 33 { 23 $x = @file_get_contents( dirname(__FILE__).'/data.dat');34 $x = @file_get_contents( $this->get_config_file_dir().$this->get_config_file_name() ); 24 35 if ($x!==false) 25 36 { … … 39 50 function save_config() 40 51 { 41 $file = fopen( dirname(__FILE__).'/data.dat', 'w' ); 52 $dir = $this->get_config_file_dir(); 53 @mkdir($dir); 54 $file = fopen( $dir.$this->get_config_file_name(), 'w' ); 42 55 fwrite($file, serialize($this->my_config) ); 43 56 fclose( $file ); -
trunk/plugins/event_tracer/tracer_admin.php
r1912 r2254 22 22 array_push($page['infos'], 'event tracer options saved'); 23 23 } 24 $template->assign _var('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) );25 $template->assign _var('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' );26 $template->assign _var('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php'));24 $template->assign('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) ); 25 $template->assign('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' ); 26 $template->assign('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php')); 27 27 28 28 //$template->assign_var('EVENT_TRACER_F_ACTION', $my_url); -
trunk/plugins/event_tracer/tracer_admin.tpl
r2222 r2254 1 <!-- DEV TAG: not smarty migrated --> 1 {* $Id$ *} 2 2 <div class="titrePage"> 3 3 <h2>Event Tracer</h2> … … 9 9 <b>Note that $conf['show_queries'] must be true.</b> 10 10 </p> 11 <form method="post" action="{ EVENT_TRACER_F_ACTION}" class="general">11 <form method="post" action="{$EVENT_TRACER_F_ACTION}" class="general"> 12 12 <fieldset> 13 13 <legend>Event Tracer</legend> 14 14 15 15 <label>Show event argument 16 <input type="checkbox" name="eventTracer_show_args" { EVENT_TRACER_SHOW_ARGS} />16 <input type="checkbox" name="eventTracer_show_args" {$EVENT_TRACER_SHOW_ARGS} /> 17 17 </label> 18 18 <br/> 19 19 <label>Fill below a list of regular expressions (one per line). 20 20 An event will be logged if its name matches at least one expression in the list. 21 <textarea name="eventTracer_filters" id="eventTracer_filters"rows="10" cols="80">{ EVENT_TRACER_FILTERS}</textarea>21 <textarea name="eventTracer_filters" id="eventTracer_filters"rows="10" cols="80">{$EVENT_TRACER_FILTERS}</textarea> 22 22 </label> 23 23 … … 26 26 <p><input class="submit" type="submit" value="Submit" /></p> 27 27 28 <p><a href="{ U_LIST_EVENTS}">Click here to see a complete list of actions and events trigered by this PWG version</a>.</p>28 <p><a href="{$U_LIST_EVENTS}">Click here to see a complete list of actions and events trigered by this PWG version</a>.</p> 29 29 </form>
Note: See TracChangeset
for help on using the changeset viewer.