1. 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

Discussion in 'XenForo Questions and Support' started by masterchief, Jun 3, 2011.

  1. masterchief

    masterchief Well-Known Member

    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>
    
    
     
  2. Kane Hart

    Kane Hart Active Member

    Going to bump this as I'm also in need of this now and you never got an answer.
     
  3. masterchief

    masterchief Well-Known Member

    I would like to use frameset in creation of page node. please advise. ~peace
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    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?
     
  5. masterchief

    masterchief Well-Known Member

    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>
    
    
     
  6. EQnoble

    EQnoble Well-Known Member

    You should go about that a different way in my opinion.
     
  7. EQnoble

    EQnoble Well-Known Member

    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>
    
     
  8. masterchief

    masterchief Well-Known Member

    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
     

    Attached Files:

  9. masterchief

    masterchief Well-Known Member

    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
     

Share This Page