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 »

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 »

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: Berlin, Germany
Contact:

Re: Welcome to (long awaited) Hook System!

Post by naderman »

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 »

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 »

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: Berlin, Germany
Contact:

Re: Welcome to (long awaited) Hook System!

Post by naderman »

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 »

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 »

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 »

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 »

Thanks so far I will experiment with that.

Post Reply