phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

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.

Re: Welcome to (long awaited) Hook System!

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

Re: Welcome to (long awaited) Hook System!

Postby 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
Prince of area51
Registered User
 
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK

Re: Welcome to (long awaited) Hook System!

Postby naderman » Fri May 16, 2008 9:20 am

No, events are not hooks.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: Welcome to (long awaited) Hook System!

Postby 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:
User avatar
Prince of area51
Registered User
 
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK

Re: Welcome to (long awaited) Hook System!

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

Re: Welcome to (long awaited) Hook System!

Postby 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.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: Welcome to (long awaited) Hook System!

Postby 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
Rhodes
Registered User
 
Posts: 5
Joined: Fri Jul 04, 2008 10:03 am

Re: Welcome to (long awaited) Hook System!

Postby 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
Server Manager
 
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You

Re: Welcome to (long awaited) Hook System!

Postby 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
User avatar
Acyd Burn
Server Manager
 
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You

Re: Welcome to (long awaited) Hook System!

Postby Rhodes » Fri Jul 04, 2008 11:03 am

Thanks so far I will experiment with that.
Rhodes
Registered User
 
Posts: 5
Joined: Fri Jul 04, 2008 10:03 am

Previous Next

Return to [3.0/Olympus] New features discussion

Who is online

Users browsing this forum: No registered users and 9 guests