Welcome Guest, Not a member yet? Register   Sign In
Integrating 3rd Party Softare - Like Forums
#1

[eluser]TriCityGuy[/eluser]
I'm a little puzzled on the best way to accomplish this.

Lets say I have a forum that's installed to webroot/forum.

CI is going to be looking for a "forum" controller, not necessarily the directory of the software.

I can work it so that it doesn't, however then I'm outside of the MVC and don't have access to CI functionality within that application.

Whats the best way to include not only forums, but 3rd party "apps" so they can be used. I understand there's going to be some tweaking and modding. (issues with sessions, ect) What directories should I be installing these 3rd party apps into and how should I be "including" them into CI.
#2

[eluser]CroNiX[/eluser]
If you are using an htaccess rule to remove index.php like most people, and the rule looks something like:
Code:
# Rewrites for CodeIgniter
# Handle the index.php file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
...then if you have /forums it won't be process by CI because forums will be a real directory on the server. The above rewrite rules say "if the request is not a file, and it is not a directory, then process it through index.php", which is CI.

I have vBulletin and WordPress totally integrated into CI sites, and use their auth systems and other things from their APIs. You basically include what you need (the bootstrap) for your 3rd party in your ci index.php file. If you do not need the functionality in every CI controller, you can also limit it here by only including it for certain urls.

For instance, in my WordPress case, I only include WP on the home page of the CI site to pull in recent blog posts using WP's API.

Search the forums, there are examples, and be prepared for lots of headaches because you will run into cases, like with wordpress, where CI's base_url() will be overridden by WordPresses base_url() function and your url's will come out prefixed with your WordPress directory.

The site structure is like:
-/webroot
--/application (CI)
--/forum (vbulletin)
--.htaccess (CI rules)
--index.php (CI's bootstrapper, with vbulletin bootstrapper included)
#3

[eluser]TriCityGuy[/eluser]
Thank you!

It gave me a better understanding of the way that the .htaccess is directing traffic and makes perfect sense when you put it that way.

Well great. Sounds like I need to just dig through some API's then.

Did you template VBulletin to mirror your CI template? Is it done dynamically?
#4

[eluser]CroNiX[/eluser]
Yes, I created a header and footer template in vb, which includes the header and footer view from CI so its seamless and only have 1 header/footer to modify. Just google how to include external code into a header template for vb and the rest is cake, er um, CI Smile




Theme © iAndrew 2016 - Forum software by © MyBB