# Embedding a forum inside a rails app

**URL:** <https://www.ruby-forum.com/t/embedding-a-forum-inside-a-rails-app/76286>\
**Category:** Rails\
**Created:** [March 3, 2006, 5:37pm UTC](https://www.ruby-forum.com/t/embedding-a-forum-inside-a-rails-app/76286 "2006-03-03T17:37:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamdorsey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed8c4c/32.png) [@adamdorsey](https://www.ruby-forum.com/u/adamdorsey)\
**Post date:** [March 3, 2006, 5:37pm UTC](https://www.ruby-forum.com/t/embedding-a-forum-inside-a-rails-app/76286/1 "2006-03-03T17:37:21Z")

</div>

what is the best way to embed a forum (phpbb is currently installed  
under  
/public/forums/) inside my layout ? I dont want the foum to be its own  
page  
i would like it to appear inside the main part of the page with  
navigation  
and border in tact. is this possible with the current way it is  
installed ?

thanks  
adam

---

<div class="post-metadata">

**Author:** ![adamdorsey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed8c4c/32.png) [@adamdorsey](https://www.ruby-forum.com/u/adamdorsey)\
**Post date:** [March 4, 2006, 10:53am UTC](https://www.ruby-forum.com/t/embedding-a-forum-inside-a-rails-app/76286/2 "2006-03-04T10:53:40Z")

</div>

Am Freitag, den 03.03.2006, 11:35 -0500 schrieb Adam D.:

> what is the best way to embed a forum (phpbb is currently installed  
> under /public/forums/) inside my layout ? I dont want the foum to be  
> its own page i would like it to appear inside the main part of the  
> page with navigation and border in tact. is this possible with the  
> current way it is installed ?

Why don’t you use a iframe?

–  
Norman T.

[http://blog.inlet-media.de](http://blog.inlet-media.de)

---

<div class="post-metadata">

**Author:** ![adamdorsey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed8c4c/32.png) [@adamdorsey](https://www.ruby-forum.com/u/adamdorsey)\
**Post date:** [March 4, 2006, 1:31pm UTC](https://www.ruby-forum.com/t/embedding-a-forum-inside-a-rails-app/76286/3 "2006-03-04T13:31:10Z")

</div>

You aren’t really going to have much luck integrating a PHP app into a  
Rails app, short of using an iframe as suggested above.

I’m currently working on a Rails website which uses a punbb forum and  
the simplest way of doing it was to create a punbb skin that wraps the  
forum in the sites layout/navigation and then run the forum off of a  
subdomain ([forum.foo.com](http://forum.foo.com)) next to the main site ([www.foo.com](http://www.foo.com)). The  
only downside is the punbb forum is duplicating your rails layout so  
it means two things to maintain and the navigation on the forum skin  
is also hardcoded to point at [www.foo.com/somelink](http://www.foo.com/somelink) which is also more  
maintenance. Its not a huge site though so not much of an issue.

In fact, we ARE integrating the two in some ways, because part of the  
Rails app needs people to log in to access it and the client has  
requested they can use the same credentials for both the forum and  
this part of the Rails app. We have accomplished this by creating a  
new database connection in database.yml for the punbb database,  
creating a new class that extends ActiveRecord::Base called Punbb  
which is set to use the punbb database, then extending the Punbb class  
to create models for the tables in the Punbb database that we need to  
use, in this case just the user table. Now we can authenticate against  
Punbb’s user table easily.

On 3/4/06, Norman T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Norman T.
> 
> [http://blog.inlet-media.de](http://blog.inlet-media.de)
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Cheers,  
Luke R.

> **[Luke Redpath - Freelance Ruby, Rails and iOS app developer / London / Essex / UK](https://lukeredpath.co.uk/)**
>
> Experienced freelance and contract developer offering Ruby, Rails and iOS app development services for iPhone, iPad and other iOS platforms. Based in Colchester, Essex, London and remote.

---

<div class="post-metadata">

**Author:** ![adamdorsey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed8c4c/32.png) [@adamdorsey](https://www.ruby-forum.com/u/adamdorsey)\
**Post date:** [March 4, 2006, 3:34pm UTC](https://www.ruby-forum.com/t/embedding-a-forum-inside-a-rails-app/76286/4 "2006-03-04T15:34:55Z")

</div>

thanks i put the forum at [forum.domain.com](http://forum.domain.com) and then just used an iframe  
as  
suggested above. I manipulated the CSS of phpbb to match my layout  
colors  
and now things look fine (enough).

Thanks for the suggestions.

adam
