Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN Gr Downloads - a.k.a NukeDepository
Author Message
montego
Site Admin



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

PostPosted: Thu Aug 23, 2007 6:46 am Reply with quote

It turns out that within the Top module, there are links to the original PHP-Nuke downloads (which will no longer work with the NSN GR Downloads). Therefore, additional code file edits are needed. Here are those edits:

=== OPEN ===

modules/Top/index.php

=== FIND ===

Code:


/* Top 10 downloads */

$result13 = $db->sql_query('SELECT lid, cid, title, hits FROM '.$prefix.'_downloads_downloads ORDER BY hits DESC LIMIT 0,'.$top);
if ($db->sql_numrows($result13) > 0) {
    echo '<table border="0" cellpadding="10" width="100%"><tr><td align="left">'
        .'<font class="option"><b>'.$top.' '._DOWNLOADEDFILES.'</b></font><br /><br />';
    $lugar=1;
    while ($row13 = $db->sql_fetchrow($result13)) {
        $lid = intval($row13['lid']);
        $cid = intval($row13['cid']);
        $title = stripslashes(check_html($row13['title'], 'nohtml'));
        $hits = intval($row13['hits']);
        if($hits>0) {
            $row_res = $db->sql_fetchrow($db->sql_query('SELECT title FROM '.$prefix.'_downloads_categories WHERE cid=\''.$cid.'\''));
            $ctitle = stripslashes(check_html($row_res['title'], 'nohtml'));
            $utitle = ereg_replace(' ', '_', $title);
            echo '<strong><big>&middot;</big></strong>&nbsp;'.$lugar.': <a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid='.$lid.'&amp;ttitle='.$utitle.'">'.$title.'</a> ('._CATEGORY.': '.$ctitle.') - ('.$hits.' '._LDOWNLOADS.')<br />';
            $lugar++;
        }
    }
    echo '</td></tr></table>';
}


=== REPLACE WITH ===

Code:


/* Top 10 downloads - for NSN GR Downloads */

$result13 = $db->sql_query('SELECT lid, cid, title, hits FROM '.$prefix.'_nsngd_downloads ORDER BY hits DESC LIMIT 0,'.$top);
if ($db->sql_numrows($result13) > 0) {
    echo '<table border="0" cellpadding="10" width="100%"><tr><td align="left">'
        .'<font class="option"><b>'.$top.' '._DOWNLOADEDFILES.'</b></font><br /><br />';
    $lugar=1;
    while ($row13 = $db->sql_fetchrow($result13)) {
        $lid = intval($row13['lid']);
        $cid = intval($row13['cid']);
        $title = stripslashes(check_html($row13['title'], 'nohtml'));
        $hits = intval($row13['hits']);
        if($hits>0) {
            $row_res = $db->sql_fetchrow($db->sql_query('SELECT title FROM '.$prefix.'_nsngd_categories WHERE cid=\''.$cid.'\''));
            $ctitle = stripslashes(check_html($row_res['title'], 'nohtml'));
            $utitle = ereg_replace(' ', '_', $title);
            echo '<strong><big>&middot;</big></strong>&nbsp;'.$lugar.': <a href="modules.php?name=Downloads&amp;op=getit&amp;lid='.$lid.'">'.$title.'</a> ('._CATEGORY.': '.$ctitle.') - ('.$hits.' '._LDOWNLOADS.')<br />';
            $lugar++;
        }
    }
    echo '</td></tr></table>';
}


=== DONE ===

Now, if you are also a ShortLinks user, you will want to make sure and make the necessary fixes to those as well. You can get those edits here:

http://montegoscripts.com/ftopict-201.html

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Aug 23, 2007 6:18 pm Reply with quote

Thanks Montego for your fix !
Wave
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN Gr Downloads - a.k.a NukeDepository

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 ©