Discussie forum over Cumulus software. Voor vragen, specificaties, ervaringen etc..
Door jwruitenberg
#52807
Even een vraag:

Ik heb het probleem dat de windrichting in de Engelse versie te zien is, dus bijvoorbeeld SSW. Nou zie ik op Het weer actueel gewoon ZZW staan in plaats van SSW. Kan iemand mij vertellen hoe ik dat om kan zetten? Zowel voor mijn site als voor de automatische melding via twitter?

Met vriendelijke groet,

Jan Willem
Door nolversteeg
#52810
zoiets

Code: Selecteer alles
<?php

$ok = false;
if ($windDirection == "N" ) {$windDirectionn="Noord";$ok = true; }
if ($windDirection == "NNE") {$windDirectionn="NNO";$ok = true;}
if ($windDirection == "NE" ) {$windDirectionn="N0";$ok = true;}
if ($windDirection == "ENE" ) {$windDirectionn="ONO";$ok = true;}
if ($windDirection == "E" ) {$windDirectionn="Oost";$ok = true;}
if ($windDirection == "ESE") {$windDirectionn="OZO";$ok = true;}   
if ($windDirection == "SE" ) {$windDirectionn="ZO";$ok = true;}   
if ($windDirection == "SSE" ) {$windDirectionn="ZZO";$ok = true;}
if ($windDirection == "S" ) {$windDirectionn="Zuid";$ok = true; }
if ($windDirection == "SSW" ) {$windDirectionn="ZZW";$ok = true;} 
if ($windDirection == "SW" ) {$windDirectionn="ZW";$ok = true;}   
if ($windDirection == "WSW" ) {$windDirectionn="WZW";$ok = true;}
if ($windDirection == "W" ) {$windDirectionn="West";$ok = true; }
if ($windDirection == "WNW" ) {$windDirectionn="WNW";$ok = true; }
if ($windDirection == "NW" ) {$windDirectionn="NW";$ok = true; }
if ($windDirection == "NNW" ) {$windDirectionn="NNW";$ok = true; }

if ($windDirectionn == "")
 { $windDirectionn = $windDirection;  $ok = true;}

if (!$ok) exit;

?>


groeten Nol
www.meteoeersel.nl
Door jwruitenberg
#52814
Dit is de code:

Code: Selecteer alles
<style type="text/css">
body {
   font: 75%/1.4 Comic Sans MS, sans-serif;
   background: #0000CD;
   margin: 0;
   padding: 0;
   color: #FFF;
}

</style>
</head>

<body>
<!-- Geef de gegevens weer in een tabel met een lichtblauwe kleur (backgroundcolor) -->
<!-- Standaard breedte is 874 pixels -->
<table width="650" border="0" bgcolor="#0000CD">
<caption><#timehhmmss> - <#date></font></caption>

<tr>
    <td width="156"><strong>Algemeen</strong></td>
    <td width="156"> </td>
    <td><strong>Wind</strong></td>
    <td> </td>
  </tr>
  <tr>
    <td>Temperatuur:</td>
    <td><#temp><#tempunit></td>
    <td>Windrichting:</td>
    <td><#bearing>° <#currentwdir></td>
  </tr>


enzovoorts...

Ik krijg het helaas niet voor elkaar... :blush:
Door wsMaurik
#52817
Als de windrichting in het engels wordt gegeven door $wsm[118] dan is deze in het nederlands na beide onderstaande bewerkingen te hebben uitgevoerd.

Wel in php-code doen.

$w=str_replace( "E","O",$wsm[118] ); // E = O
$wsm[118]=str_replace( "S","Z",$w ); // S = Z

succes,
Nico