From ddcd1890065258ca5a5d443b8790a9d2287891ad Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 16 Mar 2012 11:03:03 +0100 Subject: [feature/events] Adding ledge generate_smilies_footer Used by phpBB Gallery PHPBB3-9550 --- phpBB/includes/functions_posting.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 6c21b0f412..d3550aafba 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -20,7 +20,7 @@ if (!defined('IN_PHPBB')) */ function generate_smilies($mode, $forum_id) { - global $db, $user, $config, $template; + global $db, $user, $config, $template, $phpbb_dispatcher; global $phpEx, $phpbb_root_path; $start = request_var('start', 0); @@ -131,6 +131,11 @@ function generate_smilies($mode, $forum_id) ); } + $vars = array('mode', 'forum_id', 'display_link'); + $event = new phpbb_event_data(compact($vars)); + $phpbb_dispatcher->dispatch('core.generate_smilies_footer', $event); + extract($event->get_data_filtered($vars)); + if ($mode == 'window') { page_footer(); -- cgit v1.2.1 From 8af7d225ef481cd26e6fd7862847183d25727117 Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Tue, 20 Mar 2012 11:23:03 +0000 Subject: [feature/events] Change to use the new method of adding events PHPBB3-9550 --- phpBB/includes/functions_posting.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index d3550aafba..6c7cb3f0b2 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -132,9 +132,7 @@ function generate_smilies($mode, $forum_id) } $vars = array('mode', 'forum_id', 'display_link'); - $event = new phpbb_event_data(compact($vars)); - $phpbb_dispatcher->dispatch('core.generate_smilies_footer', $event); - extract($event->get_data_filtered($vars)); + extract($phpbb_dispatcher->trigger_event('core.generate_smilies_footer', compact($vars), $vars)); if ($mode == 'window') { -- cgit v1.2.1 From 3f1b4e83aef7f7344cd551463b59de71bb4bd6fe Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Sat, 31 Mar 2012 13:39:41 +0100 Subject: [feature/events] Removing the third trigger_event parameter PHPBB3-9550 --- phpBB/includes/functions_posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 6c7cb3f0b2..0476c9b5d5 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -132,7 +132,7 @@ function generate_smilies($mode, $forum_id) } $vars = array('mode', 'forum_id', 'display_link'); - extract($phpbb_dispatcher->trigger_event('core.generate_smilies_footer', compact($vars), $vars)); + extract($phpbb_dispatcher->trigger_event('core.generate_smilies_footer', compact($vars))); if ($mode == 'window') { -- cgit v1.2.1 From 0d182d9e9376a56b314b072c9d4395c18b900478 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 4 Aug 2012 17:07:35 +0200 Subject: [feature/php-events] Fix naming and doc of core.generate_smilies_after PHPBB3-9550 --- phpBB/includes/functions_posting.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 0476c9b5d5..7ac56588af 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -123,6 +123,18 @@ function generate_smilies($mode, $forum_id) } } + /** + * This event is called when the smilies got populated + * + * @event core.generate_smilies_after + * @var string mode Mode of the smilies: window|inline + * @var int forum_id The forum ID we are currently in + * @var bool display_link Shall we display the "more smilies" link? + * @since 3.1-A1 + */ + $vars = array('mode', 'forum_id', 'display_link'); + extract($phpbb_dispatcher->trigger_event('core.generate_smilies_after', compact($vars))); + if ($mode == 'inline' && $display_link) { $template->assign_vars(array( @@ -131,9 +143,6 @@ function generate_smilies($mode, $forum_id) ); } - $vars = array('mode', 'forum_id', 'display_link'); - extract($phpbb_dispatcher->trigger_event('core.generate_smilies_footer', compact($vars))); - if ($mode == 'window') { page_footer(); -- cgit v1.2.1 From 938805106c75499eb953d1a22a1ce772c21252de Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 15 Aug 2012 21:09:42 +0530 Subject: [ticket/11052] pass parametes to search construct while posting Proper parameters are passed in search backend constructor in functions_posting.php PHPBB3-11052 --- phpBB/includes/functions_posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 6c21b0f412..4d09367934 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2370,7 +2370,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } $error = false; - $search = new $search_type($error); + $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user); if ($error) { -- cgit v1.2.1 From 01db8144d49e263a1cb36621090b54854b0f8bff Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 20 Aug 2012 10:10:52 +0200 Subject: [feature/php-events] Fix doc of core.generate_smilies_after PHPBB3-9550 --- phpBB/includes/functions_posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 7ac56588af..1161dd8462 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -124,7 +124,7 @@ function generate_smilies($mode, $forum_id) } /** - * This event is called when the smilies got populated + * This event is called after the smilies are populated * * @event core.generate_smilies_after * @var string mode Mode of the smilies: window|inline -- cgit v1.2.1