Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Modules
Author Message
blastwood
New Member
New Member



Joined: Sep 11, 2010
Posts: 12
Location: Bucharest

PostPosted: Fri Nov 29, 2013 4:39 pm Reply with quote

Hello

I had an old way PHP Nuke site that shows me the latest download links added but shows by category
After the latest update from 2.3 to 2.4 is not working. I have tried to block change after the "last download" yet we did

What do you think is wrong with this code?

Code:
if (!defined('MODULE_FILE')) {

    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "";
$index = 1;



function Rankings() {
   global $prefix, $db, $bgcolor2, $bgcolor3;
   include("header.php");
   OpenTable();
      echo "<b><center>::.::Ultimele Titluri Adaugate::.::</center><br>";
      echo "<table cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\">\n";

     

     echo "<tr><td colspan='3' background='content.gif'><font color='#FFFFFF'><b>Romaneasca</b></font></td><td colspan='1' background='content.gif' align='right' alt='Adaugat pe:'><font color='#FFFFFF'><b>Hits</b></font></td></tr>";
   $sql = "SELECT lid, title, date, hits, version, filesize FROM ".$prefix."_downloads_downloads WHERE cid = '1' order by date DESC limit 10";
   $result = $db->sql_query($sql);


   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace("_", " ", $row['title']);


      if ($a <= 15) {
         echo "<tr bgcolor=\"$bgcolor3\">";
         echo "<td align=\"center\"><span class=\"title\"><img src=\"http://img294.imageshack.us/img294/2172/mp3nj1.gif\"></span></td>";
                 
      } else {

         echo "<tr><td align=\"center\"></td>";
      }
      echo "<left><img src=\"images/mp3.gif\">&nbsp;$a: <a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$lid&amp;ttitle=$transfertitle\"><b>$title2</b></a>&nbsp;($hits)<br>[$addedon: <b>$datetime</b>]<br><hr></center>
      
         $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   $datetime = ucfirst($datetime);
               $datetime = $row['date'];
$d_time=explode("-",$datetime);
$dt=date("d F Y", mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 
                     

      echo "<td align=\"right\"><font color=\"red\">$row[hits]</font></td></tr>";

      
   }
        
Echo "</table>";

echo "<table cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\">\n";

  echo "<tr><td colspan='3' background='content.gif'><font color='#FFFFFF'><b>Manele</b></font></td><td align='right' colspan='1' background='content.gif' alt='Free Online Music Download'><font color='#FFFFFF'><b>Hits</b></font></td></tr>";
   $sql = "SELECT lid, title, date, hits, version, filesize FROM ".$prefix."_downloads_downloads WHERE cid = '2' order by date DESC limit 10";
   $result = $db->sql_query($sql);


   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace("_", " ", $row['title']);


      if ($a <= 15) {
         echo "<tr bgcolor=\"$bgcolor3\">";
         echo "<td align=\"center\"><span class=\"title\"><img src=\"http://img294.imageshack.us/img294/2172/mp3nj1.gif\"></span></td>";
                 
      } else {

         echo "<tr><td align=\"center\"></td>";
      }
      echo "<td><a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$row[lid]&amp;title=$row[title]\"><b>$title2</b></a></td>";
      echo "<td align=\"center\"></td>";
         $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   $datetime = ucfirst($datetime);
               $datetime = $row['date'];
$d_time=explode("-",$datetime);
$dt=date("d F Y", mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 

   echo "<td align=\"right\"><font color=\"red\">$row[hits]</font></td></tr>";
   }
       
        
Echo "</table>";

echo "<table cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\">\n";

  echo "<tr><td colspan='3' background='content.gif'><font color='#FFFFFF'><b>Straina</b></font></td><td align='right' colspan='1' background='content.gif' alt='Free Online Music Download'><font color='#FFFFFF'><b>Hits</b></font></td></tr>";
   $sql = "SELECT lid, title, date, hits, version, filesize FROM ".$prefix."_downloads_downloads WHERE cid = '3' order by date DESC limit 10";
   $result = $db->sql_query($sql);


   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace("_", " ", $row['title']);


      if ($a <= 15) {
         echo "<tr bgcolor=\"$bgcolor3\">";
         echo "<td align=\"center\"><span class=\"title\"><img src=\"http://img294.imageshack.us/img294/2172/mp3nj1.gif\"></span></td>";
                 
      } else {

         echo "<tr><td align=\"center\"></td>";
      }
      echo "<td><a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$row[lid]&amp;title=$row[title]\"><b>$title2</b></a></td>";
      echo "<td align=\"center\"></td>";
         $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   $datetime = ucfirst($datetime);
               $datetime = $row['date'];
$d_time=explode("-",$datetime);
$dt=date("d F Y", mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 

echo "<td align=\"right\"><font color=\"red\">$row[hits]</font></td></tr>";
   }
       
        
Echo "</table>";



echo "<table cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\">\n";

  echo "<tr><td colspan='3' background='content.gif'><font color='#FFFFFF'><b>House</b></font></td><td align='right' colspan='1' background='content.gif' alt='Free Online Music Download'><font color='#FFFFFF'><b>Hits</b></font></td></tr>";
   $sql = "SELECT lid, title, date, hits, version, filesize FROM ".$prefix."_downloads_downloads WHERE cid = '4' order by date DESC limit 10";
   $result = $db->sql_query($sql);


   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace("_", " ", $row['title']);


      if ($a <= 15) {
         echo "<tr bgcolor=\"$bgcolor3\">";
         echo "<td align=\"center\"><span class=\"title\"><img src=\"http://img294.imageshack.us/img294/2172/mp3nj1.gif\"></span></td>";
                 
      } else {

         echo "<tr><td align=\"center\"></td>";
      }
      echo "<td><a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$row[lid]&amp;title=$row[title]\"><b>$title2</b></a></td>";
      echo "<td align=\"center\"></td>";
         $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   $datetime = ucfirst($datetime);
               $datetime = $row['date'];
$d_time=explode("-",$datetime);
$dt=date("d F Y", mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 

      echo "<td align=\"right\"><font color=\"red\">$row[hits]</font></td></tr>";
   }
       
        
Echo "</table>";





echo "<table cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\">\n";

  echo "<tr><td colspan='3' background='content.gif'><font color='#FFFFFF'><b>Albume</b></font></td><td align='right' colspan='1' background='content.gif' alt='Free Online Music Download'><font color='#FFFFFF'><b>Hits</b></font></td></tr>";
   $sql = "SELECT lid, title, date, hits, version, filesize FROM ".$prefix."_downloads_downloads WHERE cid = '5' order by date DESC limit 10";
   $result = $db->sql_query($sql);


   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace("_", " ", $row['title']);


      if ($a <= 15) {
         echo "<tr bgcolor=\"$bgcolor3\">";
         echo "<td align=\"center\"><span class=\"title\"><img src=\"http://img294.imageshack.us/img294/2172/mp3nj1.gif\"></span></td>";
                 
      } else {

         echo "<tr><td align=\"center\"></td>";
      }
      echo "<td><a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$row[lid]&amp;title=$row[title]\"><b>$title2</b></a></td>";
      echo "<td align=\"center\"></td>";
         $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   $datetime = ucfirst($datetime);
               $datetime = $row['date'];
$d_time=explode("-",$datetime);
$dt=date("d F Y", mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 

      echo "<td align=\"right\"><font color=\"red\">$row[hits]</font></td></tr>";
   }
       
        
Echo "</table>";


echo "<table cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\">\n";

  echo "<tr><td colspan='3' background='content.gif'><font color='#FFFFFF'><b>Videoclipuri</b></font></td><td align='right' colspan='1' background='content.gif' alt='Free Online Music Download'><font color='#FFFFFF'><b>Hits</b></font></td></tr>";
   $sql = "SELECT lid, title, date, hits, version, filesize FROM ".$prefix."_downloads_downloads WHERE cid = '6' order by date DESC limit 10";
   $result = $db->sql_query($sql);


   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace("_", " ", $row['title']);


      if ($a <= 15) {
         echo "<tr bgcolor=\"$bgcolor3\">";
         echo "<td align=\"center\"><span class=\"title\"><img src=\"http://img294.imageshack.us/img294/2172/mp3nj1.gif\"></span></td>";
                 
      } else {

         echo "<tr><td align=\"center\"></td>";
      }
      echo "<td><a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$row[lid]&amp;title=$row[title]\"><b>$title2</b></a></td>";
      echo "<td align=\"center\"></td>";
         $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   $datetime = ucfirst($datetime);
               $datetime = $row['date'];
$d_time=explode("-",$datetime);
$dt=date("d F Y", mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 

      echo "<td align=\"right\"><font color=\"red\">$row[hits]</font></td></tr>";
   }
       
        
Echo "</table>";




 

   CloseTable();

   


   

include("footer.php");
}

switch($func) {

   case "CoolSize":
   CoolSize($size);
   break;

   default:
   Rankings();
   break;

}

?>


Thanks a lot
 
View user's profile Send private message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1122

PostPosted: Fri Nov 29, 2013 7:08 pm Reply with quote

Well, just at first sight I can see this is a very old block.

On this line u can see the first issue.

OLD and wrong prefix.

Code:
$sql = "SELECT lid, title, date, hits, version, filesize FROM ".$prefix."_downloads_downloads WHERE cid = '1' order by date DESC limit 10";


This one above must be like this. This is just an example so u understand a little bit where and why it is not working but this block is not validate it too.

Code:
$sql = 'SELECT `lid`, `title`, `date`, `hits`, `version`, `filesize` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = 1 order by `date` DESC limit 10';


but you can download the latest from Montego's site.
[ Only registered users can see links on this board! Get registered or login! ]

This is one is secure, validate and beautiful. Think about it.

Wink

Note: Take a look at the new blocks which comes with the new Download Module.
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Sat Nov 30, 2013 1:37 am Reply with quote

hicuxunicorniobestbuildpc, that is not a issue or the reason why is it not working - its all fine but its only a old way of typing code with double quotes. The prefix is not wrong - its the same working variable. He is using only an old PHP Nuke and not a Raven Nuke. BTW, Its not a block, its a module.

blastwood, i can see you have 5 catagories (cid = category id, cid 1, cid 2, cid 3, cid 4, cid 5) and you have for every catagory a own for-loop to list all files in there. Is it you wanted way of listing or what do want as result? Do you have make sure, that all 5 catagory ids are still exists in your database?

_________________
Github: RavenNuke 
View user's profile Send private message
blastwood







PostPosted: Sat Nov 30, 2013 9:46 am Reply with quote

Hi
There is not a block showing last download sites it is a whole way showing last download sites as they appear in their respective categories. as last download sites will appear after they have been loaded category, referring to the distribution of nuke me it is Raven 2.4.00

Example for module at the site is selected in index
[ Only registered users can see links on this board! Get registered or login! ]

I checked and categories to be well made ​​but have not found anything we guys all right

I have an entire module link

http://www.e-negative.net/downloads/lastadd.rar
 
hicuxunicorniobestbuildpc







PostPosted: Sat Nov 30, 2013 7:13 pm Reply with quote

neralex: I was right so I hope u apologize for trying to be the smartest when u actually didn't notice he was talking about RavenNuke but it is ok if u are behind my back trying to correct my mistakes. Very Happy

This is very clear:
Quote:
After the latest update from 2.3 to 2.4 is not working


I wonder what u are going to write after this.

killing me
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sat Nov 30, 2013 8:46 pm Reply with quote

I actually got confused when you mentioned "prefix" because I thought you were refering to $prefix and I had the same thought as neralex.
I think what you actually meant was that the table names are different. In the block code it references the table _downloads_downloads but the last release of RavenNuke (tm) uses a modified version of NSN Downloads and the table name changed to _nsngd_downloads (I think) so all that is needed is to change the table name, though I do agree, that is VERY old code, probably shouldn't be used and should be re-written to current standards.
 
View user's profile Send private message Send e-mail
neralex







PostPosted: Sun Dec 01, 2013 1:53 am Reply with quote

hicuxunicorniobestbuildpc wrote:
neralex: I was right so I hope u apologize for trying to be the smartest when u actually didn't notice he was talking about RavenNuke but it is ok if u are behind my back trying to correct my mistakes. Very Happy killing me


hicuxunicorniobestbuildpc, Learn html, css, php instead to provide so many bullshit, that would more help as your wrong pointed issues.

Start with this: [ Only registered users can see links on this board! Get registered or login! ]

Wink


blastwood, try this:

Code:
<?php

/***************************************************************************/
/* Last Add Modul                                                          */
/* ===========================                                             */
/*                                                                         */
/* Copyright (c) 2007 waZDer                                               */
/* http://www.decodari.info                                                */
/*                                                                         */
/*                                                                         */
/* Acest script este distribuit gratuit. Tu il poti distribui sau modifica */
/* cu singura conditie de a pastra drepturile de autor !                   */
/* Multumesc !                                                             */
/***************************************************************************/

if (!defined('MODULE_FILE')) die('You can\'t access this file directly...');
if (!defined('PHP_EOL')) define('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\r\n" : "\n");

require_once 'mainfile.php';
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = '';

// BEGIN: Added in v2.40.00 - Mantis Issue 0001043
$index = 0;
if (!defined('INDEX_FILE')) define('INDEX_FILE', true); // Set to FALSE to hide right blocks
if (defined('INDEX_FILE') AND INDEX_FILE===true) {
   // auto set right blocks for pre patch 3.1 compatibility
   $index = 1;
}
// END: Added in v2.40.00 - Mantis Issue 0001043

if (!isset($op)) $op = '';

switch($op) {

   case 'CoolSize':
   CoolSize($size);
   break;

   default:
   Rankings();
   break;

}

function Rankings() {
   global $prefix, $db, $bgcolor2, $bgcolor3, $content;
   include_once 'header.php';
   OpenTable();
   echo '<div style="text-align:center; font-weight:bold">::.::Ultimele Titluri Adaugate::.::</div>' , PHP_EOL
      , '<table cellpadding="0" cellspacing="0" width="100%" border="0">' , PHP_EOL
      , '<tr>' , PHP_EOL
      , '<td colspan="3" style="background:url(\'content.gif\')"><span style="color:#FFFFFF; font-weight:bold">Romaneasca</span></td>' , PHP_EOL
      , '<td colspan="1" style="background:url(\'content.gif\'); text-align:right;" title="Adaugat pe:"><span style="color:#FFFFFF; font-weight:bold">Hits</span></td>' , PHP_EOL
      , '</tr>' , PHP_EOL;
   $result = $db->sql_query('SELECT `lid`, `title`, `date`, `hits`, `version`, `filesize` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = 19 ORDER BY `date` DESC LIMIT 10');
   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace('_', ' ', $row['title']);
      $title2 = htmlspecialchars($title2, ENT_QUOTES, _CHARSET);
      if ($a <= 15) {
         echo '<tr style="background:' , $bgcolor3, '">' , PHP_EOL
            , '<td style="text-align:center"><span class="title"><img src="http://img294.imageshack.us/img294/2172/mp3nj1.gif" alt="" /></span></td>' , PHP_EOL;               
      } else {
         echo '<tr>' , PHP_EOL
            , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      }

      # neralex: not in use - why is it here?
      $content .= '<img src="images/mp3.gif" alt="" />&nbsp;' . $a . ': <a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=' . $lid . '&amp;ttitle=' . $transfertitle . '"><span style="font-weight:bold">' . $title2 . '</span></a>&nbsp;(' . $hits . ')<br />[' . $addedon . ': <span style="font-weight:bold">' . $datetime . '</span>]<br /><hr>';

        $a++;      
        $datetime = strftime(_LINKSDATESTRING, mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      $datetime = $row['date'];
      $d_time = explode('-',$datetime);
      $dt=date('d F Y', mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 
      echo '<td style="text-align:right;"><span style="color:red">' , $row['hits'] , '</span></td>' , PHP_EOL
         , '</tr>' , PHP_EOL;      
   }        
   echo '</table>' , PHP_EOL;

   echo '<table cellpadding="1" cellspacing="0" width="100%" border="0">' , PHP_EOL
      , '<tr>' , PHP_EOL
      , '<td colspan="3" style="background:url(\'content.gif\');"><span style="color:#FFFFFF; font-weight:bold">Manele</span></td>' , PHP_EOL
      , '<td colspan="1"  style="background:url(\'content.gif\'); text-align:right;" title="Free Online Music Download"><span style="color:#FFFFFF; font-weight:bold">Hits</</span></td>' , PHP_EOL
      , '</tr>' , PHP_EOL;
   $result = $db->sql_query('SELECT `lid`, `title`, `date`, `hits`, `version`, filesize` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = 2 ORDER BY `date` DESC LIMIT 10');
   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace('_', ' ', $row['title']);
      $title2 = htmlspecialchars($title2, ENT_QUOTES, _CHARSET);
      if ($a <= 15) {
         echo '<tr style="background:' , $bgcolor3 , '">' , PHP_EOL
            , '<td style="text-align:center"><span class="title"><img src="http://img294.imageshack.us/img294/2172/mp3nj1.gif" alt="" /></span></td>' , PHP_EOL;               
      } else {
         echo '<tr>' , PHP_EOL
            , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      }
      echo '<td><a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=' , $row['lid'] , '&amp;title=' , $row['title'] , '"><span style="font-weight:bold">' , $title2 , '</span></a></td>' , PHP_EOL
         , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
         $datetime = strftime(_LINKSDATESTRING, mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      $datetime = $row['date'];
      $d_time = explode("-",$datetime);
      $dt=date('d F Y', mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 
      echo '<td style="text-align:right"><span style="color:red">' , $row['hits'] , '</span></td>' , PHP_EOL
         , '</tr>' , PHP_EOL;
   }
   echo '</table>' , PHP_EOL;

   echo '<table cellpadding="1" cellspacing="0" width="100%" border="0">' , PHP_EOL
      , '<tr>' , PHP_EOL
      , '<td colspan="3" style="background:url(\'content.gif\');"><span style="color:#FFFFFF; font-weight:bold">Straina</span></td>' , PHP_EOL
      , '<td colspan="1" style="background:url(\'content.gif\'); text-align:right" title="Free Online Music Download"><span style="color:#FFFFFF; font-weight:bold">Hits</span></td>' , PHP_EOL
      , '</tr>' , PHP_EOL;
   $result = $db->sql_query('SELECT `lid`, `title`, `date`, `hits`, `version`, `filesize` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = 3 ORDER BY `date` DESC LIMIT 10');
   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace('_', ' ', $row['title']);
      $title2 = htmlspecialchars($title2, ENT_QUOTES, _CHARSET);
      if ($a <= 15) {
         echo '<tr style="background:' , $bgcolor3, '">' , PHP_EOL
            , '<td style="text-align:center"><span class="title"><img src="http://img294.imageshack.us/img294/2172/mp3nj1.gif" alt="" /></span></td>' , PHP_EOL;               
      } else {
         echo '<tr>' , PHP_EOL
            , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      }
      echo '<td><a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=' , $row['lid'] , '&amp;title=' , $row['title'] , '"><span style="font-weight:bold">' , $title2 , '</span></a></td>' , PHP_EOL
         , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      $datetime = $row['date'];
      $d_time = explode('-',$datetime);
      $dt = date('d F Y', mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 
      echo '<td style="text-align:right"><span style="color:red">' , $row['hits'] , '</span></td>' , PHP_EOL
         , '</tr>' , PHP_EOL;
   }
   echo '</table>' , PHP_EOL;

   echo '<table cellpadding="1" cellspacing="0" width="100%" border="0">' , PHP_EOL
      , '<tr>' , PHP_EOL
      , '<td colspan="3" style="background:url(\'content.gif\');"><span style="color:#FFFFFF; font-weight:bold">House</span></td>' , PHP_EOL
      , '<td colspan="1" style="background:url(\'content.gif\'); text-align:right" title="Free Online Music Download"><span style="color:#FFFFFF; font-weight:bold">Hits</span></td>' , PHP_EOL
      , '</tr>' , PHP_EOL;
   $result = $db->sql_query('SELECT `lid`, `title`, `date`, `hits`, `version`, `filesize` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = 4 ORDER BY `date` DESC LIMIT 10');
   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace('_', ' ', $row['title']);
      $title2 = htmlspecialchars($title2, ENT_QUOTES, _CHARSET);
      if ($a <= 15) {
         echo '<tr style="background:' , $bgcolor3, '">' , PHP_EOL
            , '<td style="text-align:center"><span class="title"><img src="http://img294.imageshack.us/img294/2172/mp3nj1.gif" alt="" /></span></td>' , PHP_EOL;               
      } else {
         echo '<tr>' , PHP_EOL
            , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      }
      echo '<td><a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=' , $row['lid'] , '&amp;title=' , $row['title'] , '"><span style="font-weight:bold">' , $title2 , '</span></a></td>' , PHP_EOL
         , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      $datetime = strftime(_LINKSDATESTRING, mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      $datetime = $row['date'];
      $d_time = explode('-',$datetime);
      $dt = date('d F Y', mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 
      echo '<td style="text-align:right"><span style="color:red">' , $row['hits'] , '</span></td>' , PHP_EOL
         , '</tr>' , PHP_EOL;
   }
   echo '</table>' , PHP_EOL;

   echo '<table cellpadding="1" cellspacing="0" width="100%" border="0">' , PHP_EOL
      , '<tr>' , PHP_EOL
      , '<td colspan="3" style="background:url(\'content.gif\');"><span style="color:#FFFFFF; font-weight:bold">Albume</span></td>' , PHP_EOL
      , '<td colspan="1"  style="background:url(\'content.gif\'); text-align:right" title="Free Online Music Download"><span style="color:#FFFFFF; font-weight:bold">Hits</span></td>' , PHP_EOL
      , '</tr>' , PHP_EOL;
   $result = $db->sql_query('SELECT `lid`, `title`, `date`, `hits`, `version`, `filesize` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = 5 ORDER BY `date` DESC LIMIT 10');
   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace('_', ' ', $row['title']);
      $title2 = htmlspecialchars($title2, ENT_QUOTES, _CHARSET);
      if ($a <= 15) {
         echo '<tr style="background:' , $bgcolor3, '">' , PHP_EOL
            , '<td style="text-align:center"><span class="title"><img src="http://img294.imageshack.us/img294/2172/mp3nj1.gif" alt="" /></span></td>' , PHP_EOL;               
      } else {
         echo '<tr><td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      }
      $datetime = strftime(_LINKSDATESTRING, mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      $datetime = $row['date'];
      $d_time = explode('-',$datetime);
      $dt = date('d F Y', mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0])); 
      echo '<td style="text-align:right"><span style="color:red">' , $row['hits'] , '</span></td>' , PHP_EOL
         , '</tr>' , PHP_EOL;
   }
   echo '</table>' , PHP_EOL;


   echo '<table cellpadding="1" cellspacing="0" width="100%" border="0">' , PHP_EOL
      , '<tr>' , PHP_EOL
      , '<td colspan="3" style="background:url(\'content.gif\');"><span style="color:#FFFFFF; font-weight:bold">Videoclipuri</span></td>' , PHP_EOL
      , '<td colspan="1"  style="background:url(\'content.gif\'); text-align:right" title="Free Online Music Download"><span style="color:#FFFFFF; font-weight:bold">Hits</span></td>' , PHP_EOL;
   $result = $db->sql_query('SELECT `lid`, `title`, `date`, `hits`, `version`, `filesize` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = 6 ORDER BY `date` DESC LIMIT 10');

   for ($a = 1; $row = $db->sql_fetchrow($result); $a++) {
      $title2 = ereg_replace('_', ' ', $row['title']);
      $title2 = htmlspecialchars($title2, ENT_QUOTES, _CHARSET);
      if ($a <= 15) {
         echo '<tr style="background:' , $bgcolor3, '">' , PHP_EOL
            , '<td style="text-align:center"><span class="title"><img src="http://img294.imageshack.us/img294/2172/mp3nj1.gif" alt="" /></span></td>' , PHP_EOL;               
      } else {
         echo '<tr>' , PHP_EOL
            , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      }
      echo '<td><a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=' , $row['lid'] , '&amp;title=' , $row['title'] , '"><span style="font-weight:bold">' , $title2 , '</span></a></td>' , PHP_EOL
         , '<td style="text-align:center">&nbsp;</td>' , PHP_EOL;
      $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      $datetime = $row['date'];
      $d_time = explode('-',$datetime);
      $dt = date('d F Y', mktime(0, 0, 0, $d_time[1], $d_time[2], $d_time[0]));
      echo '<td style="text-align:right"><span style="color:red">' , $row['hits'] , '</span></td>' , PHP_EOL
         , '</tr>' , PHP_EOL;
   }
   echo '</table>' , PHP_EOL;
   CloseTable();
   include_once 'footer.php';
}


Last edited by neralex on Sun Dec 01, 2013 7:15 am; edited 1 time in total 
hicuxunicorniobestbuildpc







PostPosted: Sun Dec 01, 2013 5:20 am Reply with quote

Quote:
table names are different.


Very Happy That is exactly what I wanted to say. Sorry!!! Very Happy

neralex: Cheers The file u have been converted is beautiful. Congratulation. I think lots of people can learn from this file but

Line 196 is wrong

Code:
$result = $db->sql_query('SELECT `lid`, `title`, `date`, `hits`, `version`, `filesize` FROM `' . $prefix . '_downloads_downloads` WHERE `cid` = 6 ORDER BY `date` DESC LIMIT 10');


Must be

Code:
$result = $db->sql_query('SELECT `lid`, `title`, `date`, `hits`, `version`, `filesize` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = 6 ORDER BY `date` DESC LIMIT 10');


Wink
 
neralex







PostPosted: Sun Dec 01, 2013 7:18 am Reply with quote

... play basketball please but stay away from a computer!
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sun Dec 01, 2013 7:53 am Reply with quote

If Blastwood is using RN 2.4, it would still have the standard nuke downloads prefix. NSNGD was not added until 2.5. Also, You should consider upgrading to 2.51 so you will not have issues when your host switches to PHP 5.4 and to make it easier to use RavenCMS 3 when it is released.

_________________
Tricked Out News

Last edited by nuken on Sun Dec 01, 2013 3:55 pm; edited 1 time in total 
View user's profile Send private message Send e-mail Visit poster's website
Guardian2003







PostPosted: Sun Dec 01, 2013 9:08 am Reply with quote

nuken wrote:
If Blastwood is using RN 2.4, it would still have the standard nuke downloads prefix. NSNGD was not added until 2.5. Also, You should consider upgrading to 2.51 so you will not have issues when you host switches to PHP 5.4 and to make it easier to us RavenCMS 3 when it is released.

[Like]
 
hicuxunicorniobestbuildpc







PostPosted: Sun Dec 01, 2013 10:39 am Reply with quote

Quote:
... play basketball please but stay away from a computer!


Of course I love playing basketball, baseball, chess and computers, that is why I am in shape but I love computers as well. I will never stay away from the computer. U must accept your mistakes otherwise u will never grow up as a person. That is my suggestion. Wink

Anyway I hope this file works for blastwood...
 
blastwood







PostPosted: Sun Dec 01, 2013 4:52 pm Reply with quote

Hey
Please do not argue, are all good in php, or much better than me Smile

I inserted the code in my page and I changed the line
Code:
  $ prefix. '_nsngd_downloads `WHERE` cid `= 3 ORDER BY` date `DESC LIMIT 10')
in
Code:
$ prefix. '_downloads_downloads `WHERE` cid `= 3 ORDER BY` date `DESC LIMIT 10')

]that give Raven Nuke 2.40.0 module uses the original download from PHP Nuke but still does not work, rather it recognizes something, this is not ploblem put CSS code not done. I attach some pictures to see what it is



Image
Image
 
hicuxunicorniobestbuildpc







PostPosted: Sun Dec 01, 2013 5:29 pm Reply with quote

I guess u post 2 sites but I guess u are talking about this one
[ Only registered users can see links on this board! Get registered or login! ] where Ravennuke is installed.


Let's talk about the 10 errors you have(Validation is very important from me and should be for u as well)

This one

Code:
<!-----  is using WebHost-V1, a free theme wth GPL/GNU license, for more information regarding  please contact . ----->


Should be like this

Code:
<!--  is using WebHost-V1, a free theme wth GPL/GNU license, for more information regarding  please contact. -->


This one where left is not recognized

Code:
<td class="text_normal" bgcolor="#F3F3F3" width="425"><div align="left"><font class="content"><left><img src="images/mp3.gif">&nbsp;1: <a href="downloadview-details-299-Vescan_feat._Kamelia_-_Piesa_mea_preferata.html"><b>Vescan feat. Kamelia - Piesa mea preferata</b></a>&nbsp;(21)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;2: <a href="downloadview-details-298-Phoenix_-_Andrii_Popa.html"><b>Phoenix - Andrii Popa</b></a>&nbsp;(7)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;3: <a href="downloadview-details-297-Mircea_Rusu_Band_-_Omul_bun_si_pomul_copt.html"><b>Mircea Rusu Band - Omul bun si pomul copt</b></a>&nbsp;(5)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;4: <a href="downloadview-details-296-Madalina_Manole_-_Stai_langa_mine_mama.html"><b>Madalina Manole - Stai langa mine mama</b></a>&nbsp;(3)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;5: <a href="downloadview-details-295-Liviu_Vasilica_-_M&.html#259;rine_la_nunta_ta"><b>Liviu Vasilica - Mărine la nunta ta</b></a>&nbsp;(20)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;6: <a href="downloadview-details-294-Ritm_-_Famfara_Roland_.html"><b>Ritm - Famfara Roland </b></a>&nbsp;(4)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;7: <a href="downloadview-details-293-Ritm_-_muzica_folck_Roland.html"><b>Ritm - muzica folck Roland</b></a>&nbsp;(1)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;8: <a href="downloadview-details-292-Toba_G-800_-Suleyman.html"><b>Toba G-800 -Suleyman</b></a>&nbsp;(1)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;9: <a href="downloadview-details-291-Colaj_ritmuri_Roland_G600.html"><b>Colaj ritmuri Roland G600</b></a>&nbsp;(3)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center><left><img src="images/mp3.gif">&nbsp;10: <a href="downloadview-details-290-Colaj_ritmuri_Roland_G80.html"><b>Colaj ritmuri Roland G80</b></a>&nbsp;(4)<br>[Adaugat pe: <b>01-Dec-2013</b>]<br><hr></center></font></div></td>


I think you have more files from that specific old Download module which belongs to admin which we didn't see yet.

I recommend you to upgrade to the latest Ravennuke or zip all the files so we can take a look here...

I download this file.
[ Only registered users can see links on this board! Get registered or login! ]

and it looks like it is working properly. Please be more specific.
 
Guardian2003







PostPosted: Sun Dec 01, 2013 6:02 pm Reply with quote

That theme is not wide enough to display the module correctly with the right side blocks the width that they are. Regardless of the W3C validation errors that hicux mentioned, you are either going to have to modify the module or make the theme wider or make the right blocks narrow.
Try viewing the pages using one of the installed themes like RavenIce.
 
blastwood







PostPosted: Mon Dec 02, 2013 1:05 pm Reply with quote

We selected a theme from Ravenuke and still does not work
No matter the theme, for example if I loose the right to block such broad and pagina.Theme is made by me: D I did it with the knowledge of PHP Nuke Romania. Download page and main page download module looks better than new module download

Regarding the W3 validation document and I'll fix you ploblem


Thanks a lot for your support.
 
hicuxunicorniobestbuildpc







PostPosted: Mon Dec 02, 2013 7:06 pm Reply with quote

Quote:
We selected a theme from Ravenuke and still does not work


Please stop saying it is not working. If you don't give us enough information nobody will be able to help u.

Open rnconfig.php where mainfile.php is

Search for

Code:
$loglevel = 0;


Activate error system with 1 so make like this:

Code:
$loglevel = 1;


After that go to rnlogs

and open dblog file and copy and paste the specific errors u are getting.

Rolling Eyes
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Modules

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 ©