Stepping through app, controller ?

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
anhhi
Registered User
Posts: 5
Joined: Wed Jul 10, 2013 2:46 pm

Stepping through app, controller ?

Post by anhhi » Thu Apr 10, 2014 2:50 pm

Hello everyone. I'm trying to get a better understanding of the new phpbb app version (3.1b2). My end goal is to be able to get my own portal controller to launch, possibly without much modifications of code. I'm stepping through the application, starting with app.php(line 29). I've been at it many times but still haven't found the controller that says "use index.php." I'm used to seeing Symfony's ACTIONcontroller; where controllers were in the "Controller" folder which then points to a view. I'm trying to build an web app(test) on top of phpbb 3.1x, the framework is a bit tougher than before with current prod version. Any insight would be helpful.

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: Stepping through app, controller ?

Post by keith10456 » Thu Apr 10, 2014 10:20 pm

@ anhhi - I can't help you with your inquiry but you sparked my interest with your project. I too would like an app built "on" phpBB 3.1. I can't code but once you get going, if you need a tester I'll be happy to assist ;-)

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Stepping through app, controller ?

Post by EXreaction » Thu Apr 10, 2014 10:50 pm

I'm not sure if how to do this is described in documentation, but there are a few examples you can use.

From the board rules extension that's being worked on now:
You need to add the route to the routing config file in your ext:
https://github.com/phpbb-extensions/boa ... outing.yml
You need to add the service for the controller file (from _controller: phpbb.boardrules.controller:.. in routing):
https://github.com/phpbb-extensions/boa ... es.yml#L25
Then create the controller class with the function to be called when the route is matched (from _controller: ...:display in routing) :
https://github.com/phpbb-extensions/boa ... roller.php

anhhi
Registered User
Posts: 5
Joined: Wed Jul 10, 2013 2:46 pm

Re: Stepping through app, controller ?

Post by anhhi » Fri Apr 11, 2014 3:59 pm

Thank you EXreaction! This definitely helps. I'll be busy reading through all the codes and documentations.

Post Reply