Author |
Message |
nukeinstaller
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jun 05, 2010
Posts: 4
|
Posted:
Sat Jun 05, 2010 7:25 am |
|
I have a client that has around a 100 pages that he has made that consist of a include_once("header.php") and then the content of the page in html. These pages reside in the root of the site and load like http://domain.com/page.php.
The client would like to override the default page title and keywords. With the introduction of the new nukeSEOdh I am not sure how to go about this for single pages that are not modules. I have searched the forums quite a bit and everything I have found has applied to modules. Is there any way to go about this? Maybe applying the Dynamic Titles hack? I know this new system is better, but I am just throwing out ideas here.
Any help would be appreciated. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Sat Jun 05, 2010 12:30 pm |
|
I would probably convert the html pages either using content plus, or creating some simple one page modules that include a html file.
the nukeDH system can override page title and keywords on the site, module, category, and content level, but it needs to be able to associate the current page with a specific module... and for the category and content level it requires a unique id # as well
Content Plus is all setup and ready to go
or if you use the other method you might try something like this:
create
modules/Your_Module/index.php
Code:<?php
if (!defined('MODULE_FILE')) die ('You can\'t access this file directly...');
require_once("mainfile.php");
include("header.php");
if (!defined('INDEX_FILE')) define('INDEX_FILE', true); // Set to FALSE to hide right blocks
OpenTable();
include("sample.html");
CloseTable();
include("footer.php");
?>
|
replacing Your_Module and sample.html with whatever desired.
sample.html should be in modules/Your_Module/ but code it as though it were located in your site root... i.e. if your module has an image DIR:
<img src="modules/Your_Module/images/someimage.jpg"/>
not
<img src="images/someimage.jpg"/>
activate your new module, then you should have options for module level overrides thru nukeDH |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 05, 2010 12:43 pm |
|
also, if you want to use multiple pages within a custom module just repeat the process of creating the module index, just naming the files something else
For instance let's say we add a couple more pages,
modules/Your_Module/village.php
modules/Your_Module/town.php
to reach these pages:
{yoursite}modules.php?name=Your_Module&file=village
{yoursite}modules.php?name=Your_Module&file=town
kguske helped me figure out a little hack to use nukeDH on modules that that don't use sql.
create
includes/nukeSEO/dh/dhYour_Module.php
Code:<?php
/************************************************************************/
/* nukeSEO
/* http://www.nukeSEO.com
/* Copyright 2008 by Kevin Guske
/************************************************************************/
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
class dhYour_Module extends dhclass {
function getContentID() {
global $file;
$cid = 0;
if ($file == 'index') $cid= 0;
elseif ($file == 'village') $cid = 1;
elseif ($file == 'town') $cid = 2;
return $cid;
}
function setContentID() {
global $file, $dhID;
if ($dhID == 0) $file = 'index';
elseif ($dhID == 1) $file = 'village';
elseif ($dhID == 2) $file = 'town';
}
}
?>
|
upload and you should have options for overrides on the extra pages as well..... of course, make sure to replace all instances of Your_Module with whatever you named your module ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nukeinstaller
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 05, 2010 7:50 pm |
|
I understand your thoughts on this and I have had the same of making the pages based off a module. the only issues is the client is worried about losing the positioning that he has now on these pages and seems to me he would not want to transfer the location of these pages or change the url.
I guess if the client wants the most in the long run he will have to look at this option. Thanks for the information on this. It is well appreciated. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 06, 2010 7:16 am |
|
well you could use shortlinks to mimic the current addresses...
RewriteRule ^page.php modules.php?name=Your_Module [L]
While it may not be impossible, it would be pretty difficult to add either dynamic titles or nukeDH without passing the content thru modules.php |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Sun Jun 06, 2010 9:45 pm |
|
nukeinstaller, I have a similar situation - and plan on using the same approach spasticdonkey recommends: convert static pages to the content plus module, then use mod rewrite (shortlinks) to keep the old address. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|