Welcome to (long awaited) Hook System!

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.
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.
TommyKaneko
Registered User
Posts: 2
Joined: Thu May 15, 2008 5:11 pm
Contact:

Re: Welcome to (long awaited) Hook System!

Post by TommyKaneko » Thu May 15, 2008 5:16 pm

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!

User avatar
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!

Post by Prince of area51 » Thu May 15, 2008 7:11 pm

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).

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: Welcome to (long awaited) Hook System!

Post by naderman » Fri May 16, 2008 9:20 am

No, events are not hooks.

User avatar
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!

Post by Prince of area51 » Fri May 16, 2008 10:27 am

naderman wrote:No, events are not hooks.
Yep :lol:

/me never come and post on area51 when i'm sick and on drugs :oops:

TommyKaneko
Registered User
Posts: 2
Joined: Thu May 15, 2008 5:11 pm
Contact:

Re: Welcome to (long awaited) Hook System!

Post by TommyKaneko » Fri May 30, 2008 1:18 pm

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.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: Welcome to (long awaited) Hook System!

Post by naderman » Sat May 31, 2008 6:24 pm

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.

Rhodes
Registered User
Posts: 5
Joined: Fri Jul 04, 2008 10:03 am

Re: Welcome to (long awaited) Hook System!

Post by Rhodes » Fri Jul 04, 2008 10:14 am

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

User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: Welcome to (long awaited) Hook System!

Post by Acyd Burn » Fri Jul 04, 2008 10:32 am

Do not confuse the hooks system with the authentication plugins - which are able to be used to "just" forward logins.

Image

User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: Welcome to (long awaited) Hook System!

Post by Acyd Burn » Fri Jul 04, 2008 10:37 am

A very simple example of embedding would be:

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');
With this code from your site you embed phpBBs index page.

Image

Rhodes
Registered User
Posts: 5
Joined: Fri Jul 04, 2008 10:03 am

Re: Welcome to (long awaited) Hook System!

Post by Rhodes » Fri Jul 04, 2008 11:03 am

Thanks so far I will experiment with that.

Post Reply