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: 1393

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: 61
Location: Germany

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

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



Joined: Feb 12, 2005
Posts: 1393

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: 401

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'!
 
View user's profile Send private message
mattz
Newbie
Newbie



Joined: Dec 19, 2010
Posts: 1

PostPosted: Sun Dec 19, 2010 11:34 am Reply with quote

wow SEO great..
just want to ask if this works at NUke Platinum?

_________________
http://www.pinoy-nukerz.net/platinum/index.php
----------
PHPnuke themes 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 401

PostPosted: Sun Dec 19, 2010 1:03 pm Reply with quote

Why would you want to? Isn't Platinum a dead project?
If Platinum has the dynamic_titles.php file and it looks like the code posted above, then it should work.
You can always rename your original file before uploading a modified version to make sure.
 
View user's profile Send private message
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 ©
linear-bunch