mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 11:19:55 +03:00
feature 2747: Add triggers on all main pages
git-svn-id: http://piwigo.org/svn/trunk@18063 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
5c70d3b971
commit
cbb971db3f
8 changed files with 119 additions and 0 deletions
|
@ -64,6 +64,8 @@ $since_options = array(
|
|||
4 => array('label' => l10n('the beginning'),
|
||||
'clause' => '1=1') // stupid but generic
|
||||
);
|
||||
|
||||
trigger_action('loc_begin_comments');
|
||||
|
||||
if (!empty($_GET['since']) && is_numeric($_GET['since']))
|
||||
{
|
||||
|
@ -556,6 +558,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theCommentsPage', $themecon
|
|||
// | html code display |
|
||||
// +-----------------------------------------------------------------------+
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_comments');
|
||||
include(PHPWG_ROOT_PATH.'include/page_messages.php');
|
||||
$template->pparse('comments');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -30,6 +30,8 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_FREE);
|
||||
|
||||
trigger_action('loc_begin_identification');
|
||||
|
||||
//-------------------------------------------------------------- identification
|
||||
$redirect_to = '';
|
||||
if ( !empty($_GET['redirect']) )
|
||||
|
@ -107,6 +109,7 @@ if (!$conf['gallery_locked'] && (!isset($themeconf['hide_menu_on']) OR !in_array
|
|||
|
||||
//----------------------------------------------------------- html code display
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_identification');
|
||||
include(PHPWG_ROOT_PATH.'include/page_messages.php');
|
||||
$template->pparse('identification');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -56,6 +56,8 @@ SELECT COUNT(*)
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_GUEST);
|
||||
|
||||
trigger_action('loc_begin_notification');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | new feed creation |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
@ -112,6 +114,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theNotificationPage', $them
|
|||
// | html code display |
|
||||
// +-----------------------------------------------------------------------+
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_notification');
|
||||
include(PHPWG_ROOT_PATH.'include/page_messages.php');
|
||||
$template->pparse('notification');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -35,6 +35,8 @@ include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
|
|||
|
||||
check_status(ACCESS_FREE);
|
||||
|
||||
trigger_action('loc_begin_password');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Functions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
@ -354,6 +356,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('thePasswordPage', $themecon
|
|||
// +-----------------------------------------------------------------------+
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_password');
|
||||
include(PHPWG_ROOT_PATH.'include/page_messages.php');
|
||||
$template->pparse('password');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -37,6 +37,8 @@ if (!$conf['allow_user_registration'])
|
|||
page_forbidden('User registration closed');
|
||||
}
|
||||
|
||||
trigger_action('loc_begin_register');
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
if (!verify_ephemeral_key(@$_POST['key']))
|
||||
|
@ -128,6 +130,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theRegisterPage', $themecon
|
|||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_register');
|
||||
include(PHPWG_ROOT_PATH.'include/page_messages.php');
|
||||
$template->parse('register');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -30,6 +30,8 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_GUEST);
|
||||
|
||||
triggr_action('loc_begin_search');
|
||||
|
||||
//------------------------------------------------------------------ form check
|
||||
$search = array();
|
||||
if (isset($_POST['submit']))
|
||||
|
@ -231,6 +233,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theSearchPage', $themeconf[
|
|||
|
||||
//------------------------------------------------------------ html code display
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_search');
|
||||
include(PHPWG_ROOT_PATH.'include/page_messages.php');
|
||||
$template->pparse('search');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
3
tags.php
3
tags.php
|
@ -49,6 +49,8 @@ include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
|
|||
|
||||
check_status(ACCESS_GUEST);
|
||||
|
||||
trigger_action('loc_begin_tags');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | page header and options |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
@ -202,6 +204,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theTagsPage', $themeconf['h
|
|||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_tags');
|
||||
include(PHPWG_ROOT_PATH.'include/page_messages.php');
|
||||
$template->pparse('tags');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -380,6 +380,104 @@ array(
|
|||
'vars' => array(),
|
||||
'files' => array('profile.php'),
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_begin_password',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('password.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_begin_register',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('register.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_begin_search',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('search.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_begin_tags',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('tags.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_begin_comments',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('comments.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_begin_identification',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('identification.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_begin_notification',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('notification.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_end_password',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('password.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_end_register',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('register.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_end_search',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('search.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_end_tags',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('tags.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_end_comments',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('comments.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_end_identification',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('identification.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_end_notification',
|
||||
'type' => 'trigger_action',
|
||||
'vars' => array(),
|
||||
'files' => array('notification.php'),
|
||||
'infos' => 'New in 2.5',
|
||||
),
|
||||
array(
|
||||
'name' => 'loc_end_admin',
|
||||
'type' => 'trigger_action',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue