miniBB ®®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Specific miniBB Community Forum / Specific /

How to integrate the forum on a webpage?

 
Eph
Forums Member
#1 | Posted: 19 Nov 2008 12:11
Reply 
It is possible to integrate the forum within a given table on a existing web page?

What I'd like to do is have a menuitem on my existing website and when you click on it the forum will show in the main area of that web page instead of a whole new page with another layout.

Possible?
Guest
#2 | Posted: 19 Nov 2008 12:19
Reply 
rtfm
Eph
Forums Member
#3 | Posted: 19 Nov 2008 12:32
Reply 
Thanks for the pointer - eeh
Eph
Forums Member
#4 | Posted: 19 Nov 2008 13:05
Reply 
My site is at:

http://www.domain.com/site

I put the forum in:

http://www.domain.com/site/forum

In the site directory I got my own index.php which normally php-includes my subpages.

I've changed $indexphp in site_options.php to:

$indexphp='http://www.domain.com/site/index.php?page=forum&';

In my own index.php, if page is set to forum I do the following instead of my normal include("$page.php");

At the top:

if ($page == "forum")
{
ob_start();

include ('./forum/index.php');

$flushed=ob_get_contents();

ob_end_clean();
}

At the position in the index.php file where I want the forum to appear:

if ($page == "forum")
{
echo $flushed;
}
else
include($page);

I've must have done something wrong because the page is empty.

I tried making a test.php and place in the forum folder which does the same but only changes $indexphp to "./test.php?" and that works fine.

What am I doing wrong? Should be possible to include the forum from a page which isn't inside the forum folder?
Eph
Forums Member
#5 | Posted: 19 Nov 2008 13:39
Reply 
I've tried inserting a dummy line in the index.php of the forum and can see it on screen but nothing more.

I tried running the test.php from the forum folder and check that the URLs look OK, which they do, they link down to my http://www.domain.com/site/index.php?page=forum& and it appends the sub pages of the forum correctly.

It seem that the forum doesn't like to be included from a script that isn't running inside the forum root folder.
Eph
Forums Member
#6 | Posted: 19 Nov 2008 13:48
Reply 
I'm on the right track here..

I found that the forum index.php uses the $clonePath variable which is used to locate the setup_options.php file and $clonePath is defaulting to "./" which is incorrect if the forum is included from another page.

Simply switched to "./forum" and it works.
Eph
Forums Member
#7 | Posted: 19 Nov 2008 14:10
Reply 
Funny though how most links seem to work but not all.

"Forum" link in the menu and the "logout" link does not seem to use $indexphp and results in an URL that looks like:

http://www.domain.com/site/forum/index.php

While the other links do it correctly with:

http://www.domain.com/site/index.php?page=forum&*whatever addition*
smithsan
Forums Member
#8 | Posted: 20 Nov 2008 04:46
Reply 
The settings for your database connection must be checked and do not indicate what database method is used. When we start a large report often the viewer will stop after 3 minutes and report No data available.
------------
smithsan
http://www.drivenwide.com
Eph
Forums Member
#9 | Posted: 20 Nov 2008 04:57
Reply 
Also, the admin panel link looks OK but it doesn\t work. Seems that it doesn\t take in consideration the parent folder which is ..
Eph
Forums Member
#10 | Posted: 20 Nov 2008 04:58
Reply 
smithsan:
The settings for your database connection must be checked and do not indicate what database method is used. When we start a large report often the viewer will stop after 3 minutes and report No data available.

Post in wrong thread?

Database connection of course fine here.
Paul
CEO
#11 | Posted: 21 Nov 2008 04:01 | Edited by: Paul
Reply 
Eph:
What I'd like to do is have a menuitem on my existing website and when you click on it the forum will show in the main area of that web page instead of a whole new page with another layout.

Possible?

It's all possible. Check our Gallery section of examples showing embedded miniBB, as well as search our forums before duplicating your questions please. It's all explained many times already.

MiniBB authors do not provide free advices or recommendations on such custom tasks like yours. It very depends to your own site, files, design etc. and there is no common solution; but YES, it's all possible.
 
Your Reply
Bold Style  Italic Style  Image Link  URL Link 


» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 43
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®