source: trunk/tools/triggers_list.php @ 18063

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

feature 2747: Add triggers on all main pages

File size: 26.7 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_begin_password',
385  'type' => 'trigger_action',
386  'vars' => array(),
387  'files' => array('password.php'),
388  'infos' => 'New in 2.5',
389),
390array(
391  'name' => 'loc_begin_register',
392  'type' => 'trigger_action',
393  'vars' => array(),
394  'files' => array('register.php'),
395  'infos' => 'New in 2.5',
396),
397array(
398  'name' => 'loc_begin_search',
399  'type' => 'trigger_action',
400  'vars' => array(),
401  'files' => array('search.php'),
402  'infos' => 'New in 2.5',
403),
404array(
405  'name' => 'loc_begin_tags',
406  'type' => 'trigger_action',
407  'vars' => array(),
408  'files' => array('tags.php'),
409  'infos' => 'New in 2.5',
410),
411array(
412  'name' => 'loc_begin_comments',
413  'type' => 'trigger_action',
414  'vars' => array(),
415  'files' => array('comments.php'),
416  'infos' => 'New in 2.5',
417),
418array(
419  'name' => 'loc_begin_identification',
420  'type' => 'trigger_action',
421  'vars' => array(),
422  'files' => array('identification.php'),
423  'infos' => 'New in 2.5',
424),
425array(
426  'name' => 'loc_begin_notification',
427  'type' => 'trigger_action',
428  'vars' => array(),
429  'files' => array('notification.php'),
430  'infos' => 'New in 2.5',
431),
432array(
433  'name' => 'loc_end_password',
434  'type' => 'trigger_action',
435  'vars' => array(),
436  'files' => array('password.php'),
437  'infos' => 'New in 2.5',
438),
439array(
440  'name' => 'loc_end_register',
441  'type' => 'trigger_action',
442  'vars' => array(),
443  'files' => array('register.php'),
444  'infos' => 'New in 2.5',
445),
446array(
447  'name' => 'loc_end_search',
448  'type' => 'trigger_action',
449  'vars' => array(),
450  'files' => array('search.php'),
451  'infos' => 'New in 2.5',
452),
453array(
454  'name' => 'loc_end_tags',
455  'type' => 'trigger_action',
456  'vars' => array(),
457  'files' => array('tags.php'),
458  'infos' => 'New in 2.5',
459),
460array(
461  'name' => 'loc_end_comments',
462  'type' => 'trigger_action',
463  'vars' => array(),
464  'files' => array('comments.php'),
465  'infos' => 'New in 2.5',
466),
467array(
468  'name' => 'loc_end_identification',
469  'type' => 'trigger_action',
470  'vars' => array(),
471  'files' => array('identification.php'),
472  'infos' => 'New in 2.5',
473),
474array(
475  'name' => 'loc_end_notification',
476  'type' => 'trigger_action',
477  'vars' => array(),
478  'files' => array('notification.php'),
479  'infos' => 'New in 2.5',
480),
481array(
482  'name' => 'loc_end_admin',
483  'type' => 'trigger_action',
484  'vars' => array(),
485  'files' => array('admin.php'),
486),
487array(
488  'name' => 'loc_end_cat_list',
489  'type' => 'trigger_action',
490  'vars' => array(),
491  'files' => array('admin\cat_list.php'),
492),
493array(
494  'name' => 'loc_end_cat_modify',
495  'type' => 'trigger_action',
496  'vars' => array(),
497  'files' => array('admin\cat_modify.php'),
498),
499array(
500  'name' => 'loc_end_element_set_global',
501  'type' => 'trigger_action',
502  'vars' => array(),
503  'files' => array('admin\batch_manager_global.php'),
504),
505array(
506  'name' => 'loc_end_element_set_unit',
507  'type' => 'trigger_action',
508  'vars' => array(),
509  'files' => array('admin\batch_manager_unit.php'),
510),
511array(
512  'name' => 'loc_end_index',
513  'type' => 'trigger_action',
514  'vars' => array(),
515  'files' => array('index.php'),
516),
517array(
518  'name' => 'loc_end_index_category_thumbnails',
519  'type' => 'trigger_event',
520  'vars' => array('array', 'tpl_thumbnails_var', 'array', 'categories'),
521  'files' => array('include\category_cats.inc.php'),
522),
523array(
524  'name' => 'loc_end_index_thumbnails',
525  'type' => 'trigger_event',
526  'vars' => array('array', 'tpl_thumbnails_var', 'array', 'pictures'),
527  'files' => array('include\category_default.inc.php'),
528),
529array(
530  'name' => 'loc_end_page_header',
531  'type' => 'trigger_action',
532  'vars' => array(),
533  'files' => array('include\page_header.php'),
534),
535array(
536  'name' => 'loc_end_page_tail',
537  'type' => 'trigger_action',
538  'vars' => array(),
539  'files' => array('include\page_tail.php'),
540),
541array(
542  'name' => 'loc_end_picture',
543  'type' => 'trigger_action',
544  'vars' => array(),
545  'files' => array('picture.php'),
546),
547array(
548  'name' => 'loc_end_profile',
549  'type' => 'trigger_action',
550  'vars' => array(),
551  'files' => array('profile.php'),
552),
553array(
554  'name' => 'loc_end_section_init',
555  'type' => 'trigger_action',
556  'vars' => array(),
557  'files' => array('include\section_init.inc.php'),
558  'infos' => 'this action is called after section initilization, $page variable is fully defined',
559),
560array(
561  'name' => 'loc_visible_user_list',
562  'type' => 'trigger_event',
563  'vars' => array('array', 'visible_user_list'),
564  'files' => array('admin\user_list.php'),
565),
566array(
567  'name' => 'login_failure',
568  'type' => 'trigger_action',
569  'vars' => array('string', 'username'),
570  'files' => array('include\functions_user.inc.php (try_log_user)'),
571),
572array(
573  'name' => 'login_success',
574  'type' => 'trigger_action',
575  'vars' => array('string', 'username'),
576  'files' => array('include\functions_user.inc.php (auto_login, try_log_user)'),
577),
578array(
579  'name' => 'mail_group_assign_vars',
580  'type' => 'trigger_event',
581  'vars' => array('array', 'assign_vars'),
582  'files' => array('include\functions_mail.inc.php (pwg_mail_group)'),
583),
584array(
585  'name' => 'nbm_event_handler_added',
586  'type' => 'trigger_action',
587  'vars' => array(),
588  'files' => array('admin\notification_by_mail.php'),
589),
590array(
591  'name' => 'nbm_render_global_customize_mail_content',
592  'type' => 'trigger_event',
593  'vars' => array('string', 'customize_mail_content'),
594  'files' => array('admin\notification_by_mail.php (do_action_send_mail_notification)'),
595),
596array(
597  'name' => 'nbm_render_user_customize_mail_content',
598  'type' => 'trigger_event',
599  'vars' => array('string', 'customize_mail_content', 'string', 'nbm_user'),
600  'files' => array('admin\notification_by_mail.php (do_action_send_mail_notification)'),
601),
602array(
603  'name' => 'perform_batch_manager_prefilters',
604  'type' => 'trigger_event',
605  'vars' => array('array', 'filter_sets', 'string', 'session_prefilter'),
606  'files' => array('admin\batch_manager.php'),
607),
608array(
609  'name' => 'picture_pictures_data',
610  'type' => 'trigger_event',
611  'vars' => array('array', 'picture'),
612  'files' => array('picture.php'),
613),
614array(
615  'name' => 'plugins_loaded',
616  'type' => 'trigger_action',
617  'vars' => array(),
618  'files' => array('include\functions_plugins.inc.php (load_plugins)'),
619),
620array(
621  'name' => 'pwg_log_allowed',
622  'type' => 'trigger_event',
623  'vars' => array('bool', 'do_log', 'int', 'image_id', 'string', 'image_type'),
624  'files' => array('include\functions.inc.php (pwg_log)'),
625),
626array(
627  'name' => 'register_user',
628  'type' => 'trigger_action',
629  'vars' => array('array', 'user'),
630  'files' => array('include\functions_user.inc.php (register_user)'),
631),
632array(
633  'name' => 'register_user_check',
634  'type' => 'trigger_event',
635  'vars' => array('array', 'errors', 'array', 'user'),
636  'files' => array('include\functions_user.inc.php (register_user)'),
637),
638array(
639  'name' => 'render_category_description',
640  'type' => 'trigger_event',
641  'vars' => array('string', 'category_description', 'string', 'action'),
642  'files' => array('include\category_cats.inc.php', 'include\section_init.inc.php', 'include\ws_functions.inc.php (ws_categories_getList, ws_categories_getAdminList)'),
643),
644array(
645  'name' => 'render_category_literal_description',
646  'type' => 'trigger_event',
647  'vars' => array('string', 'category_description'),
648  'files' => array('include\category_cats.inc.php'),
649),
650array(
651  'name' => 'render_category_name',
652  'type' => 'trigger_event',
653  'vars' => array('string', 'category_name', 'string', 'location'),
654  'files' => array('admin\cat_list.php', 'include\ws_functions.inc.php (ws_categories_getList, ws_categories_getAdminList, ws_categories_move)'),
655),
656array(
657  'name' => 'render_comment_author',
658  'type' => 'trigger_event',
659  'vars' => array('string', 'comment_author'),
660  'files' => array('admin\comments.php', 'comments.php', 'include\picture_comment.inc.php'),
661),
662array(
663  'name' => 'render_comment_content',
664  'type' => 'trigger_event',
665  'vars' => array('string', 'comment_content'),
666  'files' => array('admin\comments.php', 'comments.php', 'include\picture_comment.inc.php'),
667),
668array(
669  'name' => 'render_element_content',
670  'type' => 'trigger_event',
671  'vars' => array('string', 'content', 'array', 'current_picture'),
672  'files' => array('picture.php'),
673),
674array(
675  'name' => 'render_element_name',
676  'type' => 'trigger_event',
677  'vars' => array('string', 'element_name'),
678  'files' => array('include\functions_html.inc.php (render_element_name)'),
679),
680array(
681  'name' => 'render_element_description',
682  'type' => 'trigger_event',
683  'vars' => array('string', 'element_secription'),
684  'files' => array('picture.php'),
685),
686array(
687  'name' => 'render_lost_password_mail_content',
688  'type' => 'trigger_event',
689  'vars' => array('string', 'message'),
690  'files' => array('password.php (process_password_request)'),
691),
692array(
693  'name' => 'render_page_banner',
694  'type' => 'trigger_event',
695  'vars' => array('string', 'gallery_title'),
696  'files' => array('include\page_header.php'),
697),
698array(
699  'name' => 'render_tag_name',
700  'type' => 'trigger_event',
701  'vars' => array('string', 'tag_name'),
702  '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'),
703),
704array(
705  'name' => 'render_tag_url',
706  'type' => 'trigger_event',
707  'vars' => array('string', 'tag_name'),
708  'files' => array('include\functions.php (tag_id_from_tag_name, create_tag)', 'admin\tags.php'),
709),
710array(
711  'name' => 'save_profile_from_post',
712  'type' => 'trigger_action',
713  'vars' => array('int', 'user_id'),
714  'files' => array('profile.php (save_profile_from_post)'),
715),
716array(
717  'name' => 'send_mail',
718  'type' => 'trigger_event',
719  'vars' => array('bool', 'result', 'string', 'mail_to', 'string', 'mail_subject', 'string', 'mail_content', 'array', 'mail_headers'),
720  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
721),
722array(
723  'name' => 'send_mail_content',
724  'type' => 'trigger_event',
725  'vars' => array('string', 'content'),
726  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
727),
728array(
729  'name' => 'send_mail_headers',
730  'type' => 'trigger_event',
731  'vars' => array('array', 'headers'),
732  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
733),
734array(
735  'name' => 'send_mail_subject',
736  'type' => 'trigger_event',
737  'vars' => array('string', 'cvt_subject'),
738  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
739),
740array(
741  'name' => 'send_mail_to',
742  'type' => 'trigger_event',
743  'vars' => array('string', 'to'),
744  'files' => array('include\functions_mail.inc.php (pwg_mail)'),
745),
746array(
747  'name' => 'sendResponse',
748  'type' => 'trigger_action',
749  'vars' => array('string', 'encodedResponse'),
750  'files' => array('include\ws_core.inc.php (PwgServer::sendResponse)'),
751),
752array(
753  'name' => 'set_status_header',
754  'type' => 'trigger_action',
755  'vars' => array('int', 'code', 'string', 'text'),
756  'files' => array('include\functions_html.inc.php (set_status_header)'),
757),
758array(
759  'name' => 'tabsheet_before_select',
760  'type' => 'trigger_event',
761  'vars' => array('array', 'sheets', 'string', 'tabsheet_id'),
762  'files' => array('include\tabsheet.class.php (tabsheet::select)'),
763  'infos' => 'New in 2.4, use this trigger to add tabs to a tabsheets',
764),
765array(
766  'name' => 'trigger',
767  'type' => 'trigger_action',
768  'vars' => array('array', null),
769  'files' => array('include\functions_plugins.inc.php (trigger_event, trigger_action)'),
770),
771array(
772  'name' => 'user_comment_check',
773  'type' => 'trigger_event',
774  'vars' => array('string', 'comment_action', 'array', 'comm'),
775  'files' => array('include\functions_comment.inc.php (insert_user_comment, update_user_comment)'),
776  'infos' => 'use this trigger to add conditions on comment validation',
777),
778array(
779  'name' => 'user_comment_deletion',
780  'type' => 'trigger_action',
781  'vars' => array('mixed', 'comment_id'),
782  'files' => array('include\functions_comment.inc.php (delete_user_comment)'),
783  'infos' => '$comment_id is and int or an array of int',
784),
785array(
786  'name' => 'user_comment_insertion',
787  'type' => 'trigger_action',
788  'vars' => array('array', 'comm'),
789  'files' => array('include\picture_comment.inc.php'),
790),
791array(
792  'name' => 'user_comment_validation',
793  'type' => 'trigger_action',
794  'vars' => array('mixed', 'comment_id'),
795  'files' => array('include\functions_comment.inc.php (validate_user_comment)'),
796  'infos' => '$comment_id is and int or an array of int',
797),
798array(
799  'name' => 'user_init',
800  'type' => 'trigger_action',
801  'vars' => array('array', 'user'),
802  'files' => array('include\user.inc.php'),
803),
804array(
805  'name' => 'ws_add_methods',
806  'type' => 'trigger_action',
807  'vars' => array('object', 'this'),
808  'files' => array('include\ws_core.inc.php (PwgServer::run)'),
809),
810array(
811  'name' => 'ws_invoke_allowed',
812  'type' => 'trigger_event',
813  'vars' => array('bool', null, 'string', 'methodName', 'array', 'params'),
814  'files' => array('include\ws_core.inc.php (PwgServer::invoke)'),
815),
816);
817?>
818<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
819   "http://www.w3.org/TR/html4/strict.dtd">
820<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
821<head>
822  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
823  <title>Piwigo Core Triggers</title>
824 
825  <link type="text/css" rel="stylesheet" media="screen" href="tablesorter/jquery.tablesorter.css">
826  <script type="text/javascript" src="../themes/default/js/jquery.min.js"></script>
827  <script type="text/javascript" src="tablesorter/jquery.tablesorter.min.js"></script>
828
829 
830  <script type="text/javascript">
831  $(document).ready(function() {
832        $('#triggers').tablesorter({
833          sortList: [[0,0]]
834        });
835  }); 
836  </script>
837</head>
838
839<body style="font-family:arial;">
840<h2>Piwigo Core Triggers</h2>
841
842<a href="http://piwigo.org/doc/doku.php?id=dev:plugins">For more infos about triggers</a>
843
844<table id="triggers" class="tablesorter">
845<thead> 
846<tr>
847  <th>Name</th>
848  <th>Type</th>
849  <th>Vars</th>
850  <th>Usage in the core <span style="font-weight:normal !important;">file (<i>function</i>)</span></th>
851  <th>Commentary</th>
852</tr>
853</thead>
854<tbody>
855
856<?php 
857  foreach ($core as $trigger)
858  {
859    echo '
860  <tr>
861    <td>'.$trigger['name'].'</td>
862    <td>'.$trigger['type'].'</td>
863    <td>';
864    for ($i=0; $i<count($trigger['vars']); $i+=2)
865    {
866      if ($i>0) echo ', ';
867      echo $trigger['vars'][$i].' '.(!empty($trigger['vars'][$i+1])?'<i>$'.$trigger['vars'][$i+1].'</i>':null);
868    }
869    echo '
870    </td>
871    <td>';
872    $f=1;
873    foreach ($trigger['files'] as $file)
874    {
875      if (!$f) echo '<br>'; $f=0;
876      echo preg_replace('#\((.+)\)#', '(<i>$1</i>)', $file);
877    }
878    echo '
879    </td>
880    <td>'.@$trigger['infos'].'</td>
881  </tr>';
882  }
883?>
884
885</tbody>
886</table>
887
888</body>
889</html>
Note: See TracBrowser for help on using the repository browser.