Joined: Dec 02, 2006 Posts: 1253 Location: Texas, USA
Posted:
Tue Feb 02, 2010 1:25 pm
I used the files in
includes/nukeSEO/dh
as examples on how to create my own on a per module basis. Each page or category of your module must have a unique id in the URL for the default dh system to work. URL's like
modules.php?name=SomeModule&file=somefile
are a little harder but there's a work-around that worked for me on the nukeSEO forums.
Moving forward from Dynamic Titles
Only registered users can see links on this board! Get registered or login to the forums!
similar setup to the nukeSEO sitemap or mSearch if you have used those...
Last edited by spasticdonkey on Tue Feb 02, 2010 1:31 pm; edited 1 time in total
i'm still alittle confused , it seems the dynamic titles are generated from there own classes per module.
This means if there doesnt excist a class for a new added module , you must manualy enter this data into the db , using the nukeSEOdh block , correct?
I wonder if i'm forced to use nukeSEOdh? ( it seems it do).
i think it is a bad idea , but respecting the authors work , aloth of resource is used to generate or fetch this data.
I'm not happy with it
in my point of view it would have been better to generate or fetch this data on a $link base , so for each $link with option to exclude links
$link
$ex_link
Joined: Dec 02, 2006 Posts: 1253 Location: Texas, USA
Posted:
Tue Feb 02, 2010 2:40 pm
wHiTeHaT wrote:
.....This means if there doesnt excist a class for a new added module , you must manualy enter this data into the db , using the nukeSEOdh block , correct?
If you only want module level overrides then no extra files are needed. nukeDH will default them to
custom module title- sitename
(if i remember right), or you can override for the entire module.
i'm not content with that , i require a full override.
It is to bad the default way is changed ( if i'm correct).
As you might now i work on oscommerce 3 , and finaly succeed to get the pagetitles meta tag's and keywords for all content as it it is generated in oscommerce , into nuke.
with 0 edits to (raven)nuke files , and only using the custom_mainfile.php
synced login/logout.
I spended weeks to find out the correct way , and feel a bit upset to find out i have to edit core files.
Joined: Dec 02, 2006 Posts: 1253 Location: Texas, USA
Posted:
Tue Feb 02, 2010 4:39 pm
I'm not sure why you would have to edit core files?
You can override the function on a per module basis. Not familiar with OSCommerce, but you would just create a file
includes/nukeSEO/dh/dhOSCommerce.php
which would control how the OSCommerce module get's handled by nukeDH (where OSCommerce = name of your your module)
something like this but substitute the proper tables for OSCommerce (this was a copy of encyclopedia)
Code:
/************************************************************************/
/* 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 dhOSCommerce extends dhclass {
function dhOSCommerce () {
global $prefix;
$this->content_id = 'tid';
$this->content_table = $prefix.'_encyclopedia_text';
$this->contentTitleArray = array('title');
$this->contentDescArray = array('text');
$this->contentKeysArray = array('title','text');
$this->cat_id = 'eid';
$this->cat_table = $prefix.'_encyclopedia';
$this->catTitleArray = array('title');
$this->catDescArray = array('description');
$this->catKeysArray = array('title','description');
// If pending content is stored in the same table, inactive content, private content, etc.
$this->activeWhere = '';
}
function getContentID() {
global $tid;
return $tid;
}
function setContentID() {
global $tid, $dhID;
$tid = $dhID;
}
function getCatID() {
global $eid;
return $eid;
}
function setCatID() {
global $eid, $dhCat;
$eid = $dhCat;
}
}
yes your right abouth that Spas , however the way i intregrated oscommerce to nuke isnt like a real module.
I have created a module called oscommerce as a pin-point for nuke , but to respect also oscommerce code , it's 'content'-files are located in the root of nuke.
The only file in the oscommerce module what can be entered is it's index.php.
From there it refers to it's other files.
-account.php
-checkout.php
-download.php
-images.php
-info.php
-products.php
-redirect.php
-search.php
-shop.php (represents index.php)
each of these files have titles generated etc.
So beside the current methode to create the dynamic titles etc etc... this would have been an issue anyway , but one i could resolve quickly.
So a url like
Only registered users can see links on this board! Get registered or login to the forums!
doesnt excist.
only:
Only registered users can see links on this board! Get registered or login to the forums!
Joined: Dec 02, 2006 Posts: 1253 Location: Texas, USA
Posted:
Tue Feb 02, 2010 5:45 pm
looking very nice... and yes and I see you have some challenges ahead since it isn't passed through modules.php
there may be some options in
includes/nukeSEO/dh/dhDefault.php
by overriding the default getHEAD function when needed.
Just a suggestion...since osCommerce isn't integrated as a module and PHP classes seem to be a challenge, why not use the page title and meta tag generation functions in osCommerce?
Joined: Aug 28, 2003 Posts: 6300 Location: Vsetin, Czech Republic
Posted:
Fri Feb 05, 2010 2:52 am
If you are not porting oscommerce as a module, then you cannot realistically expect it to work as some native RN functions might not be available.
If you are just using RN's header/footer to wrap oscommerce you are probably missing vital components like mainfile.php
As kguske already mentioned, you might be better retaining RN header/footer to give oscommerce the appearence of RN but just use the oscommerce meta tag generation.
Either that or use oscommerce as a stand alone, tweak the theme to match your RN theme and build a simple bridge to share user data.
Joined: Aug 29, 2004 Posts: 9071 Location: Arizona
Posted:
Fri Feb 05, 2010 7:20 am
wHiTeHaT wrote:
It is to bad the default way is changed ( if i'm correct).
Not correct! Sort-of... Yes, it is changed from using my Dynamic Titles script to nukeSEO DH, but the concept is exactly the same. If you were to add a new module the old way, you would have had to update the includes/dynamic_titles.php script to include whatever overrides you wanted for the titles because the data must be pulled from the module's tables in order to be "dynamic".
So, instead of modifying this script, you create a class for your module.
If you are not porting oscommerce as a module, then you cannot realistically expect it to work as some native RN functions might not be available.
If you are just using RN's header/footer to wrap oscommerce you are probably missing vital components like mainfile.php
As kguske already mentioned, you might be better retaining RN header/footer to give oscommerce the appearence of RN but just use the oscommerce meta tag generation.
Either that or use oscommerce as a stand alone, tweak the theme to match your RN theme and build a simple bridge to share user data.
Al the RN functions work as it should do , the point is ,oscommerce uses it's own dynamic titles and keywords.
So if i goto a product , it generate keywords and if has tags for this product.
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