Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 954

PostPosted: Thu Aug 23, 2007 9:13 am Reply with quote

The existing Dynamic Titles was coded to work with the original PHP-Nuke/RavenNuke(tm) Downloads module. If you would like to "tweak" your DT to work with NSN GR Downloads, it is a simple fix:

=== OPEN ===

includes/dynamic_titles.php

=== FIND ===

Code:

// Downloads
elseif ($name == 'Downloads') {
   global $d_op, $cid, $lid;
   if ($d_op == 'viewdownload') {
      $sql = 'SELECT title, parentid, cdescription FROM '.$prefix.'_downloads_categories WHERE cid=\''.intval($cid).'\'';
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $asDTText['category'] = $row['title'];
      $asDTText['text'] = substr($row['cdescription'], 0, $text_size);
      if ($row['parentid'] == 0) {
         $newpagetitle = $asDTText['category'].$dt_delim.$asDTText['text'].$dt_delim.$sitename;
      } else {
         $sql = 'SELECT title FROM '.$prefix.'_downloads_categories WHERE cid=\''.intval($row['parentid']).'\'';
         $result = $db->sql_query($sql);
         $row = $db->sql_fetchrow($result);
         $newpagetitle = $asDTText['category'].$dt_delim.$asDTText['text'].$dt_delim.$row['title'].$dt_delim.$sitename;
      }
   } elseif ($d_op == 'viewdownloaddetails' || $d_op == 'getit') {
      $sql = 'SELECT title, description FROM '.$prefix.'_downloads_downloads WHERE lid=\''.intval($lid).'\'';
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $newpagetitle = $row['title'].$dt_delim.substr($row['description'], 0, $text_size);
   }
}


=== REPLACE WITH ===

Code:

// Downloads for NSN GR Downloads
elseif ($name == 'Downloads') {
   global $op, $cid, $lid;
   if ($cid) {
      $sql = 'SELECT title, parentid, cdescription FROM '.$prefix.'_nsngd_categories WHERE cid=\''.intval($cid).'\'';
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $asDTText['category'] = $row['title'];
      $asDTText['text'] = substr($row['cdescription'], 0, $text_size);
      if ($row['parentid'] == 0) {
         $newpagetitle = $asDTText['category'].$dt_delim.$asDTText['text'].$dt_delim.$sitename;
      } else {
         $sql = 'SELECT title FROM '.$prefix.'_nsngd_categories WHERE cid=\''.intval($row['parentid']).'\'';
         $result = $db->sql_query($sql);
         $row = $db->sql_fetchrow($result);
         $newpagetitle = $asDTText['category'].$dt_delim.$asDTText['text'].$dt_delim.$row['title'].$dt_delim.$sitename;
      }
   } elseif ($op == 'getit') {
      $sql = 'SELECT title, description FROM '.$prefix.'_nsngd_downloads WHERE lid=\''.intval($lid).'\'';
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $newpagetitle = $row['title'].$dt_delim.substr($row['description'], 0, $text_size);
   }
}


=== DONE ===

Hope this helps!
 
View user's profile Send private message Visit poster's website
Susann
Newbie
Newbie



Joined: Jan 04, 2007
Posts: 55
Location: Cyberworld

PostPosted: Thu Aug 23, 2007 7:29 pm Reply with quote

Works great ! Smile
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 954

PostPosted: Thu Aug 23, 2007 9:47 pm Reply with quote

Awesome. Thank you for letting me know.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 309

PostPosted: Sun Aug 26, 2007 5:59 pm Reply with quote

Cool, I had not even noticed this but I have used your fix now, thanks again'!

_________________
Spam Stopper - Comments Modules - Security News - Script Installer 
View user's profile Send private message 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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
Forum - Join the conversation on the Thoughts.com forums
Executive Resumes - providing complimentary resume analysis
ppc management
PhpNuke Themes
Lobo Links Web Directorylinear-bunch
linear-bunch
linear-bunch