Tengo un script en php el cual me gustaría insertar en el header.tpl del php weby directory y no lo consigo. He visto que se podría añadir un include (<p>{php}include("http://full path to/example.php");{/php} </p>) en tpl pero la programación no es lo mío y no sé cómo hacerlo. Además el script viene todo en el mismo archivo php.
El script es:
Código PHP:
.....Ver original
<?php require("simplepie.inc"); require("simplepie_yahoo_weather.inc"); $code = "ANXX0001"; $path = "http://weather.yahooapis.com/forecastrss?u=c&p="; $feed = new SimplePie(); $feed->set_feed_url($path.$code); $feed->set_item_class('SimplePie_Item_YWeather'); $feed->init(); $weather = $feed->get_item(0); ?>
.....
.....
Código PHP:
.....Ver original
<table> <tr> <td><img src="<?php echo $weather->get_condition_image(); ?>" width="25" height="25" border="0" /></td> <td>Condiciones: <?php echo $weather->get_condition(); ?></td> <td>Temperatura: <?php echo $weather->get_temperature(); ?>°<?php echo $weather->get_units_temp(); ?></td> <td>Humedad: <?php echo $weather->get_humidity(); ?>%</td> <td>Rising: <?php echo $weather->get_rising(); ?>%</td> <td>Amanecer: <?php echo $weather->get_sunrise(); ?></td> <td>Ocaso: <?php echo $weather->get_sunset(); ?></td> </tr></table>
.....
.....
Podrían ayudarme para integrarlo en dicho header.tpl?
Gracias!