Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 82
3 members and 79 guests
hon9pkqeymoonva, stozlx2ragegq7q, tax7bcslkk7daaw
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

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

Reply
 
LinkBack Thread Tools Display Modes
static html module
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 13
Join Date: Apr 2005
static html module - 04-14-2005, 01:58 PM

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
update
Old
  (#2 (permalink))
Junior Member
 
Status: Offline
Posts: 13
Join Date: Apr 2005
update - 04-14-2005, 02:18 PM

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
Old
  (#3 (permalink))
Super Moderator
 
coldblooded's Avatar
 
Status: Offline
Posts: 624
Join Date: Jan 2002
Location: USA
04-14-2005, 05:24 PM

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
Old
  (#4 (permalink))
Junior Member
 
Status: Offline
Posts: 13
Join Date: Apr 2005
04-14-2005, 05:43 PM

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




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.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