Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
nukeinstaller
New Member
New Member



Joined: Jun 05, 2010
Posts: 4

PostPosted: Sat Jun 05, 2010 7:25 am Reply with quote

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.
 
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Sat Jun 05, 2010 12:30 pm Reply with quote

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 Wink

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
 
View user's profile Send private message Visit poster's website
spasticdonkey







PostPosted: Sat Jun 05, 2010 12:43 pm Reply with quote

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 Smile

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
 
nukeinstaller







PostPosted: Sat Jun 05, 2010 7:50 pm Reply with quote

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.
 
spasticdonkey







PostPosted: Sun Jun 06, 2010 7:16 am Reply with quote

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
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Sun Jun 06, 2010 9:45 pm Reply with quote

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!
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©