PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  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
montego
Site Admin


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

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

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:
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website
Susann
Spouse Contemplates Divorce


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

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

Thanks Montego for your fix !
Wave
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
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-2008 by Raven
Proud to be listed at Lobo Links Web Directory

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 Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

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

zerosum