|
problème avec le module download3000 |
|
Régulier
Inscrit: 15/05/2004 10:17
|
bonsoir, j'ai découvert ce petit module sympas, je suis en train de le traduire, mais j'ai trois erreurs que je n'arrive pas à corriger ces trois erreurs sont les suivantes: 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> $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;
}
Si quelqu'un a une idée?
Posté le : 31/01/2007 18:46
|
_________________
Rien ne sert de courir, nan rien...............
|
|
Re: gros probleme cbb3.08 |
|
Régulier
Inscrit: 15/05/2004 10:17
|
Il faudrait lire tout le topic avant de répondre, mais pas que le dernier post. Le problème est que tout est entièrement traduit et que seul transfert ne passe qu'en anglais malgrés la traduction. Le problème vient certainement du code php pour le branchement sur la langue.
Posté le : 28/01/2007 16:19
|
_________________
Rien ne sert de courir, nan rien...............
|
|
Re: gros probleme cbb3.08 |
|
Régulier
Inscrit: 15/05/2004 10:17
|
ben voilà, c cool Reste plus qu'a régler le problème de "transfert" qui reste désespérément en anglais. Si quelqu'un à une idée?
Posté le : 16/01/2007 16:36
|
_________________
Rien ne sert de courir, nan rien...............
|
|
Re: CBB 3.08 et affichage date et heure |
|
Régulier
Inscrit: 15/05/2004 10:17
|
Il y a déjà une réponse à ce sujet dans ce cette discution
Posté le : 12/01/2007 22:03
|
_________________
Rien ne sert de courir, nan rien...............
|
|
Re: gros probleme cbb3.08 |
|
Régulier
Inscrit: 15/05/2004 10:17
|
Pour moi ca marche, mais dans le répertoire Frameworks/xoops22/language/french, il ya maintenant trois fichiers: Local.php
<?php
/**
* Xoops multi-language string and encoding handling class
*
* @copyright The XOOPS project http://www.xoops.org/
* @license http://www.fsf.org/copyleft/gpl.html& ... public license
* @package language
* @version $Id: local.php 108 2006-03-23 17:41:10Z phppp $
* @author D.J. (phppp)
* @since 2.2
*/
// !!IMPORTANT!! insert '' before any char among reserved chars: "a", "A", "B", "c", "d", "D", "F", "g", "G", "h", "H", "i", "I", "j", "l", "L", "m", "M", "n", "O", "r", "s", "S", "t", "T", "U", "w", "W", "Y", "y", "z", "Z"
// insert double '' before 't', 'r', 'n'
if(!defined("_YEARMONTHDAY")) {
define("_TODAY", "Aujou\rd'hui G:i:s");
define("_YESTERDAY", "Hie\r G:i:s");
define("_MONTHDAY", "d/m H:i:s");
define("_YEARMONTHDAY", "d/m/Y H:i");
}
define("_ELAPSE_DAYS", "Il y a %d jour(s)");
define("_ELAPSE_HOURS", "Il y a %d heure(s)");
define("_ELAPSE_MINUTES", "Il y a %d minute(s)");
define("_TIMEFORMAT_DESC", "Formats valides: "s" - "._SHORTDATESTRING."; "m" - "._MEDIUMDATESTRING."; "l" - "._DATESTRING.";<br />".
""c" or "custom" - format determined according to interval to present; "e" - Elapsed; "mysql" - Y-m-d H:i:s;<br />".
"specified string - Refer to <a href="http://php.net/manual/en/function.date.php" target="_blank">PHP manual</a>."
);
require_once dirname(dirname(__FILE__))."/english/local.class.php";
/**
* The class should be an abstract one using PHP embedded functions
* based on which,
* each local language defines its own equalient methods
*
* A comprehensive handler is expected in Xoops 2.3 or 2.4
*/
class XoopsLocal extends XoopsLocalEnglish
{
}
?>
tu as aussi local.class.php
<?php
/**
* Xoops multi-language string and encoding handling class
*
* @copyright The XOOPS project http://www.xoops.org/
* @license http://www.fsf.org/copyleft/gpl.html& ... public license
* @package language
* @version $Id: local.php 108 2006-03-23 17:41:10Z phppp $
* @author D.J. (phppp)
* @since 2.2
*/
/**
* The class should be an abstract one using PHP embedded functions
* based on which,
* each local language defines its own equalient methods
*
* A comprehensive handler is expected in Xoops 2.3 or 2.4
*/
class XoopsLocalEnglish
{
// localized substr
function substr($str, $start, $length, $trimmarker = '...')
{
if ( !XOOPS_USE_MULTIBYTES ) {
return ( strlen($str) - $start <= $length ) ? substr( $str, $start, $length ) : substr( $str, $start, $length - strlen($trimmarker) ) . $trimmarker;
}
if (function_exists('mb_internal_encoding') && @mb_internal_encoding(_CHARSET)) {
$str2 = mb_strcut( $str , $start , $length - strlen( $trimmarker ) );
return $str2 . ( mb_strlen($str)!=mb_strlen($str2) ? $trimmarker : '' );
}
return $str;
}
// Each local language should define its own equalient utf8_encode
function utf8_encode($text)
{
return utf8_encode($text);
}
function convert_encoding($text, $to = 'utf-8', $from = '')
{
if(empty($text)) {
return $text;
}
if(empty($from)) $from = empty($GLOBALS["xlanguage"]['charset_base']) ? _CHARSET : $GLOBALS["xlanguage"]['charset_base'];
if (empty($to) || !strcasecmp($to, $from)) return $text;
if(XOOPS_USE_MULTIBYTES && function_exists('mb_convert_encoding')) $converted_text = @mb_convert_encoding($text, $to, $from);
else
if(function_exists('iconv')) $converted_text = @iconv($from, $to . "//TRANSLIT", $text);
$text = empty($converted_text) ? $text : $converted_text;
return $text;
}
function trim($text)
{
$ret = trim($text);
return $ret;
}
/**
* Get description for setting time format
*/
function getTimeFormatDesc()
{
return _TIMEFORMAT_DESC;
}
/**
* Function to display formatted times in user timezone
*
* Setting $timeoffset to null (by default) will skip timezone calculation for user, using default timezone instead, which is a MUST for cached contents
*/
function formatTimestamp($time, $format = "l", $timeoffset = null)
{
global $xoopsConfig, $xoopsUser;
if(strtolower($format) == "rss" ||strtolower($format) == "r"){
$TIME_ZONE = "";
if(!empty($GLOBALS['xoopsConfig']['server_TZ'])){
$server_TZ = abs(intval($GLOBALS['xoopsConfig']['server_TZ'] * 3600.0));
$prefix = ($GLOBALS['xoopsConfig']['server_TZ'] < 0) ? " -" : " +";
$TIME_ZONE = $prefix.date("Hi", $server_TZ);
}
$date = gmdate("D, d M Y H:i:s", intval($time)) . $TIME_ZONE;
return $date;
}
// disable user timezone calculation and use default timezone,
// for cache consideration
if($timeoffset === null) {
$timeoffset = ($xoopsConfig['default_TZ'] == '') ? '0.0' : $xoopsConfig['default_TZ'];
}
$usertimestamp = xoops_getUserTimestamp($time, $timeoffset);
switch (strtolower($format)) {
case 's':
$datestring = _SHORTDATESTRING;
break;
case 'm':
$datestring = _MEDIUMDATESTRING;
break;
case 'mysql':
$datestring = "Y-m-d H:i:s";
break;
case 'rss':
$datestring = "r";
break;
case 'l':
$datestring = _DATESTRING;
break;
case 'e':
case 'elapse':
static $current_timestamp;
if(!isset($current_timestamp)) {
$current_timestamp = xoops_getUserTimestamp(time(), $timeoffset);
}
$elapse = $current_timestamp - $usertimestamp;
if( $days = floor( $elapse / (24 * 3600) ) ) {
$ret = sprintf(_ELAPSE_DAYS, $days);
}elseif( $hours = floor( ( $elapse % (24 * 3600) ) / 3600 ) ) {
$ret = sprintf(_ELAPSE_HOURS, $hours);
}else {
$minutes = floor( ( $elapse % (24 * 60) ) / 60 );
$ret = sprintf(_ELAPSE_MINUTES, $minutes);
}
return $ret;
break;
case 'c':
case 'custom':
static $current_timestamp, $today_timestamp, $monthy_timestamp;
if(!isset($current_timestamp)) {
$current_timestamp = xoops_getUserTimestamp(time(), $timeoffset);
}
if(!isset($today_timestamp)) {
$today_timestamp = mktime(0, 0, 0, date("m", $current_timestamp), date("d", $current_timestamp), date("Y", $current_timestamp));
}
if($usertimestamp >= $today_timestamp) {
$datestring = _TODAY;
}elseif($usertimestamp >= $today_timestamp - 24*60*60) {
$datestring = _YESTERDAY;
}else {
if(!isset($monthy_timestamp)) {
$monthy_timestamp = mktime(0, 0, 0, 0, 0, date("Y", $current_timestamp));
}
if($usertimestamp >= $monthy_timestamp) {
$datestring = _MONTHDAY;
}else{
$datestring = _YEARMONTHDAY;
}
}
break;
default:
if ($format != '') {
$datestring = $format;
} else {
$datestring = _DATESTRING;
}
break;
}
return ucfirst(date($datestring, $usertimestamp));
}
// adding your new functions
// calling the function:
// Method 1: echo xoops_local("hello", "Some greeting words");
// Method 2: echo XoopsLocal::hello("Some greeting words");
function hello($text)
{
$ret = "<div>Salut, ".$text."</div>";
return $ret;
}
}
?>
et user.php que j'ai pas encore traduit. Pour que la nouvelle versin fonctionne bien, il faut tout traduire dans le Frameworks. Même avec ca, j'ai encore des problèmes de trad avec la partie transfert qui me le donne en english alors qu'il y à les trads french.De plus le html ne marche pas correctement dans les postes.
Posté le : 10/01/2007 07:22
|
_________________
Rien ne sert de courir, nan rien...............
|
|
Re: wfdownloads avec titre de page et meta keywords et description |
|
Régulier
Inscrit: 15/05/2004 10:17
|
tu as fait sur quelle version de wfdownloads?
Posté le : 08/01/2007 11:21
|
_________________
Rien ne sert de courir, nan rien...............
|
|
Re: hack derniers téléchargements wfdownload et page d'index |
|
Régulier
Inscrit: 15/05/2004 10:17
|
Je le sai, mais je ne veux pas mettre le bloc.
Posté le : 12/12/2006 13:00
|
_________________
Rien ne sert de courir, nan rien...............
|
|
hack derniers téléchargements wfdownload et page d'index |
|
Régulier
Inscrit: 15/05/2004 10:17
|
Je cherche à intégrer les derniers téléchargements ou mises à jour directement sous les catégories dans la page d'index de wfdownload 3.1, j'en avai trouvé un pour la version 2.5, mais pas applicable à la dernière version. Si quelqu'un à une idée.
Posté le : 12/12/2006 11:28
|
_________________
Rien ne sert de courir, nan rien...............
|
|
Re: Probleme Upload My Album - Recherche dans les centaines de sujet a ete effectue ... |
|
Régulier
Inscrit: 15/05/2004 10:17
|
Le problème vient peut être de là, sur l'ancien serveur, la variable était vide.
directive PHP 'open_basedir': /home/httpd/vhosts/hdcovers-dvd.com/httpdocs:/tmp
Posté le : 07/11/2006 20:00
|
_________________
Rien ne sert de courir, nan rien...............
|
|
Re: Probleme Upload My Album - Recherche dans les centaines de sujet a ete effectue ... |
|
Régulier
Inscrit: 15/05/2004 10:17
|
A mon avis, c'est plutôt un problème php.ini, tu doits avoir l'upload de fichiers interdit
Posté le : 07/11/2006 12:01
|
_________________
Rien ne sert de courir, nan rien...............
|
|