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, 177 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 - How can I display a standard html page within nuke ? [ ]
 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
ozshadow
Nuke Soldier
Nuke Soldier


Joined: Dec 16, 2003
Posts: 24


PostPosted: Mon Feb 16, 2004 2:10 pm Reply with quoteBack to top

I want to display a simple html page within the nuke framework. Just a list if stories and links. What do I need to do ?

_________________
http://www.ginnypotter.com/
Find all posts by ozshadowView user's profileSend private messageVisit poster's website
nobleclem
Lieutenant
Lieutenant


Joined: May 27, 2003
Posts: 167

Location: Southfield, MI

PostPosted: Mon Feb 16, 2004 2:32 pm Reply with quoteBack to top

If you want it like another module ....

just create a new folder within the modules directory

then in there create index.php

inside the index.php file just put
Code:
include("yourfile.html");


put your html file in the new folder you created..

thats the easiest was I know of.

Or you could use the content module of php-nuke and just copy the html code in the text field.[/code]
Find all posts by nobleclemView user's profileSend private messageVisit poster's websiteAIM AddressMSN MessengerICQ Number
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Mon Feb 16, 2004 2:47 pm Reply with quoteBack to top

To get it 'nuke' wrapped correctly and for proper display, at a minimum you would want
Code:
<?php

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
$index = 1; // Or 0 for no right blocks
include("header.php");
OpenTable();
include("yourfile.html");
CloseTable();
include("footer.php");
?>

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
ozshadow
Nuke Soldier
Nuke Soldier


Joined: Dec 16, 2003
Posts: 24


PostPosted: Mon Feb 16, 2004 3:20 pm Reply with quoteBack to top

hmmm, says you can't access this file directly.

_________________
http://www.ginnypotter.com/
Find all posts by ozshadowView user's profileSend private messageVisit poster's website
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Mon Feb 16, 2004 3:24 pm Reply with quoteBack to top

That code must be saved as index.php in a folder of your choosing and placed in the modules diectory. So, you might name the folder ginny. So, you would place the folder ginny in the modules folder and the folder ginny would contain that code above in a file called index.php. You then have to activate the module in the nuke Admin panel.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Stephen2417
Major
Major


Joined: Dec 26, 2003
Posts: 1135

Location: Bristolville, OH (US)

PostPosted: Mon Feb 16, 2004 3:24 pm Reply with quoteBack to top

thats bc you cant, lol. What ever you named it you will need to go to
www.yoursite.com/modules.php?name=name_of_module

This should also show up in the modules menu if you have it active. If now you should see it as an admin.
Find all posts by Stephen2417View user's profileSend private messageSend e-mailVisit poster's websiteAIM Address
ozshadow
Nuke Soldier
Nuke Soldier


Joined: Dec 16, 2003
Posts: 24


PostPosted: Mon Feb 16, 2004 3:32 pm Reply with quoteBack to top

got that fixed, but now it can't find the html page


Warning: main(author.htm): failed to open stream: No such file or directory in /home/ginnypot/public_html/phpnuke/modules/author/index.php on line 9

Warning: main(): Failed opening 'author.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ginnypot/public_html/phpnuke/modules/author/index.php on line 9



Where exactly do I need to save the html page to call it that way ?

_________________
http://www.ginnypotter.com/
Find all posts by ozshadowView user's profileSend private messageVisit poster's website
Stephen2417
Major
Major


Joined: Dec 26, 2003
Posts: 1135

Location: Bristolville, OH (US)

PostPosted: Mon Feb 16, 2004 3:44 pm Reply with quoteBack to top

well you can put it in the root or in the module's folder. Dosent realy matter, if you are having problems you may want to put the absoulte path to it.
For example:
instead of yourfile.html put http://www.yoursite.com/yourfile.html
Find all posts by Stephen2417View user's profileSend private messageSend e-mailVisit poster's websiteAIM Address
ozshadow
Nuke Soldier
Nuke Soldier


Joined: Dec 16, 2003
Posts: 24


PostPosted: Mon Feb 16, 2004 3:48 pm Reply with quoteBack to top

k, here is the code of index.php inside my authors folder in the modules folder

<?php

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
$index = 1; // Or 0 for no right blocks
include("header.php");
OpenTable();
include("author.htm");
CloseTable();
include("footer.php");
?>



I have ftp'd author.htm in every folder I can think of - root, modules, authors, includes - still nothing will load it

_________________
http://www.ginnypotter.com/
Find all posts by ozshadowView user's profileSend private messageVisit poster's website
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Mon Feb 16, 2004 3:51 pm Reply with quoteBack to top

When using the include function, php will look in the nuke root directory. So, I would create a folder in the nuke root directory (where mainfile.php is located) and call it something like mystuff. Then, place your html files in the mystuff folder. Modify your include statement to be
include("mystuff/yourfile.html");
Linking to an external http:// site is added overhead. You could also hide it in a protected area by placing mystuff below the nuke directory and then calling it by
include("../mystuff/yourfile.html");

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
ozshadow
Nuke Soldier
Nuke Soldier


Joined: Dec 16, 2003
Posts: 24


PostPosted: Mon Feb 16, 2004 3:58 pm Reply with quoteBack to top

All fixed, it was an idiot error.

file was authors, but I was calling it as singular author.htm


THANKS !

_________________
http://www.ginnypotter.com/
Find all posts by ozshadowView user's profileSend private messageVisit poster's website
arron_ca
Nuke Cadet
Nuke Cadet


Joined: Mar 25, 2004
Posts: 1


PostPosted: Thu Mar 25, 2004 6:18 pm Reply with quoteBack to top

I got this part working, but for more advanced (calling php files etc) it trys to open that file from the module dir (i assume) where the file and assosiated files are in the root with phpnuke ( "include test/index.php" ). i get a little further if i put the full site in the include "include http://mysite.com/test/index.php" but still not the full results. How can i make it run the /test/index.php and assosiated files in /test/?

Thanks

Arron
Find all posts by arron_caView user's profileSend private message
InchWorm
Nuke Soldier
Nuke Soldier


Joined: Feb 26, 2004
Posts: 31


PostPosted: Fri Mar 26, 2004 4:57 pm Reply with quoteBack to top

Is there anyway to have it automaticly add, in its own table, any htm with in a certain folder?

I'd like just to add different whatever.htm's to a folder and that info automaticly be add with out me adding

Code:
OpenTable();
include("whatever.htm");
CloseTable();


each time.... make sence?
Find all posts by InchWormView user's profileSend private message
liaisonextreme
Nuke Soldier
Nuke Soldier


Joined: Mar 27, 2004
Posts: 10


PostPosted: Fri Mar 26, 2004 10:37 pm Reply with quoteBack to top

Wow this is awesome. I just came past this and read over for the heck of it....then I tried it and it worked! Now I can make my own custom pages in HTML and add them to my site! This should be a sticky! Thanks alot. It is so easy to do and yet a newb like me would never had a clue.

Could someone also tell us how to add another website page like this? Like for instance if I wanted to put a link to a friends homepage and have it show on my website, how could I do this properly so that all images and such would show up? I tried this and it didn't work properly. The site itself showed up, but the images did not and there was also a error message at the top of the page like this

Code:
Warning: main(): stream does not support seeking in /home/themig2/public_html/modules/authors/index.php on line 9



Your help would be greatly appreciated.
Find all posts by liaisonextremeView user's profileSend private message
Berzerker
Nuke Soldier
Nuke Soldier


Joined: Aug 01, 2003
Posts: 33


PostPosted: Fri Mar 26, 2004 11:08 pm Reply with quoteBack to top

The only problem with making your pages moduls. Each page needs it's own module, so you end up with a millon folders. I found it better to just paste the html code into the sections. Then I just made a regular html block for all my own links, and pasted that code into make new block. If you want left and right blocks. edit the sections index php.

$index = 1; Or 0 for no right blocks
Find all posts by BerzerkerView user's profileSend private messageSend e-mail
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 - TUTTISU E-COMMERCE http://www.tuttisu.it
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.143 Seconds - 273 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::