• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Custom page with HTML frames

masterchief

Well-known member
#1
I am attempting to create custom page with frames, allowing me to utilize external source html. Please advise. peace.

Code:
<div class="baseHtml messageText">

<frameset cols="800,250">
    <frame src="left" />
    <frame src="main" />
</frameset>

</div>
 

Kane Hart

Active member
#2
I am attempting to create custom page with frames, allowing me to utilize external source html. Please advise. peace.

Code:
<div class="baseHtml messageText">

<frameset cols="800,250">
    <frame src="left" />
    <frame src="main" />
</frameset>

</div>
Going to bump this as I'm also in need of this now and you never got an answer.
 

Brogan

XenForo moderator
Staff member
#4
I've moved your thread from the development forum as this only seems to be related to HTML code in a Page node template.

Can you link to an example of what it is you're trying to do?
 

masterchief

Well-known member
#5
This is some sample code that I am playing around with locally on my desktop. Basically, I want to be able to edit frame source HTML outside of XenForo.

I realize that the DOCTYPE, HTML and HEAD tags are not required for XenForo. Is any of this possible with XenForo?

~peace

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>A simple frameset document</TITLE>
</HEAD>
<FRAMESET cols="20%, 80%">
  <FRAMESET rows="100, 200">
      <FRAME src="frame1.html">
      <FRAME src="frame2.gif">
  </FRAMESET>
  <FRAME src="frame3.html">
  <NOFRAMES>
      <P>This frameset document contains:
      <UL>
         <LI><A href="frame1.html">Some neat contents</A>
         <LI><IMG src="frame2.gif" alt="A neat image">
         <LI><A href="frame3.html">Some other neat contents</A>
      </UL>
  </NOFRAMES>
</FRAMESET>
</HTML>
 

EQnoble

Well-known member
#6
You should go about that a different way in my opinion.
http://www.w3schools.com/html/html_frames.asp said:
With frames, several Web pages can be displayed in the same browser window.
ATTENTION. Do not expect frames to be supported in future versions of HTML.
 

EQnoble

Well-known member
#7
I tried to replicate what I think you were looking for using iframes, divs and some styling
HTML:
<style type="text/css">
div.chiefwrapLeft20 {float:left; margin-left:0; width:20%;}
div.chiefwrapRight80 {float:right; width:80%;}
</style>

<div class=chiefwrapLeft20>
  <iframe src="http://masterchief.com/your.html" frameborder="0" width="100%" height="100" scrolling="no" >
    <p>Your browser does not support iframes.</p>
  </iframe>

  <iframe src="http://xenxero.com/splashy4.png" frameborder="0" width="100%" height="200" scrolling="no" >
    <p>Your browser does not support iframes.</p>
  </iframe>
</div>

<div class=chiefwrapRight80>
<iframe src="http://masterchief.com/maybeA.htm" frameborder="0" width="100%" height="300" scrolling="no" >
  <p>Your browser does not support iframes.</p>
</iframe>
</div>
 

masterchief

Well-known member
#8
We are now getting somewhere ... thanx. I am using following code in page node. The html files contain one line text declaring frame number, i.e. frame1.html contains 'This is frame number one' ... etc.

Code:
<style type="text/css">
div.chiefwrapLeft20 {float:left; margin-left:0; width:20%;}
div.chiefwrapRight80 {float:right; width:80%;}
</style>

<div class=chiefwrapLeft20>
  <iframe src="frame1.html" frameborder="0" width="100%" height="100" scrolling="no" >
    <p>Your browser does not support iframes.</p>
  </iframe>

  <iframe src="frame2.html" frameborder="0" width="100%" height="200" scrolling="no" >
    <p>Your browser does not support iframes.</p>
  </iframe>
</div>

<div class=chiefwrapRight80>
<iframe src="frame3.html" frameborder="0" width="100%" height="300" scrolling="no" >
  <p>Your browser does not support iframes.</p>
</iframe>
</div>
This is the result, with this code you can now edit multiple frames on a page node outside of the ACP. ~peace
 

Attachments

masterchief

Well-known member
#9
This HTML section for my custom page node. USes PHP in iFrame

Code:
<style type="text/css">
div.chiefwrapLeft20 {float:left; margin-left:0; width:20%;}
div.chiefwrapRight80 {float:right; width:80%;}
</style>

<div class=chiefwrapLeft20>
  <iframe src="frame1.html" frameborder="0" width="100%" height="100" scrolling="no" >
    <p>Your browser does not support iframes.</p>
  </iframe>

  <iframe src="frame2.html" frameborder="0" width="100%" height="200" scrolling="no" >
    <p>Your browser does not support iframes.</p>
  </iframe>
</div>

<div class=chiefwrapRight80>
<iframe src="navigation.php" frameborder="0" width="100%" height="300" scrolling="no" >
  <p>Your browser does not support iframes.</p>
</iframe>
</div>
navigation.php

Code:
<a href=./navigation.php?P=home>Home</a>
<a href=./navigation.php?P=example>Example</a>
<a href=./navigation.php?P=news>News</a>

<?php
$default = "home.php";
$allowed = array (
    'example',
    'news',
);
if( isset( $_POST["P"] ) || isset( $_GET["P"] ))
    {
    $page = isset($_GET["P"]) ? $_GET["P"] : $_POST["P"];

    if( in_array( trim ( $page ), $allowed ))
        {
        $file = $page . ".php";
        if( (file_exists( $file )))
            {
            include( $file );
            }
        else
            {
            include( $default );
            }
        }
    else
        {
        include( $default );
        }
    }
else
    {
    include( $default );
    }
?>
Example: http://www.masterchief.com/pages/frameset