Aide sur problème php SVP !

Réduire
X
 
  • Filtrer
  • Heure
  • Afficher
Tout effacer
nouveaux messages

  • jisse03
    a répondu
    Re : Aide sur problème php SVP !

    Sans avoir l'autorisation de l'auteur du module, je ne peux diffuser mes modifications (en fait une réécriture quasi complète du module) pour contourner les limitations actuelles de l'API Yahoo

    Laisser un commentaire:


  • Bingham
    a répondu
    Re : Aide sur problème php SVP !

    Excellente idée Jisse,

    Je voulais essayer de le faire, mais j'ai cru lire que l'api yweather était intraduisible,
    Enfin je ne sais pas trop, en tout cas ce serait super si vous pouviez le traduire,

    http://developer.yahoo.com/forum/Gen...e-3503b8ea3d07

    Cordialement,

    Laisser un commentaire:


  • jisse03
    a répondu
    Re : Aide sur problème php SVP !

    Le module se traduit comme tout module standard Joomla!, en francisant les chaînes

    Je vais demander l'autorisation aux auteurs de diffuser ma version francisée de ce module, et même leur soumettre pour validation.

    Laisser un commentaire:


  • Bingham
    a répondu
    Re : Aide sur problème php SVP !

    Bonjour,

    Merci mais nous restons devant le même problème,
    Les données viennent de yahoo, et le module est en anglais,

    Cordialement,

    Laisser un commentaire:


  • jisse03
    a répondu
    Re : Aide sur problème php SVP !

    Bonjour,

    Il existe un module Joomla! qui fait ça très bien sans devoir bricoler du code dans un iFrame: http://extensions.joomla.org/extensi...orecasts/16769

    Laisser un commentaire:


  • Bingham
    a crée un sujet Aide sur problème php SVP !

    Aide sur problème php SVP !

    Bonjour,

    J’ai un script météo yweather que j’affichais sans problème dans un module en l’appelant dans un iframe,

    Puisque yahoo déclare que son Api était juste en anglais et qu’elle était malheureusement intraduisible, j’ai alors pensé enlever les date en anglais et introduire les date en français par le biais d’autre script que j’y ai intégré, le problème est que l’ensemble fonctionne très bien mais crée un conflit et ma page se retrouve chamboulée, le reste des modules ne s’affichent plus.

    Ce serait sympa si quelqu’un pouvait me dire quelle erreur j’ai faite ou ce qui cloche lorsque j’introduis le script des dates en français.

    Le code initial qui fonctionnait très bien :
    Code PHP:
    <?php
    include('weather.class.5day.php');
    /*  ====================  Config Section  ====  */
    $zip "FRXX0055";                        // Input your zip or country code
    define('DEFAULT_UNITS'"c");            // f=Fahrenheit, c=Celsius
    define('IMAGES''icons/sm/');            // Input your icon folder location
    /*  ====  End Config Section  ================  */
    if($zip != '')
    {
        if (isset(
    $_GET['units'])) {$s_unit_of_measure strtolower($_GET['units']);}
        else {
    $s_unit_of_measure DEFAULT_UNITS;}
        
    $weather = new Weather();
        
    $weather $weather->getWeather($zip$s_unit_of_measure);
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>php Yahoo Weather Widget</title>
    <style type="text/css">
    ...
    </style>
    </head>
    <body>
    <table align="center">
      <tr>
        <td class="location" colspan="5"><span>Lyon</span></td>
      </tr>
      <tr valign="top">
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][0]['high'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][1]['high'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][2]['high'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][3]['high'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][4]['high'?></strong></span><br /></td>
      </tr>
      <tr valign="top">
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][0]['low'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][1]['low'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][2]['low'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][3]['low'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][4]['low'?></strong></span><br /></td>
      </tr>
      <tr valign="top">
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][0]['image'?>" alt="php Yahoo Weather Widget" /></td>
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][1]['image'?>" alt="php Yahoo Weather Widget" /></td>
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][2]['image'?>" alt="php Yahoo Weather Widget" /></td>
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][3]['image'?>" alt="php Yahoo Weather Widget" /></td>
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][4]['image'?>" alt="php Yahoo Weather Widget" /></td>
      </tr>
    </table>
    </body>
    </html>
    Le code que j'essaye d'ajouter pour afficher les dates en français :
    Code PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Document sans nom</title>
    </head>
    <body>
    <table id="dateJour">
        <tbody>
            <tr>
                <?php
                $dayNames 
    = array('Dim''Lun''Mar''Mer''Jeu''Ven''Sam');
                
    $dataw date('w');
                for( 
    $i $i $i++ ) {
                    echo 
    '<td>' $dayNames[($i+$dataw)%7] . '</td>';
                }
                
    ?>
            </tr>
        </tbody>
    </table>
    </body>
    </html>
    J'ai essayé de changer les variables "i" et "w" pensant qu'elles posaient problème, mais sans résultat.

    Le code final qui fonctionne bien mais qui chamboule le reste de la page :
    Code PHP:
    <?php
    include('weather.class.5day.php');
    /*  ====================  Config Section  ====  */
    $zip "FRXX0055";                        // Input your zip or country code
    define('DEFAULT_UNITS'"c");            // f=Fahrenheit, c=Celsius
    define('IMAGES''icons/sm/');            // Input your icon folder location
    /*  ====  End Config Section  ================  */
    if($zip != '')
    {
        if (isset(
    $_GET['units'])) {$s_unit_of_measure strtolower($_GET['units']);}
        else {
    $s_unit_of_measure DEFAULT_UNITS;}
        
    $weather = new Weather();
        
    $weather $weather->getWeather($zip$s_unit_of_measure);
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>php Yahoo Weather Widget - Demo 3</title>
    <style type="text/css">
    ...
    </style>
    </head>
    <body>
    <table align="center">
      <tr>
        <td class="location" colspan="5"><span>Lyon</span></td>
      </tr>
      <tr>
        <?php
        $dayNames 
    = array('Dim''Lun''Mar''Mer''Jeu''Ven''Sam');
        
    $dataz date('z');
        for( 
    $j $j $j++ ) {
            echo 
    '<td>' $dayNames[($j+$dataz)%7] . '</td>';
        }
        
    ?>
      </tr>
      <tr valign="top">
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][0]['high'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][1]['high'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][2]['high'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][3]['high'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#FFCC00;">Max: <strong><?php echo $weather['forecast'][4]['high'?></strong></span><br /></td>
      </tr>
      <tr valign="top">
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][0]['low'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][1]['low'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][2]['low'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][3]['low'?></strong></span><br /></td>
        <td class="weather" width="25%"><span style="color:#33FF99;">Min: <strong><?php echo $weather['forecast'][4]['low'?></strong></span><br /></td>
      </tr>
      <tr valign="top">
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][0]['image'?>" alt="php Yahoo Weather Widget" /></td>
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][1]['image'?>" alt="php Yahoo Weather Widget" /></td>
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][2]['image'?>" alt="php Yahoo Weather Widget" /></td>
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][3]['image'?>" alt="php Yahoo Weather Widget" /></td>
        <td class="weather" width="25%"><img src="<?php echo $weather['forecast'][4]['image'?>" alt="php Yahoo Weather Widget" /></td>
      </tr>
    </table>
    </body>
    </html>
    Par avance, merci.
    Dernière édition par Bingham à 18/03/2012, 17h54

Annonce

Réduire
Aucune annonce pour le moment.

Partenaire de l'association

Réduire

Hébergeur Web PlanetHoster
Travaille ...
X