1
xavhmn
problem with the module download3000
  • 2007/1/31 22:19

  • xavhmn

  • Just popping in

  • Posts: 23

  • Since: 2004/11/16


good evening, I discovered this small module cool, I am translating it in french, but I have three errors which

I do not manage to correct these three errors are as follows:
Notice: Undefined offset: 2 in file ....modules/download3000/index.php line 268

Notice: Undefined offset: 1 in file ....modules/download3000/index.php line 268


Notice: Undefined offset: 150 in file ....modules/download3000/index.php line 312


function ShowAll() {
   global 
$d3000_url$affiliate_id$module_name$bgcolor2;
   
$lines ReadContent("$d3000_url/rss/rss_d3000.php?op=showall");
   
// include_once(XOOPS_ROOT_PATH.'/header.php');
   
   
NavBar(_MD_DOWNLOAD3000_CATEGORIES);
   echo 
"<table border=0><tr><td valign=top>n";
   
$oldcat "";
   
$i 0;
   
$cnt 0;
   foreach (
$lines as $line) {
      if (
substr($line,0,1) == "%") {
        
$line substr($line,1,-1);
        list(
$a[$i][1],$a[$i][3]) = explode("|",$line);
        
$a[$i][0] = "";
        
$catname $a[$i][1];
        
$a[$i][2] = "";
      } else {
           [
b][color=FF3300]list($a[$i][2],$a[$i][0],$a[$i][3]) = explode("|",$line); [/color][/b]
           
$a[$i][1] = $catname;
      }
      
$i++;
   }

   echo 
"<table border=0>";
   
$base round(count($a)/2);
   
$i 0;

   while (
$cnt 5) {
     if (
$oldcat != $a[$i][1]) {
       
$cnt++;
       if (
$cnt == 5) break;
       echo 
"<tr><td bckground="images/back_sb.gif" width="213" height="18">";
       if (
$cnt != 1) echo "<br />";
       echo 
"<a href='index.php?op=showcategory&id=".$a[$i][3]."'><font face="Arial,verdana" size="3" color="#000000"><u><b>".$a[$i][1]."</b></u></font></a></td></tr>";
       
$oldcat $a[$i][1];
     }
     echo 
"<tr><td>n";
     echo 
"<a href="index.php?op=showarticles&id=".$a[$i][0]."&from=1">".$a[$i][2]."n</a>"
         
."</td></tr>";
     
$i++;
   }
   echo 
"</table></td><td valign=top><table border=0>";
   
$y count($a) - round(count($a)/2);
   
$cnt 0;
   while (
$cnt 4) {
     if (
$oldcat != $a[$i][1]) {
       
$cnt++;
       if (
$cnt == 4) break;
       echo 
"<tr><td bckground="images/back_sb.gif" width="213" height="18">";
       if (
$cnt != 1) echo "<br />";
       echo 
"<a href='index.php?op=showcategory&id=".$a[$i][3]."'><font face="Arial,verdana" size="3" color="#000000"><u><b>".$a[$i][1]."</b></u></font></a></td></tr>";
       
$oldcat $a[$i][1];
     }
     echo 
"<tr><td>n";
     echo 
"<a href="index.php?op=showarticles&id=".$a[$i][0]."&from=1">".$a[$i][2]."</a>n"
         
."</td></tr>";
     
$i++;
   }
   
$cnt 0;
   echo 
"</table></td><td valign=top><table border=0>";
   while (
$cnt 4) {
     [
b][color=FF9900]if ($oldcat != $a[$i][1]) {[/color][/b]
       
$cnt++;
       if (
$cnt == 4) break;
       echo 
"<tr><td bckground="images/back_sb.gif" width="213" height="18">";
       if (
$cnt != 1) echo "<br />";
       echo 
"<a href='index.php?op=showcategory&id=".$a[$i][3]."'><font face="Arial,verdana" size="3" color="#000000"><u><b>".$a[$i][1]."</b></u></font></a></td></tr>";
       
$oldcat $a[$i][1];
     }
     echo 
"<tr><td>n";
     echo 
"<a href="index.php?op=showarticles&id=".$a[$i][0]."&from=1">".$a[$i][2]."</a>n"
         
."</td></tr>";
     
$i++;
   }
   echo 
"</table>";
   echo 
"</td></tr></table>n";
   
// DO NOT REMOVE THE FOLLOWING POWERED BY LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
   // PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
   
PoweredBy();
   
   
// include_once(XOOPS_ROOT_PATH."/footer.php");
}
//#############################################################################
function showcategory($id) {
global 
$d3000_url,$affiliate_id,$module_name,$maxarticles,$bgcolor2;
   if (!isset(
$sort) || ($sort == "")) $sort "date";
   
$lines ReadContent("$d3000_url/rss/rss_d3000.php?op=showcategory&id=$id");
   
// include_once(XOOPS_ROOT_PATH.'/header.php');
   
   
NavBar(_MD_DOWNLOAD3000_CATEGORY." : ".$lines[0]);
   
//title("Category : ".$lines[0]);
   
$i 1;
   echo 
"<a href='index.php?op=showall'><b>"._MD_DOWNLOAD3000_ALLCAT."...</b></a><br /><br />n";
   while(
substr($lines[$i],0,1) == "%") {
      
$lines[$i] = substr($lines[$i],1);
      list(
$catname,$cat_id) = explode("|",$lines[$i]);
      echo 
"<a href='index.php?op=showarticles&id=$cat_id&from=1'><b>$catname</b></a><br />";
      
$i++;
   }
   echo 
"<br /><br />";
   echo 
"<b>"._MD_DOWNLOAD3000_LATESTADDITIONS."</b><hr>";
   echo 
"<table width=100% border=0 cellpadding=0>";
   for (
$i=$i;$i<count($lines);$i++) {
     if (
$i == 1) {
       
$subcats explode("|",$lines[$i]);
     }
     else {
       list(
$title,$pid,$release,$desc_45,$size,$license,$os,$regnow_id,$new) = explode("|",$lines[$i]);
       if (
$new == 1$new "<font color=#FF0000>"._MD_DOWNLOAD3000_NEW."</font>";
                   else 
$new "<font color=#009F00>"._MD_DOWNLOAD3000_UPD."</font>";
       echo 
"<tr><td>$new <a href='$d3000_url/article-$pid.html'>$title</a></td><td align=right>$release</td></tr>n";
       echo 
"<tr><td colspan=2>$desc_45</td></tr>n";
       echo 
"<tr><td colspan=2><table width=100% border=0>";
         echo 
"<tr><td width=15% nowrap><b>"._MD_DOWNLOAD3000_SIZE.":</b>&nbsp;$size kb</td>";
         if (
$license == 'fr'$license "<font color=#009F00>"._MD_DOWNLOAD3000_FREEWARE."</font>";
         if (
$license == 'ad'$license "<font color=#009F00>"._MD_DOWNLOAD3000_ADWARE."</font>";
         if (
$license == 'sh'$license "<font color=#FF0000>"._MD_DOWNLOAD3000_SHAREWARE."</font>";
         if (
$license == 'co'$license "<font color=#FF0000>"._MD_DOWNLOAD3000_COMMERCIAL."</font>";
         if (
$license == 'de'$license "<font color=#FF0000>"._MD_DOWNLOAD3000_DEMO."</font>";
         if (
$license == 'da'$license "<font color=#FF0000>"._MD_DOWNLOAD3000_DATAONLY."</font>";
         echo 
"<td width=25% nowrap><b>"._MD_DOWNLOAD3000_LICENSE.":</b> $license</td>";
         echo 
"<td width=38%><table cellpadding=1 cellspacing=0 border=0><tr><td><b>"._MD_DOWNLOAD3000_OS.": </b></td><td><img src="images/winflag.gif" title="windows software"></td><td>$os</td></tr></table></td>";
         echo 
"<td width=22% align=right>";
         if (
$regnow_id != "" && $regnow_id != 0) echo " <a href='https://www.regnow.com/softsell/nph-softsell.cgi?item=$regnow_id&affiliate=$affiliate_id'><img src='images/buynow.gif' border=0 title='Buy Now!'></a><img src='images/space.gif' height='2'> ";
         echo 
"<a href="$d3000_url/download-count-reg-$pid.html" title="Download $title"><img src="images/downloadsmall.gif" border=0></a></td>";
         echo 
"</tr>";
       echo 
"</table></td></tr>n";
       echo 
"<tr><td colspan=2 height=1 bgcolor='$bgcolor2'><img src="images/blank.gif" border=0 height=1></td></tr>n";
     }
   }
   echo 
"</table>";
   
// DO NOT REMOVE THE FOLLOWING POWERED BY LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
   // PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
   
PoweredBy();
   
   
// include_once(XOOPS_ROOT_PATH."/footer.php");
}
//#############################################################################
switch ($op) {

    default:
      
showall();
    break;

    case 
"showarticles":
      
showarticles($id,$from,$sort);
    break;

    case 
"showcategory":
      
showcategory($id);
    break;

    case 
"shownews":
      
shownews();
    break;

    case 
"showtop20":
      
showtop20();
    break;

}


If somebody has an idea?

2
xavhmn
Re: problem with the module download3000 (fixed)
  • 2007/2/5 11:25

  • xavhmn

  • Just popping in

  • Posts: 23

  • Since: 2004/11/16


I have solved the problems of bearing of php-nuke towards xoops, remains me more than has to make a cleaning of the code and you will have a new module

to see the module in action Made a small turn by this address

3
carnuke
Re: problem with the module download3000 (fixed)
  • 2007/2/5 16:50

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Are you going to make this module available for us to try out here?
http://houseofstrauss.co.uk Resource for alternative health and holistic lifestyle
search xoops

4
xavhmn
Re: problem with the module download3000 (fixed)
  • 2007/2/5 17:33

  • xavhmn

  • Just popping in

  • Posts: 23

  • Since: 2004/11/16


yes, soon, I makes the de-dusting of my comments and useless lines of codes

Login

Who's Online

126 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 126


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits