» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 54
0 members and 54 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Oral Chelation - initial cleansing of your veins & arteries

Register Now! Contact Us

About this Page
This is a discussion on static html module within the Nuke 7.x - Modules forums, part of the PHP-Nuke 7.x category; on 7.5 (recently upgraded from 6.0) I'm trying to install a static html module, then set it ...


Go Back   Nukemods Forum » PHP-Nuke 7.x » Nuke 7.x - Modules

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-14-2005, 01:58 PM
Junior Member
 
Join Date: Apr 2005
Posts: 13
static html module
on 7.5 (recently upgraded from 6.0) I'm trying to install a static html module, then set it as my home page, and I've seen a couple of different scripts around, but they only give me a completely blank page, or 'unable to access this file'

hopefully its something simple, as I'm a bit of a newbie, and not very versed in php.

here's one that brings up a blank page, afterwards I have another


Code:
<?php 
if (!eregi("modules.php", $PHP_SELF)) { 
die ("You can't access this file directly..."); 
} 
$index = 0; // 0 : do not show right blocks - 1:show right blocks 
require_once("mainfile.php"); 
$module_name = basename(dirname(__FILE__)); 
include("header.php"); 
$ACCEPT_FILE['thisissue.html'] = 'thisissue.html'; 

OpenTable(); 
$php_ver = phpversion(); 
$php_ver = explode(".", $php_ver); 
$phpver = "$php_ver[0]$php_ver[1]"; 
if ($phpver >= 41) { 
$page = $_GET['page']; 
} else { 
$page = $HTTP_GET_VARS['page']; 
} 
$pagename = $ACCEPT_FILE[$page]; 
if (!isSet($pagename)) $pagename = "thisissue.html"; // default file 
include("modules/This_Issue/$pagename"); 
CloseTable(); 
include("footer.php"); 
?>



Here is the one that gives me "you can't access this file directly"


Code:
if (!eregi("modules.php", $PHP_SELF)) {
  die ("You can't access this file directly...");
}
$index = 0;   // 0 : do not show right blocks - 1:show right blocks 
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
$ACCEPT_FILE['thisissue.html'] = 'thisissue.html';
OpenTable();
$php_ver = phpversion();
$php_ver = explode(".", $php_ver);
$phpver = "$php_ver[0]$php_ver[1]";
if ($phpver >= 41) {
    $page = $_GET['page'];
} else {
    $page = $HTTP_GET_VARS['page'];
}
$pagename = $ACCEPT_FILE[$page];
if (!isSet($pagename)) $pagename = "modules.php?name=This_Issue&page=thisissue.html"; // default file
include("modules/This_Issue/$pagename");
CloseTable();
include("footer.php");
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-14-2005, 02:18 PM
Junior Member
 
Join Date: Apr 2005
Posts: 13
update
well, I'm halfway there. I replaced this:

$PHP_SELF)) {

with this:

$_SERVER['PHP_SELF'])) {

Now my theme appears, but I still can't see the html content in the center section.. any suggestions??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-14-2005, 05:24 PM
coldblooded's Avatar
Super Moderator
 
Join Date: Jan 2002
Location: USA
Posts: 618
Did you try the module creator?
http://www.nukemods.com/modules.php?...ex&func=Module
__________________
The more we learn... the more we realize how little we actually know.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-14-2005, 05:43 PM
Junior Member
 
Join Date: Apr 2005
Posts: 13
Just tried that. When I uploaded the page it gave me the "can't access this directly" error.

I've avoided the problem, but in a backwards way. The module I have now is there, but showing no information, at all. So I created a block with the information I wanted, and got it to show in the home page along with the module that shows nothing. As far as the public is concerned, they see what they need to, but I've a hunch I'm fixing this in a cheating/ dirty sort of way, y'know?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Good, free, hit counter for static .html pages. Duke Site design 3 09-01-2008 11:41 PM
Using HTML in reviews module Cyberkiller Nuke 7.x - Modules 19 02-22-2006 07:13 PM
HTML in module not coded properly doomtomb Site design 7 12-19-2004 10:17 PM
HTML Module Cuthalion Nuke 7.x - Modules 4 07-20-2004 06:36 AM
Better than static HTML Madcow Showoff 5 05-30-2003 08:02 PM


All times are GMT -5. The time now is 07:29 AM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31