You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 63 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - create block to display html [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
devo
Private
Private


Joined: May 27, 2003
Posts: 38


PostPosted: Sat May 31, 2003 10:10 pm Reply with quoteBack to top

I want to write a block to display simple html pages and html pages with javascript...... to control popup and window status message.....<b>please</b> dont say this is so easy or it is covered elsewhere.....I have read the idiots guide....that was no help to me..... what I am asking seems to be SO simple....... but I need detailed help with this one please...... I have created a file called block-test.php uploaded to my blocks dir added it....and the result says....such a file does not exist...... Evil or Very Mad

here is the file.....
----------------------------------
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
if (!isset($mainfile)) { include("mainfile.php"); }
$module_name = basename(dirname(__FILE__));
$index = 1;
include("header.php");

include("http://www.mysite.com/modules/test/test.html");

include("footer.php");
?>

?>

-----------------------------------------------------------------------

the file <b>DOES</b> exist.......... I want to display the main menu on the left and test.html on the right........ I have tried everything.....so in desperation I am asking for help...... also I want to load other pages which include java in the file.....I think there is a diferent way of doing this also.....but I am pretty lost just with this one......so if someone can tell me what files I need to create and where to put them that would be awesome thanks.

_________________
......can ya tell im <b>new</b> at this....
Find all posts by devoView user's profileSend private message
FHFGhost
Lieutenant
Lieutenant


Joined: Jan 26, 2003
Posts: 279

Location: Huntsville, AL

PostPosted: Mon Jun 02, 2003 11:19 am Reply with quoteBack to top

Try this, I use it frequently on my website.

<?php
ob_start();
include("http://www.mysite.com/modules/test/test.html");
$output = ob_get_contents();
ob_end_clean();
$content .= $output;
?>

If that one doesn't work let me know, there is an iFrame solution but this one works better.

_________________
"I don't know what the key to success is, but the key to failure is trying to please everybody"..Bill Cosby
Image
Find all posts by FHFGhostView user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger
devo
Private
Private


Joined: May 27, 2003
Posts: 38


PostPosted: Mon Jun 02, 2003 10:14 pm Reply with quoteBack to top

great thanks......how do I use that code specifically please?

_________________
......can ya tell im <b>new</b> at this....
Find all posts by devoView user's profileSend private message
FHFGhost
Lieutenant
Lieutenant


Joined: Jan 26, 2003
Posts: 279

Location: Huntsville, AL

PostPosted: Tue Jun 03, 2003 6:20 am Reply with quoteBack to top

Create you a blank php page using a program such as DreamWeaver and copy and paste that code into the new php page. Save it as block-youname.php. Then put it in your blocks directory on your webpage. Let me know if you need anything else.

_________________
"I don't know what the key to success is, but the key to failure is trying to please everybody"..Bill Cosby
Image
Find all posts by FHFGhostView user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger
devo
Private
Private


Joined: May 27, 2003
Posts: 38


PostPosted: Tue Jun 03, 2003 4:29 pm Reply with quoteBack to top

FHFGhost wrote:
Create you a blank php page using a program such as DreamWeaver and copy and paste that code into the new php page. Save it as block-youname.php. Then put it in your blocks directory on your webpage. Let me know if you need anything else.


excellent...thanks...I will have a go ove the weekend.....

thanks for the help

_________________
......can ya tell im <b>new</b> at this....
Find all posts by devoView user's profileSend private message
MikeMiles
Lieutenant
Lieutenant


Joined: May 29, 2003
Posts: 231


PostPosted: Tue Jun 03, 2003 6:11 pm Reply with quoteBack to top

If you're including files located on your own server, do it like this:
Quote:
include("/modules/test/test.html");

NOT like this:
Quote:
include("http://www.mysite.com/modules/test/test.html");

The latter way will eat up http sockets. If your site gets any real traffic, you'll tie the server up badly.
Find all posts by MikeMilesView user's profileSend private message
devo
Private
Private


Joined: May 27, 2003
Posts: 38


PostPosted: Tue Jun 03, 2003 9:41 pm Reply with quoteBack to top

[quote="MikeMiles"]If you're including files located on your own server, do it like this:
Quote:
include("/modules/test/test.html");



Great stuff.....thanks for the tip

_________________
......can ya tell im <b>new</b> at this....
Find all posts by devoView user's profileSend private message
devo
Private
Private


Joined: May 27, 2003
Posts: 38


PostPosted: Sun Jun 08, 2003 2:55 am Reply with quoteBack to top

All sorted......thanks for all the help guys GOOD WURK Smile

_________________
......can ya tell im <b>new</b> at this....
Find all posts by devoView user's profileSend private message
smoked1
Nuke Soldier
Nuke Soldier


Joined: Mar 30, 2003
Posts: 30


PostPosted: Fri Jun 27, 2003 6:33 pm Reply with quoteBack to top

Helped me as well... Good Show man.
Find all posts by smoked1View user's profileSend private messageVisit poster's website
chris-au
Elite Nuker
Elite Nuker


Joined: Jan 31, 2003
Posts: 717


PostPosted: Fri Jun 27, 2003 9:28 pm Reply with quoteBack to top

But,

Code:

<?php
ob_start();
include("http://www.mysite.com/modules/test/test.html");
$output = ob_get_contents();
ob_end_clean();
$content .= $output;
?>


Why would you do it this way if the files are at your own site?

Why not just plain:

Code:

<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
if (!isset($mainfile)) { include("mainfile.php"); }
$module_name = basename(dirname(__FILE__));
$index = 1;
include("header.php");

include("modules/test/test.html");  //<--SEE THE DIFF??

include("footer.php");
?>


Why calling http:// etc.etc again?

_________________
Chris
Find all posts by chris-auView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.219 Seconds - 296 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::