source: trunk/tools/triggers_list.php @ 17948

Last change on this file since 17948 was 17948, checked in by mistic100, 12 years ago

feature 2737: improve tag administration screen, update triggers list

File size: 24.4 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Piwigo - a PHP based photo gallery                                    |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
6// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
7// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
8// +-----------------------------------------------------------------------+
9// | This program is free software; you can redistribute it and/or modify  |
10// | it under the terms of the GNU General Public License as published by  |
11// | the Free Software Foundation                                          |
12// |                                                                       |
13// | This program is distributed in the hope that it will be useful, but   |
14// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
15// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
16// | General Public License for more details.                              |
17// |                                                                       |
18// | You should have received a copy of the GNU General Public License     |
19// | along with this program; if not, write to the Free Software           |
20// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
21// | USA.                                                                  |
22// +-----------------------------------------------------------------------+
23
24$core = array(
25array(
26  'name' => 'allow_increment_element_hit_count',
27  'type' => 'trigger_event',
28  'vars' => array('bool', 'content_not_set'),
29  'files' => array('picture.php'),
30),
31array(
32  'name' => 'begin_delete_elements',
33  'type' => 'trigger_action',
34  'vars' => array('array', 'ids'),
35  'files' => array('admin\include\functions.inc.php (delete_elements)'),
36),
37array(
38  'name' => 'blockmanager_apply',
39  'type' => 'trigger_action',
40  'vars' => array('object', 'menublock'),
41  'files' => array('include\block.class.php (BlockManager::apply)'),
42  'infos' => 'use this trigger to modify existing menu blocks',
43),
44array(
45  'name' => 'blockmanager_prepare_display',
46  'type' => 'trigger_action',
47  'vars' => array('object', 'this'),
48  'files' => array('include\block.class.php (BlockManager::prepare_display)'),
49),
50array(
51  'name' => 'blockmanager_register_blocks',
52  'type' => 'trigger_action',
53  'vars' => array('object', 'menu'),
54  'files' => array('include\block.class.php (BlockManager::load_registered_blocks)'),
55  'infos' => 'use this trigger to add menu block',
56),
57array(
58  'name' => 'clean_iptc_value',
59  'type' => 'trigger_event',
60  'vars' => array('string', 'value'),
61  'files' => array('include\functions_metadata.inc.php (clean_iptc_value)'),
62),
63array(
64  'name' => 'combined_css',
65  'type' => 'trigger_event',
66  'vars' => array('string', 'href', 'int', 'file_ver0', 'int', 'file_ver1'),
67  'files' => array('include\template.class.php (Template::flush)'),
68),
69array(
70  'name' => 'combined_css_postfilter',
71  'type' => 'trigger_event',
72  'vars' => array('string', 'css'),
73  'files' => array('include\template.class.php (Template::process_css)'),
74),
75array(
76  'name' => 'combined_script',
77  'type' => 'trigger_event',
78  'vars' => array('string', 'ret', 'string', 'script'),
79  'files' => array('include\template.class.php (Template::make_script_src)'),
80),
81array(
82  'name' => 'delete_categories',
83  'type' => 'trigger_action',
84  'vars' => array('array', 'ids'),
85  'files' => array('admin\include\functions.inc.php (delete_categories)'),
86),
87array(
88  'name' => 'delete_elements',
89  'type' => 'trigger_action',
90  'vars' => array('array', 'ids'),
91  'files' => array('admin\include\functions.inc.php (delete_elements)'),
92),
93array(
94  'name' => 'delete_user',
95  'type' => 'trigger_action',
96  'vars' => array('int', 'user_id'),
97  'files' => array('admin\include\functions.inc.php (delete_user)'),
98),
99array(
100  'name' => 'element_set_global_action',
101  'type' => 'trigger_action',
102  'vars' => array('string', 'action', 'array', 'collection'),
103  'files' => array('admin\batch_manager_global.php'),
104),
105array(
106  'name' => 'format_exif_data',
107  'type' => 'trigger_event',
108  'vars' => array('array', 'exif', 'string', 'filename', 'array', 'map'),
109  'files' => array('include\functions_metadata.inc.php (get_exif_data)'),
110),
111array(
112  'name' => 'functions_history_included',
113  'type' => 'trigger_action',
114  'vars' => array(),
115  'files' => array('admin\include\functions_history.inc.php'),
116),
117array(
118  'name' => 'functions_mail_included',
119  'type' => 'trigger_action',
120  'vars' => array(),
121  'files' => array('include\functions_mail.inc.php'),
122),
123array(
124  'name' => 'get_admin_advanced_features_links',
125  'type' => 'trigger_event',
126  'vars' => array('array', 'advanced_features'),
127  'files' => array('admin\maintenance.php'),
128),
129array(
130  'name' => 'get_admin_plugin_menu_links',
131  'type' => 'trigger_event',
132  'vars' => array('array', null),
133  'files' => array('admin.php'),
134  'infos' => 'use this trigger to add links into admin plugins menu',
135),
136array(
137  'name' => 'get_admins_site_links',
138  'type' => 'trigger_event',
139  'vars' => array('array', 'plugin_links', 'int', 'site_id', 'bool', 'is_remote'),
140  'files' => array('admin\site_manager.php'),
141),
142array(
143  'name' => 'get_batch_manager_prefilters',
144  'type' => 'trigger_event',
145  'vars' => array('array', 'prefilters'),
146  'files' => array('admin\batch_manager_global.php'),
147  'infos' => 'use this trigger to add prefilters into batch manager global',
148),
149array(
150  'name' => 'get_categories_menu_sql_where',
151  'type' => 'trigger_event',
152  'vars' => array('string', 'where', 'bool', 'user_expand', 'bool', 'filter_enabled'),
153  'files' => array('include\functions_category.inc.php (get_categories_menu)'),
154),
155array(
156  'name' => 'get_category_preferred_image_orders',
157  'type' => 'trigger_event',
158  'vars' => array('array', null),
159  'files' => array('include\functions_category.inc.php (get_category_preferred_image_orders)'),
160),
161array(
162  'name' => 'get_download_url',
163  'type' => 'trigger_event',
164  'vars' => array('string', 'url', 'array', 'element_info'),
165  'files' => array('include\functions_picture.inc.php (get_download_url)'),
166),
167array(
168  'name' => 'get_element_metadata_available',
169  'type' => 'trigger_event',
170  'vars' => array('bool', null, 'string', 'element_path'),
171  'files' => array('picture.php'),
172),
173array(
174  'name' => 'get_element_url',
175  'type' => 'trigger_event',
176  'vars' => array('string', 'url', 'array', 'element_info'),
177  'files' => array('include\functions_picture.inc.php (get_element_url)'),
178),
179array(
180  'name' => 'get_high_location',
181  'type' => 'trigger_event',
182  'vars' => array('string', 'location', 'array', 'element_info'),
183  'files' => array('include\functions_picture.inc.php (get_high_location)'),
184),
185array(
186  'name' => 'get_high_url',
187  'type' => 'trigger_event',
188  'vars' => array('string', 'url', 'array', 'element_info'),
189  'files' => array('include\functions_picture.inc.php (get_high_url)'),
190),
191array(
192  'name' => 'get_history',
193  'type' => 'trigger_event',
194  'vars' => array('array', null, 'array', 'page_search', 'array', 'types'),
195  'files' => array('admin\history.php'),
196),
197array(
198  'name' => 'get_image_location',
199  'type' => 'trigger_event',
200  'vars' => array('string', 'path', 'array', 'element_info'),
201  'files' => array('include\functions_picture.inc.php (get_image_location)'),
202),
203array(
204  'name' => 'get_popup_help_content',
205  'type' => 'trigger_event',
206  'vars' => array('string', 'help_content', 'string', 'page'),
207  'files' => array('admin\popuphelp.php', 'popuphelp.php'),
208),
209array(
210  'name' => 'get_pwg_themes',
211  'type' => 'trigger_event',
212  'vars' => array('array', 'themes'),
213  'files' => array('include\functions.inc.php (get_pwg_themes)'),
214),
215array(
216  'name' => 'get_thumbnail_title',
217  'type' => 'trigger_event',
218  'vars' => array('string', 'title', 'array', 'info'),
219  'files' => array('include\functions.inc.php (get_thumbnail_title)'),
220),
221array(
222  'name' => 'get_comments_derivative_params',
223  'type' => 'trigger_event',
224  'vars' => array('ImageStdParams', null),
225  'files' => array('comments.php'),
226  'infos' => 'New in 2.4',
227),
228array(
229  'name' => 'get_index_album_derivative_params',
230  'type' => 'trigger_event',
231  'vars' => array('ImageStdParams', null),
232  'files' => array('includecategory_cats.php', 'include\category_default.inc.php'),
233  'infos' => 'New in 2.4',
234),
235array(
236  'name' => 'get_src_image_url',
237  'type' => 'trigger_event',
238  'vars' => array('string', 'url', 'SrcImage', 'this'),
239  'files' => array('include\derivative.inc.php (SrcImage::__construct)'),
240  'infos' => 'New in 2.4',
241),
242array(
243  'name' => 'get_derivative_url',
244  'type' => 'trigger_event',
245  'vars' => array('string', 'url', 'ImageStdParams', null, 'SrcImage', 'this', 'string', 'rel_url'),
246  'files' => array('include\derivative.inc.php (SrcImage::url, SrcImage::get_url)'),
247  'infos' => 'New in 2.4',
248),
249array(
250  'name' => 'get_tag_alt_names',
251  'type' => 'trigger_event',
252  'vars' => array('array', null, 'array', 'raw_name'),
253  'files' => array('admin\tags.php', 'admin\include\functions.php (get_taglist)'),
254  'infos' => 'New in 2.4',
255),
256array(
257  'name' => 'init',
258  'type' => 'trigger_action',
259  'vars' => array(),
260  'files' => array('include\common.inc.php'),
261  'infos' => 'this action is called just after the common initialization, $conf, $user and $page (partial) variables are availables',
262),
263array(
264  'name' => 'invalidate_user_cache',
265  'type' => 'trigger_action',
266  'vars' => array('bool', 'full'),
267  'files' => array('admin\include\functions.inc.php (invalidate_user_cache)'),
268),
269array(
270  'name' => 'list_check_integrity',
271  'type' => 'trigger_action',
272  'vars' => array('object', 'this'),
273  'files' => array('admin\include\check_integrity.class.php (check_integrity::check)'),
274),
275array(
276  'name' => 'load_image_library',
277  'type' => 'trigger_action',
278  'vars' => array('object', 'this'),
279  'files' => array('admin\include\image.class.php (pwg_image::__construct)'),
280),
281array(
282  'name' => 'load_profile_in_template',
283  'type' => 'trigger_action',
284  'vars' => array('array', 'userdata'),
285  'files' => array('profile.php (load_profile_in_template)'),
286),
287array(
288  'name' => 'loading_lang',
289  'type' => 'trigger_action',
290  'vars' => array(),
291  'files' => array('include\common.inc.php', 'include\functions.inc.php (redirect_html)', 'include\functions_mail.inc.php (switch_lang_to)', 'nbm.php'),
292),
293array(
294  'name' => 'loc_after_page_header',
295  'type' => 'trigger_action',
296  'vars' => array(),
297  'files' => array('include\page_header.php'),
298),
299array(
300  'name' => 'loc_begin_about',
301  'type' => 'trigger_action',
302  'vars' => array(),
303  'files' => array('about.php'),
304),
305array(
306  'name' => 'loc_begin_admin',
307  'type' => 'trigger_action',
308  'vars' => array(),
309  'files' => array('admin.php'),
310),
311array(
312  'name' => 'loc_begin_admin_page',
313  'type' => 'trigger_action',
314  'vars' => array(),
315  'files' => array('admin.php'),
316),
317array(
318  'name' => 'loc_begin_cat_list',
319  'type' => 'trigger_action',
320  'vars' => array(),
321  'files' => array('admin\cat_list.php'),
322),
323array(
324  'name' => 'loc_begin_cat_modify',
325  'type' => 'trigger_action',
326  'vars' => array(),
327  'files' => array('admin\cat_modify.php'),
328),
329array(
330  'name' => 'loc_begin_element_set_global',
331  'type' => 'trigger_action',
332  'vars' => array(),
333  'files' => array('admin\batch_manager_global.php'),
334),
335array(
336  'name' => 'loc_begin_element_set_unit',
337  'type' => 'trigger_action',
338  'vars' => array(),
339  'files' => array('admin\batch_manager_unit.php'),
340),
341array(
342  'name' => 'loc_begin_index',
343  'type' => 'trigger_action',
344  'vars' => array(),
345  'files' => array('index.php'),
346),
347array(
348  'name' => 'loc_begin_index_category_thumbnails',
349  'type' => 'trigger_action',
350  'vars' => array('array', 'categories'),
351  'files' => array('include\category_cats.inc.php'),
352),
353array(
354  'name' => 'loc_begin_index_thumbnails',
355  'type' => 'trigger_action',
356  'vars' => array('array', 'pictures'),
357  'files' => array('include\category_default.inc.php'),
358),
359array(
360  'name' => 'loc_begin_page_header',
361  'type' => 'trigger_action',
362  'vars' => array(),
363  'files' => array('include\page_header.php'),
364),
365array(
366  'name' => 'loc_begin_page_tail',
367  'type' => 'trigger_action',
368  'vars' => array(),
369  'files' => array('include\page_tail.php'),
370),
371array(
372  'name' => 'loc_begin_picture',
373  'type' => 'trigger_action',
374  'vars' => array(),
375  'files' => array('picture.php'),
376),
377array(
378  'name' => 'loc_begin_profile',
379  'type' => 'trigger_action',
380  'vars' => array(),
381  'files' => array('profile.php'),
382),
383array(
384  'name' => 'loc_end_admin',
385  'type' => 'trigger_action',
386  'vars' => array(),
387  'files' => array('admin.php'),
388),
389array(
390  'name' => 'loc_end_cat_list',
391  'type' => 'trigger_action',
392  'vars' => array(),
393  'files' => array('admin\cat_list.php'),
394),
395array(
396  'name' => 'loc_end_cat_modify',
397  'type' => 'trigger_action',
398  'vars' => array(),
399  'files' => array('admin\cat_modify.php'),
400),
401array(
402  'name' => 'loc_end_element_set_global',
403  'type' => 'trigger_action',
404  'vars' => array(),
405  'files' => array('admin\batch_manager_global.php'),
406),
407array(
408  'name' => 'loc_end_element_set_unit',
409  'type' => 'trigger_action',
410  'vars' => array(),
411  'files' => array('admin\batch_manager_unit.php'),
412),
413array(
414  'name' => 'loc_end_index',
415  'type' => 'trigger_action',
416  'vars' => array(),
417  'files' => array('index.php'),
418),
419array(
420  'name' => 'loc_end_index_category_thumbnails',
421  'type' => 'trigger_event',
422  'vars' => array('array', 'tpl_thumbnails_var', 'array', 'categories'),
423  'files' => array('include\category_cats.inc.php'),
424),
425array(
426  'name' => 'loc_end_index_thumbnails',
427  'type' => 'trigger_event',
428  'vars' => array('array', 'tpl_thumbnails_var', 'array', 'pictures'),
429  'files' => array('include\category_default.inc.php'),
430),
431array(
432  'name' => 'loc_end_page_header',
433  'type' => 'trigger_action',
434  'vars' => array(),
435  'files' => array('include\page_header.php'),
436),
437array(
438  'name' => 'loc_end_page_tail',
439  'type' => 'trigger_action',
440  'vars' => array(),
441  'files' => array('include\page_tail.php'),
442),
443array(
444  'name' => 'loc_end_picture',
445  'type' => 'trigger_action',
446  'vars' => array(),
447  'files' => array('picture.php'),
448),
449array(
450  'name' => 'loc_end_profile',
451  'type' => 'trigger_action',
452  'vars' => array(),
453  'files' => array('profile.php'),
454),
455array(
456  'name' => 'loc_end_section_init',
457  'type' => 'trigger_action',
458  'vars' => array(),
459  'files' => array('include\section_init.inc.php'),
460  'infos' => 'this action is called after section initilization, $page variable is fully defined',
461),
462array(
463  'name' => 'loc_visible_user_list',
464  'type' => 'trigger_event',
465  'vars' => array('array', 'visible_user_list'),
466  'files' => array('admin\user_list.php'),
467),
468array(
469  'name' => 'login_failure',
470  'type' => 'trigger_action',
471  'vars' => array('string', 'username'),
472  'files' => array('include\functions_user.inc.php (try_log_user)'),
473),
474array(
475  'name' => 'login_success',
476  'type' => 'trigger_action',
477  'vars' => array('string', 'username'),
478  'files' => array('include\functions_user.inc.php (auto_login, try_log_user)'),
479),
480array(
481  'name' => 'mail_group_assign_vars',
482  'type' => 'trigger_event',
483  'vars' => array('array', 'assign_vars'),
484  'files' => array('include\functions_mail.inc.php (pwg_mail_group)'),
485),
486array(
487  'name' => 'nbm_event_handler_added',
488  'type' => 'trigger_action',
489  'vars' => array(),
490  'files' => array('admin\notification_by_mail.php'),
491),
492array(
493  'name' => 'nbm_render_global_customize_mail_content',
494  'type' => 'trigger_event',
495  'vars' => array('string', 'customize_mail_content'),
496  'files' => array('admin\notification_by_mail.php (do_action_send_mail_notification)'),
497),
498array(
499  'name' => 'nbm_render_user_customize_mail_content',
500  'type' => 'trigger_event',
501  'vars' => array('string', 'customize_mail_content', 'string', 'nbm_user'),
502  'files' => array('admin\notification_by_mail.php (do_action_send_mail_notification)'),
503),
504array(
505  'name' => 'perform_batch_manager_prefilters',
506  'type' => 'trigger_event',
507  'vars' => array('array', 'filter_sets', 'string', 'session_prefilter'),
508  'files' => array('admin\batch_manager.php'),
509),
510array(
511  'name' => 'picture_pictures_data',
512  'type' => 'trigger_event',
513  'vars' => array('array', 'picture'),
514  'files' => array('picture.php'),
515),
516array(
517  'name' => 'plugins_loaded',
518  'type' => 'trigger_action',
519  'vars' => array(),
520  'files' => array('include\functions_plugins.inc.php (load_plugins)'),
521),
522array(
523  'name' => 'pwg_log_allowed',
524  'type' => 'trigger_event',
525  'vars' => array('bool', 'do_log', 'int', 'image_id', 'string', 'image_type'),
526  'files' => array('include\functions.inc.php (pwg_log)'),
527),
528array(
529  'name' => 'register_user',
530  'type' => 'trigger_action',
531  'vars' => array('array', 'user'),
532  'files' => array('include\functions_user.inc.php (register_user)'),
533),
534array(
535  'name' => 'register_user_check',
536  'type' => 'trigger_event',
537  'vars' => array('array', 'errors', 'array', 'user'),
538  'files' => array('include\functions_user.inc.php (register_user)'),
539),
540array(
541  'name' => 'render_category_description',
542  'type' => 'trigger_event',
543  'vars' => array('string', 'category_description', 'string', 'action'),
544  'files' => array('include\category_cats.inc.php', 'include\section_init.inc.php', 'include\ws_functions.inc.php (ws_categories_getList, ws_categories_getAdminList)'),
545),
546array(
547  'name' => 'render_category_literal_description',
548  'type' => 'trigger_event',
549  'vars' => array('string', 'category_description'),
550  'files' => array('include\category_cats.inc.php'),
551),
552array(
553  'name' => 'render_category_name',
554  'type' => 'trigger_event',
555  'vars' => array('string', 'category_name', 'string', 'location'),
556  'files' => array('admin\cat_list.php', 'include\ws_functions.inc.php (ws_categories_getList, ws_categories_getAdminList, ws_categories_move)'),
557),
558array(
559  'name' => 'render_comment_author',
560  'type' => 'trigger_event',
561  'vars' => array('string', 'comment_author'),
562  'files' => array('admin\comments.php', 'comments.php', 'include\picture_comment.inc.php'),
563),
564array(
565  'name' => 'render_comment_content',
566  'type' => 'trigger_event',
567  'vars' => array('string', 'comment_content'),
568  'files' => array('admin\comments.php', 'comments.php', 'include\picture_comment.inc.php'),
569),
570array(
571  'name' => 'render_element_content',
572  'type' => 'trigger_event',
573  'vars' => array('string', 'content', 'array', 'current_picture'),
574  'files' => array('picture.php'),
575),
576array(
577  'name' => 'render_element_description',
578  'type' => 'trigger_event',
579  'vars' => array('string', 'element_name'),
580  'files' => array('include\functions.inc.php (get_picture_title)', 'picture.php'),
581),
582array(
583  'name' => 'render_lost_password_mail_content',
584  'type' => 'trigger_event',
585  'vars' => array('string', 'message'),
586  'files' => array('password.php (process_password_request)'),
587),
588array(
589  'name' => 'render_page_banner',
590  'type' => 'trigger_event',
591  'vars' => array('string', 'gallery_title'),
592  'files' => array('include\page_header.php'),
593),
594array(
595  'name' => 'render_tag_name',
596  'type' => 'trigger_event',
597  'vars' => array('string', 'tag_name'),
598  'files' => array('admin\include\functions.php (get_taglist)', 'admin\tags.php', 'include\functions_tag.inc.php (get_available_tags, get_all_tags, get_common_tags)', 'index.php'),
599),
600array(
601  'name' => 'render_tag_url',
602  'type' => 'trigger_event',
603  'vars' => array('string', 'tag_name'),
604  'files' => array('include\functions.php (tag_id_from_tag_name, create_tag)', 'admin\tags.php'),
605),
606array(
607  'name' => 'save_profile_from_post',
608  'type' => 'trigger_action',
609  'vars' => array('int', 'user_id'),
610  'files' => array('profile.php (save_profile_from_post)'),
611),
612array(
613  'name' => 'send_mail',
614  'type' => 'trigger_event',
615  'vars' => array('bool', 'result', 'string', 'mail_to', 'string', 'mail_subject', 'string', 'mail_content', 'array', 'mail_headers'),
616  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
617),
618array(
619  'name' => 'send_mail_content',
620  'type' => 'trigger_event',
621  'vars' => array('string', 'content'),
622  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
623),
624array(
625  'name' => 'send_mail_headers',
626  'type' => 'trigger_event',
627  'vars' => array('array', 'headers'),
628  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
629),
630array(
631  'name' => 'send_mail_subject',
632  'type' => 'trigger_event',
633  'vars' => array('string', 'cvt_subject'),
634  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
635),
636array(
637  'name' => 'send_mail_to',
638  'type' => 'trigger_event',
639  'vars' => array('string', 'to'),
640  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
641),
642array(
643  'name' => 'sendResponse',
644  'type' => 'trigger_action',
645  'vars' => array('string', 'encodedResponse'),
646  'files' => array('include\ws_core.inc.php (PwgServer::sendResponse)'),
647),
648array(
649  'name' => 'set_status_header',
650  'type' => 'trigger_action',
651  'vars' => array('int', 'code', 'string', 'text'),
652  'files' => array('include\functions_html.inc.php (set_status_header)'),
653),
654array(
655  'name' => 'tabsheet_before_select',
656  'type' => 'trigger_event',
657  'vars' => array('array', 'sheets', 'string', 'tabsheet_id'),
658  'files' => array('include\tabsheet.class.php (tabsheet::select)'),
659  'infos' => 'New in 2.4, use this trigger to add tabs to a tabsheets',
660),
661array(
662  'name' => 'trigger',
663  'type' => 'trigger_action',
664  'vars' => array('array', null),
665  'files' => array('include\functions_plugins.inc.php (trigger_event, trigger_action)'),
666),
667array(
668  'name' => 'user_comment_check',
669  'type' => 'trigger_event',
670  'vars' => array('string', 'comment_action', 'array', 'comm'),
671  'files' => array('include\functions_comment.inc.php (insert_user_comment, update_user_comment)'),
672  'infos' => 'use this trigger to add conditions on comment validation',
673),
674array(
675  'name' => 'user_comment_deletion',
676  'type' => 'trigger_action',
677  'vars' => array('mixed', 'comment_id'),
678  'files' => array('include\functions_comment.inc.php (delete_user_comment)'),
679  'infos' => '$comment_id is and int or an array of int',
680),
681array(
682  'name' => 'user_comment_insertion',
683  'type' => 'trigger_action',
684  'vars' => array('array', 'comm'),
685  'files' => array('include\picture_comment.inc.php'),
686),
687array(
688  'name' => 'user_comment_validation',
689  'type' => 'trigger_action',
690  'vars' => array('mixed', 'comment_id'),
691  'files' => array('include\functions_comment.inc.php (validate_user_comment)'),
692  'infos' => '$comment_id is and int or an array of int',
693),
694array(
695  'name' => 'user_init',
696  'type' => 'trigger_action',
697  'vars' => array('array', 'user'),
698  'files' => array('include\user.inc.php'),
699),
700array(
701  'name' => 'ws_add_methods',
702  'type' => 'trigger_action',
703  'vars' => array('object', 'this'),
704  'files' => array('include\ws_core.inc.php (PwgServer::run)'),
705),
706array(
707  'name' => 'ws_invoke_allowed',
708  'type' => 'trigger_event',
709  'vars' => array('bool', null, 'string', 'methodName', 'array', 'params'),
710  'files' => array('include\ws_core.inc.php (PwgServer::invoke)'),
711),
712);
713?>
714<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
715   "http://www.w3.org/TR/html4/strict.dtd">
716<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
717<head>
718  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
719  <title>Piwigo Core Triggers</title>
720 
721  <link type="text/css" rel="stylesheet" media="screen" href="tablesorter/jquery.tablesorter.css">
722  <script type="text/javascript" src="../themes/default/js/jquery.min.js"></script>
723  <script type="text/javascript" src="tablesorter/jquery.tablesorter.min.js"></script>
724
725 
726  <script type="text/javascript">
727  $(document).ready(function() {
728        $('#triggers').tablesorter({
729          sortList: [[0,0]]
730        });
731  }); 
732  </script>
733</head>
734
735<body style="font-family:arial;">
736<h2>Piwigo Core Triggers</h2>
737
738<a href="http://piwigo.org/doc/doku.php?id=dev:plugins">For more infos about triggers</a>
739
740<table id="triggers" class="tablesorter">
741<thead> 
742<tr>
743  <th>Name</th>
744  <th>Type</th>
745  <th>Vars</th>
746  <th>Usage in the core <span style="font-weight:normal !important;">file (<i>function</i>)</span></th>
747  <th>Commentary</th>
748</tr>
749</thead>
750<tbody>
751
752<?php 
753  foreach ($core as $trigger)
754  {
755    echo '
756  <tr>
757    <td>'.$trigger['name'].'</td>
758    <td>'.$trigger['type'].'</td>
759    <td>';
760    for ($i=0; $i<count($trigger['vars']); $i+=2)
761    {
762      if ($i>0) echo ', ';
763      echo $trigger['vars'][$i].' '.(!empty($trigger['vars'][$i+1])?'<i>$'.$trigger['vars'][$i+1].'</i>':null);
764    }
765    echo '
766    </td>
767    <td>';
768    $f=1;
769    foreach ($trigger['files'] as $file)
770    {
771      if (!$f) echo '<br>'; $f=0;
772      echo preg_replace('#\((.+)\)#', '(<i>$1</i>)', $file);
773    }
774    echo '
775    </td>
776    <td>'.@$trigger['infos'].'</td>
777  </tr>';
778  }
779?>
780
781</tbody>
782</table>
783
784</body>
785</html>
Note: See TracBrowser for help on using the repository browser.