Welcome Guest, Not a member yet? Register   Sign In
DESIGN Integrating phpbb 3.0 with codeigniter
#1

[eluser]TerabyteUK[/eluser]
Hi,

I have a phpbb 3.0 forum. located at .com/support I have my views and controllers etc located in the views or controllers folder, I have some fancy feature which allows me to use /this/sortof/stuff to avoid specifying parameters.

Now I want to integrate my phpbb forum so it has the same template as shown in the view. I'm having trouble doing this since phpbb has no notion of controller. So I tried stuffing code from my view into the 'template' system of phpbb which worked, until i realised that my controller from the page i took this code from passed a model into the view via the constructor. Now I really have no idea how to get that code into phpbb.

Basically the view reference $data['siteInfo'] which isn't available to phpbb at the moment since i've just got the view directly inserted into the template and there is no controller to inject this value in from the model.

Code:
<?
class Support extends Controller {

    function Support()
    {
        parent::Controller();
        $this->load->model('news_model');
        $this->load->model('site_model');
        $this->load->helper('url');
        /*$this->gameID = $this->game_model->getGameID();*/
    }
    
    
    function index()
    {
        $data['content'] = $this->news_model->getContent();
        $data['siteInfo'] = $this->site_model->getSiteInfo();
        $data['top10software'] = $this->site_model->getSoftware();
        $data['top10games'] = $this->site_model->getGames();
        $data['class'] = 'news';
        $data['classdisplay'] = 'News';
        $data['function'] = '';
        $data['product'] = '';
        $this->load->view('news',$data);

    }

}
?>

Is the code for the controller. Can I just paste this into the phpbb template file? if so how do i handle the model loading? In general how do I go about this. I suppose it's double pronged, I need to integrate my site, and i need to integrate it with code ignitor (since my site is a code ignitor site with constructors doing fancy things as you see above).

Usually when I do something, I have a vague idea of how to get there and always what I want, in this particular case I have absolutely no idea where to start, and I don't even know if I want I want is what I should want (best practice etc...) or even do-able.

Thanks for any help.
#2

[eluser]danmontgomery[/eluser]
If you have no idea where to start, google is generally a good place.

http://codeigniter.com/wiki/phpBB3_library/
http://ellislab.com/forums/viewthread/125350/
#3

[eluser]TerabyteUK[/eluser]
[quote author="noctrum" date="1279222377"]If you have no idea where to start, google is generally a good place.

http://codeigniter.com/wiki/phpBB3_library/
http://ellislab.com/forums/viewthread/125350/[/quote]

Well google throws up a lot of results on phpbb2.0, though if i knew there was a phpbb3.0 library i would have probably queried google for something else...

Also from what I see that's integrating in the sense of 'login' and stuff. I'm talking about design integration.




Theme © iAndrew 2016 - Forum software by © MyBB