PDA

View Full Version : How to integrate the forums into a site?



veritas
Mon 9th Apr '01, 2:33am
I curious as to how you can modify the templates so that you can stick the forums within the already existing site template (like msxbox.com does with their forum). I would like to do this with my site, but not quite sure where to start.

Darin
Sat 14th Apr '01, 5:05pm
I'm pretty sure this can be done using SSI (Server Side Includes). Try including the following code in the page where you want your forums to appear:

<!--#include virtual="forums/index.php" -->

Replace the red part with the URL to your forums. Hope this helps :)

Dark_Wizard
Sat 14th Apr '01, 7:40pm
hmmm...I would add them to your header and footer...this way it follows the forum, showthread...etc... If you need a hand give me a shout...

veritas
Wed 18th Apr '01, 12:53am
I'm converting my site to PHP (.php extensions), so I don't think the SSI will work. Is their an easier way to include the forum? Thanks big time for your help!

Darin
Wed 18th Apr '01, 1:17am
I'm not sure if you can inlcude the forums now that you are convering to .php extensions for your whole site. I've never tried this, but have seen it around, so try adding the following code:

<!--#include php="forums/index.php" -->

Like I said not very sure, but I have a friend who is a php expert, so I'll ask him about it.

veritas
Wed 18th Apr '01, 1:22am
I'll give it a try. I'm going to invest in a good PHP book (PHP 4 Bible or PHP Essentials) so I can get to understanding this all completely. Does anyone know if the book titles I mentioned are as good as they seem? Have they helped you out? Are they worth the money?

Darin
Wed 18th Apr '01, 1:26am
I don't know if this will help you get started, but there is an excellent online manual on PHP at the official site. You can find the English version of it right here:http://www.php.net/manual/en/. May not be much, but it sure is something to help you understand PHP.

veritas
Wed 18th Apr '01, 10:25pm
I tried using <!--#include php="/forums/index.php" --> inside to include the forums on a non-vB page. It doesn't work, all I get is a blank spot.

Darin
Thu 19th Apr '01, 1:46am
Hmm...okay. Well this guy I know who is a PHP expert hasn't been on ICQ for a while. As soon as he goes on I'll ask him.

JamesUS
Thu 19th Apr '01, 6:49am
Try using:


require("/forums/index.php");

veritas
Thu 19th Apr '01, 4:23pm
Nope it didn't work. You can see the error message by visiting http://www.iongames.org/html/template.php

Darin
Thu 19th Apr '01, 7:41pm
Try including the full path to your forums. Not just "forums/index.php". So something like this:

require ("http://www.yoursite.com/forums/index.php");

veritas
Thu 19th Apr '01, 7:59pm
It works. The only problems now are that:

1) all the images are broken
2) all the forum's links are broken

It keeps trying to access forum .php pages from the /html directory. Of course, vB is not installed under this dir, but under /forums.

Darin
Thu 19th Apr '01, 8:01pm
Great, the way to fix all the images is to edit your options in vB through the Control Panel and do the same thing. Put the full path to all of your images, instead of just "forums/images/blah-blah.gif".