pittendrigh — 2013-12-06T14:49:18-05:00 — #1
IFRAMEs have a bad reputation. I understand the sometimes confusing search engine arguments against (search links will often point to the iframe alone, rather than to the enclosing page as a whole).
However, I run a discussion forum on my boat building website that now has 20,000 posts. It's a valuable addition to the boat building community and to my website. But I want that forum to appear as the contents of a block element <div> inside my content management system (Robopages). Stripping the <html> <head> and <body> elements from the forum's *.tpl templates won't work without major php code modifications, because the forum's links are generated the wrong way (not to work as a plugin to an enclosing system) and because of conditional header branching:
header("location: $that); .......................................this sort of thing results in chaos for an enclosing CMS
I just finished several days of work hacking a simpler open source forum so it could be used in embedded mode. But that simpler forum lacks features I want.
What ARE the arguments against simply putting my original forum inside an iframe, so it can appear as an integral part of my enclosing CMS. Even though it isn't?
If it's just the search engine argument perhaps I don't care. Why doesn't SOMEBODY make an open source forum that can indeed be embedded?
bluedreamer — 2013-12-07T14:32:06-05:00 — #2
What happens if someone links directly to a forum thread from an external site?
I'd recommend customising the forum itsself with your logo and general colours and simply link to it from your main site, and providing a link back from the forum.
jaagare — 2013-12-07T22:45:30-05:00 — #3
Which forum software are you using? sometimes it may be possible to embed the forum, but my suggestion would be to either convert your entire site + forum to some other CMS rather than using Iframe because a user wont be able to link to individual posts.
kiwiheretic — 2013-12-07T23:10:40-05:00 — #4
Depending on the forum software it can be relatively easy to a major pain. Here are some ideas each of differing merit.
Trying to reengineer a web template is awkward. Not sure what happens if you later upgrade the forum software, say, to deal with an exploit or security issue. You're in danger of losing your changes. This is quite a difficult option to get to work in practice.
I understamd Nabble is an embeddable forum. Its not really open source but a hosted solution. Its prbably the easiest option. (http://www.nabble.com)
You may be able to modify the template on the fly before it gets embedded into the iframe. This will require some link rewriting. Its effectively adding a proxy between your iframe and the forum. This is what I consider to be medium difficulty. The advantage here is that security updates dont break your modifications.
Anyway, without thinking it through too deeply those are my thoughts.
kiwiheretic — 2013-12-07T23:14:38-05:00 — #5
pittendrigh — 2013-12-08T09:42:09-05:00 — #6
Talki looks interesting. But it is Wordpress specific. Yes, re-engineering *.tpl templates is difficult (worse than coding....well it is coding) and precarious, because new software updates (as you pointed out) so often break your *.tpl modifications. I used templates when I was a java programmer. Then they make sense because you can edit templates directly from the keyboard without recompiling the enclosing Java codes.
For interpreted languages I don't really like templates. You gain a little and lose a lot. The templates are tightly coupled to calling statements hidden who knows where in the enclosing language (usually PHP). Templates are supposed to separate content from programming logic. But they don't do that. They just move the content into a mess of hard-to-deal-with IF AND OR ELSE templating logic, where simple changes are easy but complex changes are now more difficult. This is off topic I guess. But I hate templating and never use it myself. I'd rather write good code.
kiwiheretic — 2013-12-08T13:31:51-05:00 — #7
Ok, sorry, when you mentioned php on one hand and cms on the other I assumed wordpress. What you could do then is the proxy idea of using something like php and curl to fetch the iframe contents in the background and then parse the html and remove the header and rewrite the links to your preferred url namespace and then display it in the iframe. When someone clicks on a forum link you will need to either capture the request data from a custom php module or rewrite it back to how the forum software understands or .maybe use apache url rewriting if you're using apache.
Because all of this rewriting is taking place in memory and not in the template it shouldn't be particularly brittle.
pittendrigh — 2013-12-08T14:17:08-05:00 — #8
curl......didn't think of that for some reason.
I'll give it a try. Thank you.