Author |
Message |
deech
New Member


Joined: Jul 24, 2005
Posts: 12
|
Posted:
Tue Jun 27, 2006 2:44 pm |
|
How do I make a module that I could insert an HTML page into and keep all of the left-side block but have the right side blocks turned off? |
|
|
|
 |
aseitz
Regular


Joined: Mar 08, 2005
Posts: 57
Location: Portland, Oregon USA
|
Posted:
Tue Jun 27, 2006 2:52 pm |
|
I believe when creating a module, you actually need to specify code which enables the right-side blocks, which is what you don't want. So by omitting the code, you should be fine. |
|
|
|
 |
Isaiah
Hangin' Around

Joined: Nov 09, 2004
Posts: 32
|
Posted:
Fri Jun 30, 2006 1:45 am |
|
You can use iframe :
<?php
if (!stristr($_SERVER['PHP_SELF'], "modules.php")) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
$index = 1;
OpenTable();
echo"<iframe id=\"MyFrame\" name=\"MyFrame\" align=\"center\" width=\"100%\" height=\"100%\" frameborder=\"no\" scrolling=\"no\" src=\"http://www.mysite.com/mypage.html</iframe>";
CloseTable();
include("footer.php");
?>
where $index=1; means rightblocks are visible.
where $index=0; means rightblocks are not visible.
At iframe src section just change to the page you want to show to this module. |
|
|
|
 |
deech

|
Posted:
Fri Jun 30, 2006 8:09 am |
|
I must be doing something wrong as its only displaying a plain white page. I saved that code to a file named index.php and put it in the modules folder in its own subfolder and activated the module under the modules adminsistration. Is there anything I missed or was this the wrong procedure? |
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Fri Jun 30, 2006 4:07 pm |
|
do like this:
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
define('INDEX_FILE', true);
?>
html code
<?php
include("footer.php");
?>
This will allow all blocks to appear and html code to be run as html.
TEST the html code to make sure it works correctly. |
_________________ For those who stand shall NEVER fall and those who fall shall RISE once more!! |
|
 |
 |
hitwalker
Sells PC To Pay For Divorce

Joined:
Posts: 5661
|
Posted:
Fri Jun 30, 2006 7:10 pm |
|
isnt it better to include it instead of using frames..
like...
Code:
if ( !defined('MODULE_FILE') ) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
$index = 0; // do not show right blocks !...is what you want..
include("header.php");
OpenTable();
include("/path to whatever html file/");
CloseTable();
include("footer.php");
|
in this way the page will allways show normal without any weird borders,scroll,or whatever..[/code] |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed Jul 05, 2006 7:55 pm |
|
Quote: |
isnt it better to include it instead of using frames..
|
It really depends on what is needed. Isaiah doesn't specifically state that it is a complete HTML page, <html>, <head>, <body> tags and all, or if its just HTML that would normally be found within the <body> tag (i.e., can the HTML "stand" on its own?).
Personally, I despise iframes and stay away from them as much as possible. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
|