Hello. Well done for getting the Hook system up and ready in working order! As someone who wants to splice applications together, having a hook system makes things so much easier. Bravo!
I was wondering if there were more hooks than the 4 documented. It would be really great if there was a really long list of hooks like with MediaWiki's Hook System:
http://www.mediawiki.org/wiki/Manual:Ho ... able_hooks
Anyway, good work!
Welcome to (long awaited) Hook System!
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
-
- Registered User
- Posts: 2
- Joined: Thu May 15, 2008 5:11 pm
- Contact:
- Prince of area51
- Registered User
- Posts: 133
- Joined: Mon Jun 27, 2005 8:46 pm
- Location: Manchester, UK
- Contact:
Re: Welcome to (long awaited) Hook System!
At the moment there are only four. I believe I read somewhere phpBB 3.2.x will have full working events system (I hope events = hooks).
- Prince of area51
- Registered User
- Posts: 133
- Joined: Mon Jun 27, 2005 8:46 pm
- Location: Manchester, UK
- Contact:
Re: Welcome to (long awaited) Hook System!
Yepnaderman wrote:No, events are not hooks.
/me never come and post on area51 when i'm sick and on drugs
-
- Registered User
- Posts: 2
- Joined: Thu May 15, 2008 5:11 pm
- Contact:
Re: Welcome to (long awaited) Hook System!
You see, I need new hooks for my project ( http://consensuswiki.org ). Do you think it will be acceptable to add new hooks (the ones I will need) into the phpBB core code and commit the changes into the repository? It will be a permanent addition.
Of course, I'll document it and everything.
Of course, I'll document it and everything.
Re: Welcome to (long awaited) Hook System!
If it aren't many and if you can give a good reason why adding them is beneficial in general and not just for you we might think about it.
Re: Welcome to (long awaited) Hook System!
Hi
So, now I would like to use the hook system. Unfortunately I don't get how to do that. I have no clue where to start, reading the docs/hook_system.html doesnt help me getting further. My problem is to understand where I do include what.
Lets say I have my board in <docroot>/phpbb/index.php and another application in <docroot>/mysite/index.php
For instance, if I want on that <docroot>/mysite/index.php a userlogin field, what uses phpbb for registering the users, what does my index.php have to include so that it will use phpbb's userauth via phpbb_user_session_handler();?
Another thing I want to solve is having my mysite's menu on the phpbb page always. There the $template->display hook gets my attention. Now where (which .php file actually) do I implement my function what puts the mysite's menu into the phpbb template?
*confused*
Rhodes
So, now I would like to use the hook system. Unfortunately I don't get how to do that. I have no clue where to start, reading the docs/hook_system.html doesnt help me getting further. My problem is to understand where I do include what.
Lets say I have my board in <docroot>/phpbb/index.php and another application in <docroot>/mysite/index.php
For instance, if I want on that <docroot>/mysite/index.php a userlogin field, what uses phpbb for registering the users, what does my index.php have to include so that it will use phpbb's userauth via phpbb_user_session_handler();?
Another thing I want to solve is having my mysite's menu on the phpbb page always. There the $template->display hook gets my attention. Now where (which .php file actually) do I implement my function what puts the mysite's menu into the phpbb template?
*confused*
Rhodes
Re: Welcome to (long awaited) Hook System!
Do not confuse the hooks system with the authentication plugins - which are able to be used to "just" forward logins.
Re: Welcome to (long awaited) Hook System!
A very simple example of embedding would be:
With this code from your site you embed phpBBs index page.
Code: Select all
define('PHPBB_ROOT_PATH', '../phpbb/');
define('PHPBB_DB_NEW_LINK' , true);
define('PHPBB_ADMIN_PATH' , PHPBB_ROOT_PATH.'adm/');
define('PHPBB_EMBEDDED' , true);
include(PHPBB_ROOT_PATH . 'index.php');
Re: Welcome to (long awaited) Hook System!
Thanks so far I will experiment with that.