Ticket #5171: weather_maps.diff
File weather_maps.diff, 2.2 KB (added by , 16 years ago) |
---|
-
mythplugins/mythweb/includes/data_dir.php
24 24 25 25 // New hard-coded cache directory 26 26 define('cache_dir', 'data/cache'); 27 define('cache_url', root.cache_dir.'/'); 27 28 28 29 // Make sure the image cache path exists and is writable 29 30 if (!is_dir(cache_dir) && !mkdir(cache_dir, 0755)) { -
mythplugins/mythweb/modules/weather/tmpl/default/weather.am.php
32 32 echo "imageTotal = ". $matches[2] .";\n"; 33 33 for ($i=0; $i<$matches[2]; $i++) { 34 34 echo "images[$i] = new Image();\n"; 35 echo "images[$i].src = \" /". cache_dir ."/". $matches[1] ."-$i\";\n";35 echo "images[$i].src = \"". cache_url . $matches[1] ."-$i\";\n"; 36 36 } 37 37 ?> 38 38 function nextFrame (inc) { … … 68 68 ?> 69 69 70 70 output += ' <b>Faster</b><br>' 71 output += '<img name="animation" src="<?php echo "/". cache_dir ."/". $matches[1] ."-0" ?>" alt="Animation" onload="setTimeout(\'animate()\', delay)">'71 output += '<img name="animation" src="<?php echo cache_url . $matches[1] ."-0" ?>" alt="Animation" onload="setTimeout(\'animate()\', delay)">' 72 72 output += '</form>' 73 73 document.write(output); 74 74 -
mythplugins/mythweb/modules/weather/tmpl/default/weather.sm.php
27 27 28 28 <div class="radar_image"> 29 29 <center> 30 <img name="static_map" src="<?php echo '/'. cache_dir .'/'. $matches[1] ?>" alt="Static Map">30 <img name="static_map" src="<?php echo cache_url . $matches[1] ?>" alt="Static Map"> 31 31 </center> 32 32 </div> 33 33 </div>