Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> nukeSEO
Author Message
neralex
The Mouse Is Extension Of Arm


Joined: Aug 22, 2007
Posts: 1325
Location: Germany

PostPosted: Fri Apr 12, 2013 9:11 am Reply with quote

I'm trying to override the title and the description on the module level with a extended class file - i mean the index area of a module without any id or cat and without storing anything into the database. Is it possible? I have only found to override the ModuleTitlePrefix and setModuleTitle but not the description.

Code:
   function setModuleTitle($name) {

      global $db, $prefix;
      if ($this->dt_bUseCustNm) {
      list($moduletitle) = $db->sql_fetchrow($db->sql_query('SELECT `moduletitle` FROM `' . $prefix . '_my_table`'));
         $dt_mod_title = $moduletitle;
      } else {
         $dt_mod_title = str_replace('_', ' ', $name);
      }
      $this->dt_mod_title = $dt_mod_title;
   }
 
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Fri Apr 12, 2013 12:22 pm Reply with quote

Just to clarify, are you referring to the META description, or something that you wish to display on the index page?

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
CodyG
Life Cycles Becoming CPU Cycles


Joined: Jan 02, 2003
Posts: 712
Location: Vancouver Island

PostPosted: Fri Apr 12, 2013 12:25 pm Reply with quote

I didn't know there was a description field for modules?

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
neralex
PostPosted: Fri Apr 12, 2013 6:15 pm Reply with quote

kguske wrote:
Just to clarify, are you referring to the META description, or something that you wish to display on the index page?

I will override the META description of the module index.

But if i want trying to overrride the module index and the description of the module index, then i can only override the title. You can see here my current class:

Code:
class dhGallery extends dhclass {

   function dhGallery () {
      global $prefix;
      $this->content_id        = 'id';
      $this->content_table     = $prefix . '_rngal,' . $prefix . '_rngal_config';
      $this->contentTitleArray = array('title', 'moduletitle');
      $this->contentDescArray  = array('desc');
      $this->contentKeysArray  = array('title','desc');
      $this->cat_id            = 'id';
      $this->cat_table         = $prefix . '_rngal_cat,' . $prefix . '_rngal_config';
      $this->catTitleArray     = array('title', 'moduletitle');
      $this->catDescArray      = array('desc');
      $this->catKeysArray      = array('title','desc');
      $this->subcat_id         = 'id';
      $this->subcat_table      = $prefix . '_rngal_album,' . $prefix . '_rngal_config';
      $this->subcatTitleArray  = array('title', 'moduletitle');
      $this->subcatDescArray   = array('desc');
      $this->subcatKeysArray   = array('title', 'desc');
      // If pending content is stored in the same table, inactive content, private content, etc.
      $this->activeWhere       = '';
   }
   function getContentID() {
      global $gid;
      return $gid;
   }
   function setContentID() {
      global $gid, $dhID;
      $gid = $dhID;
   }
   function getCatID() {
      global $cat;
      return $cat;
   }
   function setCatID() {
      global $cat, $dhCat;
      $cat = $dhCat;
   }
   function getSubCatID() {
      global $alb;
      return $alb;
   }
   function setSubCatID() {
      global $alb, $dhSubCat;
      $alb = $dhSubCat;
   }
   function setModuleTitle($name) {
      global $db, $prefix;
      if ($this->dt_bUseCustNm) {
      list($moduletitle) = $db->sql_fetchrow($db->sql_query('SELECT `moduletitle` FROM `' . $prefix . '_rngal_config`'));
         $dt_mod_title = $moduletitle;
      } else {
         $dt_mod_title = str_replace('_', ' ', $name);
      }
      $this->dt_mod_title = $dt_mod_title;
   }
}


CodyG wrote:
I didn't know there was a description field for modules?

It exists no description for modules on the module index. That is the reason why i want trying to override it with a class file. My data comes from a db-table of the module.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> nukeSEO

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 ©