| Author |
Message |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Sat Oct 02, 2010 5:49 pm |
|
I've been asked from time-to-time how to change the RavenNuke(tm)/PHP-Nuke home to not have a module there (i.e., an empty module). Essentially what is being asked for is to let the blocks around the home module control all of the content on the home page.
This is quite easy to do and I just had to do it for one of the sites I am the web master for and this is what you can do:
1) Create an empty module (skeleton) that only makes sure the header and footer is brought in. For the purpose of this posting example, my module name is going to be EmptyModule.
a) Simply create a new directory under modules like this:
modules/EmptyModule
b) Create an index.php file with just the following code in it:
| Code: |
<?php
/************************************************************************
* Script: TegoNuke(tm) EmptyModule
* Version: 00.01.00
* Author: Rob Herder (aka: montego) of montegoscripts.com
* Contact: montego@montegoscripts.com
* Copyright: Copyright © 2010 by Montego Scripts
* License: GNU/GPL 2
************************************************************************/
if ( !defined('MODULE_FILE') ) { die('You can\'t access this file directly...'); }
// The following two lines ensure the broadest applicability showing/hiding right-hand blocks between versions of RavenNuke/PHP-Nuke
$index = 1; // set to 0 to hide right blocks
define('INDEX_FILE', true); // comment out this line if want to hide right blocks (with some RavenNuke themes, you may need to leave this in and change from "true" to "false"
include_once 'header.php';
include_once 'footer.php';
die();
|
(Yes, you saw that correctly, no closing "?>"! Better to get in the habit of NOT closing that tag.)
2) Upload the above to your hosting account to the appropriate directory (modules)
3) Simply go to the Administration Control Panel --> Modules and click on "Put in Home" link next to the EmptyModule module and then answer "Yes" to the following question.
DONE!
Yes, it is that easy. And, if you wanted to have some text show up rather than just nothing in-between your Center Up and Center Down blocks, simply echo that text/html out in-between the two include_once statements.
Have fun! |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Sun Oct 03, 2010 5:03 am |
|
|
|
 |
kguske
Newbie


Joined: Dec 11, 2005
Posts: 28
|
Posted:
Sat Oct 09, 2010 7:12 pm |
|
Cool... What is the reason for no closing tag? Is it a PHP 6 thing I missed? |
_________________ nukeSEO.com - PHPNuke SEO search engine optimization and other professional tools for PHP-Nuke |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Sun Oct 10, 2010 10:03 am |
|
|
|
 |
kguske
Newbie


Joined: Dec 11, 2005
Posts: 28
|
Posted:
Sun Oct 10, 2010 10:51 am |
|
Thanks! I really appreciate your guidance on these optimization / standardization issues. |
_________________ nukeSEO.com - PHPNuke SEO search engine optimization and other professional tools for PHP-Nuke |
|
|
 |
hicux
Newbie


Joined: Jan 30, 2009
Posts: 14
Location: NL
|
Posted:
Fri Oct 15, 2010 5:03 am |
|
Thank you for sharing this trick montego. Tested and working incredibly well.  |
| |
|
|
 |
|
|