Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
deech
New Member
New Member



Joined: Jul 24, 2005
Posts: 12

PostPosted: Tue Jun 27, 2006 2:44 pm Reply with quote

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?
 
View user's profile Send private message
aseitz
Regular
Regular



Joined: Mar 08, 2005
Posts: 57
Location: Portland, Oregon USA

PostPosted: Tue Jun 27, 2006 2:52 pm Reply with quote

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.
 
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Isaiah
Hangin' Around



Joined: Nov 09, 2004
Posts: 32

PostPosted: Fri Jun 30, 2006 1:45 am Reply with quote

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.
 
View user's profile Send private message
deech







PostPosted: Fri Jun 30, 2006 8:09 am Reply with quote

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

PostPosted: Fri Jun 30, 2006 4:07 pm Reply with quote

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!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Fri Jun 30, 2006 7:10 pm Reply with quote

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]
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Jul 05, 2006 7:55 pm Reply with quote

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! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©