PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Tue Feb 02, 2010 1:13 pm Reply with quote Back to top

What is the way to add dynamic page titles and mata tags from a new module and/ore single file in root?

I noticed in previous release something was changed abouth that.

Thanks in advance wHiTeHaT Wink


Last edited by wHiTeHaT on Fri Feb 05, 2010 6:05 pm; edited 1 time in total
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
spasticdonkey
RavenNuke(tm) Development Team


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

PostPosted: Tue Feb 02, 2010 1:25 pm Reply with quote Back to top

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
View user's profile Send private message
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3028
Location: United Kingdom

PostPosted: Tue Feb 02, 2010 1:29 pm Reply with quote Back to top

Load the block nukeSEOdh and you will then be able to control how the title is generated and override the meta tags.
View user's profile Send private message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Tue Feb 02, 2010 1:33 pm Reply with quote Back to top

the titles for it are generated by a function within a class:

getPageTitle();
getPageTag();

i think in this case for me it would best to exclude the dynamic title/tags generation in ravennuke when ever this module or pages are loaded
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Tue Feb 02, 2010 2:34 pm Reply with quote Back to top

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 Sad

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


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

PostPosted: Tue Feb 02, 2010 2:40 pm Reply with quote Back to top

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.
View user's profile Send private message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Tue Feb 02, 2010 4:21 pm Reply with quote Back to top

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


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

PostPosted: Tue Feb 02, 2010 4:39 pm Reply with quote Back to top

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;
   }
}
View user's profile Send private message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Tue Feb 02, 2010 4:48 pm Reply with quote Back to top

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


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

PostPosted: Tue Feb 02, 2010 5:45 pm Reply with quote Back to top

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.
View user's profile Send private message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Wed Feb 03, 2010 3:53 pm Reply with quote Back to top

i checked the includes/nukeSEO/dh/dhDefault.php

but there i see only a complete quoted file , if i try to use it as i think i should , it doesnt work.

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 dhoscommerce extends dhclass {
   function dhoscommerce () {
#      global $prefix;
#      $this->content_id        = 'fid';
#      $this->content_table     = $prefix.'_seo_feed';
#      $this->contentTitleArray = array('title');
#      $this->contentDescArray  = array('desc');
#      $this->contentKeysArray  = array('title','desc');
    // If pending content is stored in the same table, inactive content, private content, etc.
#    $this->activeWhere       = 'active = 1';
  }
  // Override default getHEAD function
  function getHEAD() {
         $meta['title'][1] = $name . ' - '.$sitename . ' - ' . $slogan;
         $meta['Content-Script-Type'] = array('http-equiv','text/javascript',0);
         $meta['Content-Style-Type'] = array('http-equiv','text/css',0);
         $meta['Expires'] = array('http-equiv','0',0);
         $meta['RESOURCE-TYPE'] = array('name','DOCUMENT',0);
         $meta['DISTRIBUTION'] = array('name','GLOBAL',0);
         $meta['AUTHOR'] = array('name',$sitename,0);
         $meta['COPYRIGHT'] = array('name','Copyright (c) by '.$sitename,0);
         $meta['DESCRIPTION'] = array('name',$slogan,0);
         $meta['KEYWORDS'] = array('name','CMS, cms, Best CMS, best cms, Raven, RavenNuke, Raven Nuke, raven, ravennuke, raven nuke, scripts, PHP, php, MySQL, mysql, SQL, sql, News, news, Technology, technology, Headlines, headlines, Nuke, nuke, PHP-Nuke, phpnuke, php-nuke, Linux, linux, Windows, windows, Software, software, Download, download, Downloads, downloads, Free, FREE, free, Community, community, Forum, forum, Forums, forums, Bulletin, bulletin, Board, board, Boards, boards, Survey, survey, Comment, comment, Comments, comments, Portal, portal, ODP, odp, Open, open, Open Source, OpenSource, Opensource, opensource, open source, Free Software, FreeSoftware, Freesoftware, free software, GNU, gnu, GPL, gpl, License, license, Unix, UNIX, *nix, unix, Database, DataBase, Blogs, blogs, Blog, blog, database, Programming, programming, Web Site, web site, Weblog, WebLog, weblog, ',0);
         $meta['REVISIT-AFTER'] = array('name','1 DAYS',0);
         $meta['RATING'] = array('name','GENERAL',0);
  }
}


If this file should work as you would expect it to do ( changed the class name for the module)
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 5997

PostPosted: Wed Feb 03, 2010 8:13 pm Reply with quote Back to top

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?
View user's profile Send private message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Thu Feb 04, 2010 1:07 pm Reply with quote Back to top

these are the one i use.
But i not use oscommerce's header/footer but raven's.

but what abouth why above not work?
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Fri Feb 05, 2010 2:52 am Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Fri Feb 05, 2010 7:20 am Reply with quote Back to top

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". Wink

So, instead of modifying this script, you create a class for your module.
View user's profile Send private message Visit poster's website
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Fri Feb 05, 2010 12:58 pm Reply with quote Back to top

Guardian2003 wrote:
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.

Image
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Fri Feb 05, 2010 4:46 pm Reply with quote Back to top

this is the result of the old methode (default nuke way) , works as expected:

Image
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Fri Feb 05, 2010 6:04 pm Reply with quote Back to top

a change is made to the header.php to load default nuke standard for the oscommerce part.
and if it isnt part of oscommerce , load the dh class

Problem solved.
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1437
Location: North Carolina

PostPosted: Fri Feb 05, 2010 6:09 pm Reply with quote Back to top

I am glad you were able to solve this.
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum