PDA

View Full Version : Web Design - How to do framesets?


Red Dragon
12th November 2008, 11:38 PM
I integrated a CMS script with phpbb3 and cannot seem to get the forum page to load correctly inside of the CMS.

Currently I am using an Iframe and can get the page to display within the CMS, but the problem is it has a 2nd set of scroll bars and I cannot get the height to adjust dynamically to the content. The width is ok with 100% but height=100% obviously doesn't work with iframes. So I tried to use javascript to determine the contents height on a given page, then load the iframe to adjust to the pages content.

Instead of using an iframe I have been told I would be better off with a frameset, and using sessions or cookies, but know nothing about this.

This is my code that I am currently using for page forum.php ...

<?

require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );


// --------------- page variables and login

$_page['name_index'] = forum;
$_page['css_name'] = 'privacy.css';


if ( !( $logged['admin'] = member_auth( 1, false ) ) )
if ( !( $logged['member'] = member_auth( 0, true ) ) )
if ( !( $logged['aff'] = member_auth( 2, false )) )
$logged['moderator'] = member_auth( 3, false );


$_page['header'] = _t( "Forum" );
$_page['header_text'] = _t( "Forum" );

// --------------- page components

$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompMainCode($after);

// --------------- [END] page components

PageCode();

// --------------- page components functions

function PageCompMainCode($after)

{
global $BXTemplConfig;

$ret = "<iframe src ='/forum/' onload='scrollTotop()' scrolling='no' width='100%' height='1550' class='autoHeight' frameborder='0'></iframe>";

return DesignBoxContent( _t( "_PRIVACY_H1" ), $ret, $oTemplConfig -> PageCompThird_db_num);
}

?>

Dymond
13th November 2008, 08:14 PM
Do you have someplace I can see the example of this?

Diogee
13th November 2008, 08:18 PM
HTML FRAMESET TAG (http://www.w3schools.com/tags/tag_frameset.asp)

that might help for framesets but without actually looking at what you are trying to do :S

Red Dragon
13th November 2008, 08:20 PM
www.connectionsquare.net <-my site (http://www.connectionsquare.net)
www.connectionsquare.net/forum <-my forum (http://www.connectionsquare.net/forum)
www.connectionsquare.net/forum.php <-the page to integrate the forums to the CMS (http://www.connectionsquare.net/forum.php)

Red Dragon
13th November 2008, 10:17 PM
The thing of it is, I want to keep the top navigation, and I want the forum to load within the site

Red Dragon
14th November 2008, 12:45 PM
When I replace the iframe code
$ret = "<iframe src ='/forum/' onload='scrollTotop()' scrolling='no' width='100%' height='1550' class='autoHeight' frameborder='0'></iframe>";

With the frameset code:
?><FRAMESET rows="100%">
<FRAME src="/forum//">
<FRAMESET cols="100%">
<FRAME src="/forum/">
</FRAMESET>;
<?php


Then the forum loads, I have the correct syntax finally, but then the main sites content is not loaded as the wrapper or container.

I am still really new to web design so if anybody can shed light on what I am doing wrong I appreciate it and enjoy learning

Infidel
14th November 2008, 12:53 PM
RD, i'm not sure this is the place you should be going for web design help. i think we have a handful of computer savy people and you're one of them lol

Red Dragon
14th November 2008, 01:03 PM
I know lol, I spend most my time here helping, but occasionally I need help too.

There are a lot of really great minds around here, plus I don't look an idiot on the really techie boards that I normally post at.

Anyways... whoever decides to help me this is the complete code for the integrated page so far. It will now try to load up the forums but not show the whole page


<?
require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );


// --------------- page variables and login

$_page['name_index'] = forum;
$_page['css_name'] = 'privacy.css';


if ( !( $logged['admin'] = member_auth( 1, false ) ) )
if ( !( $logged['member'] = member_auth( 0, true ) ) )
if ( !( $logged['aff'] = member_auth( 2, false )) )
$logged['moderator'] = member_auth( 3, false );


$_page['header'] = _t( "Forum" );
$_page['header_text'] = _t( "Forum" );

// --------------- page components

$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompMainCode($after);

// --------------- [END] page components

PageCode();

// --------------- page components functions

function PageCompMainCode($after)

{
global $BXTemplConfig;

return ?><html>
<FRAMESET rows="100%">
<FRAME src='http://www.connectionsquare.net/forum/"$after"'>
<FRAMESET cols="100%">
<FRAME src='http://www.connectionsquare.net/forum/"$after"'>
</FRAMESET>;
</html>
<?php

return DesignBoxContent( _t( "_PRIVACY_H1" ), $ret, $oTemplConfig -> PageCompThird_db_num);
}

?>

Red Dragon
14th November 2008, 03:51 PM
Just wanted to thank you all for your help LOL or at least thinking of maybe helping. I got it all fixed up with a little javascript and an iframe. Basically any iframe that I use now will be dynamically adjusted height wise, thanks to the java script determining the contents height and adjusting the iframe.

I used this script if anybody is curious
Dynamic Drive- Iframe SSI script II (http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm)

Then my iframe looked like this
$ret = "<iframe src='/forum/".$after."' id='myframe' scrolling='no' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' style='overflow:visible' width='100%' display='none'></iframe>";


If I ever add anymore iframe content anywhere then just modify the javascript with myframe2, and assign id='myframe2' to the iframe

Dymond
14th November 2008, 08:18 PM
Nice.. I actually didn't have a clue either LOL I just use tables and includes for what I do..

Smash Bros
15th November 2008, 08:00 AM
sorry i havent been on otherwise i would of tried to help.

i can see with the code below you have a few things in there that you dont need.

mind you this is just in html and i know nothing about php.

this is your code:
$ret = "<iframe src='/forum/".$after."' id='myframe' scrolling='no' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' style='overflow:visible' width='100%' display='none'></iframe>";

from what i can see you dont need to have vpsace of hspace included. and you can change margin height/width to margin=0 OR use style="margin: 0 0 0 0;"

just a way to shorten some of the code that it reads.

hope it helps.

Red Dragon
17th November 2008, 04:19 PM
Thanks man, I didn't need most of it you are right, I just put it all in there cause I had tried so many different things

Infidel
17th November 2008, 04:51 PM
RD it's my opinion that frames are a bit of the past and a typical pain in the ass to use normally. there's my 2 cents on helping you :P

Red Dragon
17th November 2008, 05:15 PM
Good point, but you try integrating phpbb3 into a CMS that doesn't already have an integration mod. Then come tell me a better option. Or better yet make a mod and sell it, somebody wanted $40 minimum to do this integration.

Infidel
17th November 2008, 05:20 PM
use asp.net 3.5

they've got some nifty stuff. lol

Smash Bros
19th November 2008, 05:55 AM
havent looked at asp actually.

although one day i shall lol.

as it is i need to site down and read over html 5.0 when i get a chance. plus im learning how to code in irc in my spare time atm

then onto js, php and mysql

Red Dragon
19th November 2008, 01:08 PM
I am looking for a script for resume generator/resume builder - where my members could fill out a forum and have it generate them a resume, which I could integrate and they could then upload to a resume section, then I can bring in some business owners to browse the resumes for candidates.

Also, I wanted to see if anybody is interested in teaming up with me on this project or any other project. I was working with Cushion but he had to go back to school and no longer has time to work on anything. I figured I would try to work with somebody from here first, as most of my friends don't do anything with computers much less web design. I have pretty much an unlimited budget and would be willing to match anybody else on start up investments to get something going if you have an idea that you want to work on.

On this project, I have already paid the start up cost, and I am pretty much just looking for help building the site, promoting the site, and administering the site. I would be willing to split any profits that come from the site as well. I would really like to find somebody such as myself that looks at this as a hobby with the potential of making a profit in the long run though we may offer everything free to start out and build a user base.

This site should be ready for launch within 3 - 4 months and the domain will propagate in about 8 months.

Let me know if anybody is interested

Infidel
19th November 2008, 02:21 PM
Damn RD, you caught my eye. if i had more time, and was more experienced, I'd probably take you up on it. for now I'll just keep to my noob status

Dymond
19th November 2008, 02:53 PM
I think you could do this Smash. It will give you some real world work experience too. My guess it you would want a form for them to fill out, either one page or in a click through questionaire. The results would then get posted into the resume. I would would put the data into a database so it could be updated.

Red Dragon
19th November 2008, 03:12 PM
That is exactly it Dy, I am thinking the same. I want a simple form, maybe some custom templates to use, then after they submit the form, it stores into the database and merges to the template they chose, then they can print the resume and they can store the resume in a section which I will make on the site, from there potential employers could browse their resume

It would have to be something that could be edited

Smash Bros
19th November 2008, 10:39 PM
dy i was thinking of that myself lol.

rd id love to help you out. i need the experience aswell.

with the form i can do that easy BUT i dont know php or mysql atm so wouldnt be able to get them to be stored in the database for you for either viewing or printing.

form should take me less then 30min to code up though with the info you want on there.

other then that there should be a way to do it already out there. you would more then likely have to pay for it though.

hit me up with a pm if you want my help mate and ill chat to you in there. or even add me on msn. not on much these days (2 sites to create with paperwork in less then 1 week) but should be on after that a fair bit lol.

Red Dragon
19th November 2008, 10:42 PM
Sounds good - no rush - I really was looking for somebody to work with on a regular basis. But if you want practice I wont turn that down, then I will even show you the Mysql/php after it is done, I wont pay for that though as I can do it myself - it just takes me longer than the pros.

you can get me at

MSN:justinlutzfl@hotmail.com
Skype: justin.z.fuller

Smash Bros
19th November 2008, 11:31 PM
Sounds good - no rush - I really was looking for somebody to work with on a regular basis. But if you want practice I wont turn that down, then I will even show you the Mysql/php after it is done, I wont pay for that though as I can do it myself - it just takes me longer than the pros.

you can get me at

MSN:justinlutzfl@hotmail.com
Skype: justin.z.fuller

im fine to work with you on a regular basis mate. that dont bother me. i am still studying (got atleast 6 months left finish in june 09) before i am done for my diploma in web design.

but as i said i am fine to work with you on a regular basis just dont get shitty with me if next year i stop helping as much for 6 months (prob not too much) that and i only know css and html atm

Red Dragon
20th November 2008, 12:16 AM
not a prob. I am still a newb at php, and just try to learn something new everyday with it.

Diogee
20th November 2008, 05:50 AM
hmmm...

looks very interesting I dont think I could do a full time.. gig right now and not sure if I am even good enough.. :S but I might be able to atleast help you with the resume.. I dont have any free time right now but maybe sometime

I try to check my PM's in here everyday so hit me up sometime :S or I will contact u when I am available

Thats of course if you would be interested :P

Red Dragon
20th November 2008, 08:20 AM
thanks, I will definitely at least need some help even if I start the code, maybe you could just help me get it fully functional. - let me know when you are available

Dymond
21st November 2008, 09:15 PM
I was gonna say if he can work up the form.. it should be pretty easy to write the script to move it into the database.

Diogee
22nd November 2008, 02:44 AM
its all easy I think.. the thing is time and knowing all the fields needed. As for the templates idea depending how you want it done it can be easy or a little tough but doable.. Time is the factor