Forum integration using the {embed} tag

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
gyszilagyi
Forum Members
Forum Members
Posts: 12
Joined: Thu Mar 23, 2006 11:12 am

Forum integration using the {embed} tag

Post by gyszilagyi »

I needed a forum to at least look integrated into my CMSMS site. I'm not a technical wizzard so it took me some time to do it, but eventually I found all the necessary information here in the forum. I thought I'd summarise it in one post - maybe others will find it useful...

1. Notes

This method integrates a forum (any forum) into CMSMS only as far as looks are concerned. The forum will be displayed within CMSMS (in the content area of a page) but otherwise it will remain completely separate. Users will be required to register and login separately, for instance (even though they might already be logged in to CMSMS if your site is using the Frontend Users module).

2. Prerequisites

- Your CMSMS site and the forum engine need to be in the same domain (e.g. www.mydomain.com for the site itself and www.yourdomain.com/forum for the forum).
- Visitors of your site should have javascript enabled in their browser.

These prerequisites are due to the {embed} tag that I used for integrating the forum into CMSMS. This tag uses inline frames (hence the 1st prerequisite) and javascript. The {embed} tag is included in CMSMS by default, you don't need to install it separately.

3. Edit the template

Choose or create a CMSMS template you'll be using for your forum (Layout/Templates within the CMSMS Admin Panel). Open it and insert the following line anywhere between the HEAD tags:

{content block='headertags' wysiwyg='false'}

This will turn the FCKeditor (the word-processor like text editor) off  for the pages that use this template.

4. Edit the Page you'll use for displaying the forum

Your forum is going to be displayed within one of the Pages of your site. Create this Page (the type of the page should be "content") and make sure it will use the template you created or modified in step 3.

Insert the following line into the "content" box:

{embed url=http://www.domain.org}

Of course you should replace www.domain.org with the URL of your forum (remember that the forum should be in the same domain as your site).

Now you should see another box below the content box called "Headertags" (if you don't see it, re-open the Page). Note that the "Headertags" box will not be displayed unless the Page you are editing uses the template created or modified in step 3. Insert the following line into this box:

{embed header=true}

5. You are done!

The page you have just created should display the forum within CMSMS. The height of the forum shoud be adjusted automatically and you should not see any scrollbars. If your are using IE, that is... If you are using Firefox, chances are that you'll see a vertical scrollbar, which shouldn't really be there. To get rid of the scrollbar, you'll need to edit the "function.embed.php" file, which is located in the "Plugins" folder of your CMSMS installation. Go to line 111, look for the "style=" variable, and set it to "hidden". Once you've made this small change, your forum should be displayed perfectly (without scrollbars) in your site.

Hope this helps  ;)
katon

Re: Forum integration using the {embed} tag

Post by katon »

This rases the question: what level of integration do you need?  Or rather what do you mean by forum integration?  There are three basic options:
A) Visual integration: forum inserted into the web page content with the default web site header, footer, etc.
B) Authentication integration: logged-in front end users are automatically logged in into the forum.
C) Authentication AND visual integration.

Your suggestion addresses only visual integration.  It's a simple solution, and can work for many people. However, this solution uses iframes, which adds scrolling inside the page.  I would hate to see that on my website.  I'm also sure that, as a result, your page looks pretty cluttered.

If you can find some more time, you can customize the forum so it looks nicely integrated in the web site design.

To me, it's more important to have functional integration with automatic user login.  There have been posts here on how to integrate phpBB, and I'm going to publish a tag that does the auto-registration and autologin job for phpBB2.
gyszilagyi
Forum Members
Forum Members
Posts: 12
Joined: Thu Mar 23, 2006 11:12 am

Re: Forum integration using the {embed} tag

Post by gyszilagyi »

katon wrote: Your suggestion addresses only visual integration.  It's a simple solution, and can work for many people. However, this solution uses iframes, which adds scrolling inside the page.  I would hate to see that on my website.  I'm also sure that, as a result, your page looks pretty cluttered.
You are right, this is only visual integration. However, there should be NO SCROLLBARS - this is exactly why I'm using the {embed} tag instead of {pi_iframe}. Embed uses javascript to resize the iframe so that the page you are embedding fits inside the CMSMS page without scrollbars. This will of course work only if javascript is enabled in the browser and the forum (or whatever it is that you are embedding) and CMSMS are in the same domain.

I used this method to integrate PunBB - it looks OK. If phpBB also looks nice inside CMSMS using this solution, one would only have to use your autoregistration and autologin tag for perfect integration. The downsides are javascript (which could be turned off for security reasons in some browsers) and maybe iframses in older browsers.
Last edited by gyszilagyi on Thu Mar 30, 2006 5:30 pm, edited 1 time in total.
katon

Re: Forum integration using the {embed} tag

Post by katon »

Yeah, these two things together offer complete phpBB integration :-)
bunni

Re: Forum integration using the {embed} tag

Post by bunni »

I can't thank you enough for this tutorial.  It's the solution I needed for my site. 
trailer

Re: Forum integration using the {embed} tag

Post by trailer »

gyszilagyi wrote: If phpBB also looks nice inside CMSMS using this solution, one would only have to use your autoregistration and autologin tag for perfect integration.
I do not understand how I would do that.

How can I combine the functional intergration of phpbbx (which uses this tag, but redirects to the forum instead of embedding it: {phpbbx tablepref="phpbb_" dir="forum"}) with visual integration via {embed}?
katon

Re: Forum integration using the {embed} tag

Post by katon »

I have never tried both things in one site.  Actually, I would recommend customizing the look of the forum to match the site rather than integrate the forum into a page. A page with the embedded forum gets overloaded for the user.  I came to this conclusion a while before I wrote phpBBx.
trailer

Re: Forum integration using the {embed} tag

Post by trailer »

Would like to do that anyhow, because a forum without any link (visual as well as technical; i.e., no possibility to switch back) is worse in my eyes. Do you have an idea how it could work?
katon

Re: Forum integration using the {embed} tag

Post by katon »

If you need integration with FrontEnd users, use phpBBx.  If not, just create a menu item of URL link type that will point to your forum location.
trailer

Re: Forum integration using the {embed} tag

Post by trailer »

Mh... that isn't what I'm looking for... I want a fully integrated forum (visual and FrontEndUsers-like), no CMS seems to have that :(
3dc

Re: Forum integration using the {embed} tag

Post by 3dc »

Postnuke can do this, with pnphpbb2, it's just a modified phpbb, installed as a module.
All navigation-links and so on from the "cms" postnuke stay intact, as it should be. But i cant recommend it because of the low activity on developing at this module and some other issues.
Also cmsms is much more comfortable, easier to use and to style than pn.

But such a thing is really needed for cmsms - not -sorry- just a "login" or a javascript/iframe-solution.
A full bridge(?) to phpbb, where all things are working on ONE page and one layout, that is needed.

One table for the users in cmsms and phpbb together is not needed IMHO.
I think the most people who use cmsms are running a forum where the userbase isnt involved in creating pages. Such users can be added by an admin manually.

my opinion :)
Greetz - ~3DC~
katon

Re: Forum integration using the {embed} tag

Post by katon »

3dc wrote: A full bridge(?) to phpbb, where all things are working on ONE page and one layout, that is needed.
You can't do this without major modifications of the forum.  The effort is not worth the result, because eventually you get to understand that an integrated forum is not the most comfortable environment to work with.  Plus you need to support this forum modification aftertwards - consider subsequent ports of security updates and other new releases.  We've had a similar problem with a multiilngual branch of cmsms - if you don't support it, it becomes dead.
--Six--

Re: Forum integration using the {embed} tag

Post by --Six-- »

Hi guys, I implemented my phpBB forum just the way it was told in this tutorial.
I made a page with the following code:

Code: Select all

{embed url=http://www.arrestatieteam.nl/forum}
However the forum does not show up in my CMS site, I however have the feeling it is loaded by Firefox nonetheless cause I see some familiar URLs fly by in the statusbar. Could you guys see how I should fix this?

The page with the code showed above is the following:

http://www.arrestatieteam.nl/12345/forum/

Thanks in advance!
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Forum integration using the {embed} tag

Post by RonnyK »

--Six--,

I don't know if you fixed your issue with {embed} already, but you have to set:

Code: Select all

{embed header=true}
as well in the meta-data for the content-page in the options-tab.

Ronny
Post Reply

Return to “Modules/Add-Ons”