Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/events #1

Merged

Conversation

erikfrerejean
Copy link

Add ledges that allow listeners to override the phpBB page_header and page_footer functions.

Add a ledge that will allow listeners to override the build in
`page_header` function.
http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=42741&p=237037

PHPBB3-9550
@@ -4826,7 +4836,17 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
function page_footer($run_cron = true)
{
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
global $request;
global $request, $phpbb_dispatcher;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the phpbb_dispatcher global should be on a new line.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? Okay ;)

michaelcullum added a commit that referenced this pull request Apr 2, 2012
@michaelcullum michaelcullum merged commit a13a7df into michaelcullum:feature/events Apr 2, 2012
Add a ledge that will allow listeners to override the build in
`page_footer` function.
http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=42741&p=237037

PHPBB3-9550
@igorw
Copy link

igorw commented Apr 2, 2012

If many listeners try to override, they will all be called.

@erikfrerejean
Copy link
Author

Well that is the case with every listener. I'm not sure I'm seeing your point.

@igorw
Copy link

igorw commented Apr 2, 2012

The point is: you might not want multiple listeners to be called in this case.

@michaelcullum
Copy link
Owner

hm... How can we deal with that issue though? As this is needed for STK.

@igorw
Copy link

igorw commented Apr 2, 2012

Extending phpbb_event_data to add some kind of stop_propagation() method (or similar) would be one approach.

@erikfrerejean
Copy link
Author

@igorw a yes. However I'm not sure whether this will pose a real problem I think that these events will only be used in very specific cases where one is designing a larger system around the phpBB core.
Such a method however is probably a nice-to-have, and certainly is a "prettier" solution.

michaelcullum pushed a commit that referenced this pull request Aug 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants