forum integration
forum integration
i know this has been discussed before here, but i got lost between all the posts... so here are my questions:
- has anybody ever (successfully) tried to integrate a forum or message board into our favorite cms?
- is anybody currently working on this mission and how are you getting along?
i started working on this problem with "my little forum", which i find nice and clean and small - but you have to make serious changes in the phpwcms engine to get it to work...
peace,
valjah
- has anybody ever (successfully) tried to integrate a forum or message board into our favorite cms?
- is anybody currently working on this mission and how are you getting along?
i started working on this problem with "my little forum", which i find nice and clean and small - but you have to make serious changes in the phpwcms engine to get it to work...
peace,
valjah
hello
at the moment!
create an forum layout! where you have no right table.
create an forum template! place in the main block an iframe.
create an sitstructure an choose the forum template.
and also you can look to olivers thread
http://www.phpwcms.de/forum/viewtopic.php?t=1019
at the moment!
create an forum layout! where you have no right table.
create an forum template! place in the main block an iframe.
create an sitstructure an choose the forum template.
and also you can look to olivers thread
http://www.phpwcms.de/forum/viewtopic.php?t=1019
hmm I think you're coding a forum that is database driven and you could just make a php-script that returns an iframe depending on how big the forum is...your just have to find the right rule so that the iframe never gets to small but that shouldn't be a problem! include this with the {PHP:} tag and you've got this ugly scrollbar in the middle of the design gone
iframe resize
i found a solution using javascript. i know it's not the purest html but i tested it on IE6 and mozilla 1.6 and it works just fine! it's just a few lines of javascript and it's resizing the iframe every time i click a link in the forum (iframe). perfect!
the javascript looks like this (in the header):
the iframe in the main block looks like this:
this is where i found the code: http://guymal.com/mycode/iframe_size.shtml
have fun, valjah
the javascript looks like this (in the header):
Code: Select all
<script language="JavaScript">
<!--
function calcHeight()
{
var the_height=document.getElementById('the_iframe').contentWindow.document.body.scrollHeight; //find the height of the internal page
document.getElementById('the_iframe').style.height=the_height; //change the height of the iframe
}
//-->
</script>
the iframe in the main block looks like this:
Code: Select all
<iframe src="forum/forum.php" id="the_iframe" onLoad="calcHeight();" width="100%" height="1" name="the_iframe" scrolling="no" frameborder="0">if you see this text your browser doesn't support iframes...</iframe>
have fun, valjah
well, you should be able to control the forum so it doesn't display more than a certain number of lines, but i haven't figured that out yet. i'm just starting with phpwcms and now i have to get into the code of the forum, too...
sorry, at the moment i don't have an example of this online because i'm still constructing the site on my local computer (apache/win32) and i'm reluctant to open my firewall for outside access...
i will let you know when my site is up and running on an external server.
only this much: i think the iframe solution looks very good (but that's of course highly subjective, as probably everything concerning design).
peace, valjah
sorry, at the moment i don't have an example of this online because i'm still constructing the site on my local computer (apache/win32) and i'm reluctant to open my firewall for outside access...
i will let you know when my site is up and running on an external server.
only this much: i think the iframe solution looks very good (but that's of course highly subjective, as probably everything concerning design).
peace, valjah
Hi Valjah,
I think your solution to this problem looks great! But when I put it in a template and try it I'll get a javascript errror and I will only see a 1 pixel height iframe..
I have put this in the header:
Thanks,
Martin
I think your solution to this problem looks great! But when I put it in a template and try it I'll get a javascript errror and I will only see a 1 pixel height iframe..
I have put this in the header:
And this in the main:<script language="JavaScript">
<!--
function calcHeight()
{
var the_height=document.getElementById('the_iframe').contentWindow.document.body.scrollHeight; //find the height of the internal page
document.getElementById('the_iframe').style.height=the_height; //change the height of the iframe
}
//-->
</script>
Really strange because when I put the iframe on with out the javascript it works great..<iframe src="http://www.phpwcms.de/forum/" id="the_iframe" onLoad="calcHeight();" width="100%" height="1" name="the_iframe" scrolling="no" frameborder="0">if you see this text your browser doesn't support iframes...</iframe>
Thanks,
Martin
Noop
Thanks Dexxus, but it still won't work for me. Do I have to have something in the js onload do you think? Or is there something with the frontend.js? Here is what I get in my head(source code)..
I'll send you the Swedish translation when I can get things to work..
Thanks - Martin
Code: Select all
<head>
<title>phpwcms :: web based content management system</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function calcHeight()
{
var the_height=document.getElementById('the_iframe').contentWindow.document.body.scrollHeight; //find the height of the internal page
document.getElementById('the_iframe').style.height=the_height; //change the height of the iframe
}
//-->
</script>
<meta name="description" content="dfa">
<script src="./phpwcms_template/inc_js/frontend.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="./phpwcms_template/inc_css/frontend.css">
</head>
Thanks - Martin
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact: