addWeather: come creare un template
Ecco a voi la guida per creare un template per addWeather:
- Create una cartella in plugin/addweather/template con il nome del vostro template.
- Create all’interno della vostra cartella un file con il nome template.html, qui andrà l’html del vostro template.
- Create all’interno della vostra cartella un file style.css, qui andrà il vostro CSS.
- Create all’interno della vostra cartella una cartella chiamata icon, qui andranno le immagini del meteo (da 0 a 15, formato gif). Non passaggio non è obbligatorio, solo se usate {ICON}. La spiegazione del tag è più avanti nel post.
Nel file template.html potete usare i seguenti tag:
- {LOCALE} :: lingua dell’xml
- {FROM} :: formato
- {UT} :: scala temperatura
- {UD} :: scala distanza
- {US} :: scala velocita/tempo
- {UP} :: scala pressione
- {UR} :: perdono, ma non ne ho idea.
- {CITY} :: nome della città
- {TIME} :: orario
- {LAT} :: latitudine
- {LON} :: longitudine
- {SUNS} :: alba
- {SUNR} :: tramonto
- {ZONE} :: zona
- {LSUP} :: data rilevamento
- {OBST} :: osservatorio di rilievo
- {TMP} :: temperatura
- {FLIK} :: temperatura percepita (tnx John)
- {WEATHER} :: descrizione meteo
- {ICON} :: icona del meteo (link completo da inserire in tag img)
- {BAR_R} :: pressione
- {BAR_D} :: tipologia di pressione
- {WIND_S} :: velocità vento
- {WIND_GUST} :: raffica
- {WIND_D} :: boh!
- {WIND_T} :: direzione del vento (N,S,E,W)
- {HMID} :: umidità in %
- {VIS} :: visibilità (distanza)
- {UV_I} :: raggi uv
- {UV_T} :: tipologia di raggi
- {DEWP} :: Punto di rugiada (in temp)
Spero di essere stato chiaro, naturalmente sarò lieto di vedere le vostre creazioni.
in your opinion
myWeather 2.0 released (v2.3) | The Developer Inside
on[...] website » [...]
Anders Olsen
onHello!
Your plugin looks very promising. If possible, please provide an English translation of how to create a template.
Best regards,
albert
onWarning: file_get_contents(http://xoap.weather.com/search/search?where=madrid) [function.file-get-contents]: failed to open stream: Connection timed out in /var/www/ids/wp-content/plugins/myweather/admin.myweather.php on line 164
Hello, I get this error, by proxy, use any port? If php.ini file in this well:
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = Off
Eduardo
ontry latest version.
albert
onif I have the latest version, and does not work, which ports are used?
albert
onI am an internal network of my business, and have a proxy, if I do from my home runs, the blog, what I have in the emresa. that’s why I think it is an issue of proxy ports.
alberto
onPORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
111/tcp open rpcbind
113/tcp open auth
139/tcp open netbios-ssn
445/tcp open microsoft-ds
765/tcp open webster
953/tcp open rndc
2049/tcp open nfs
3306/tcp open mysql
Eduardo
onIf you have curl add this line into the script after curl_init():
curl_setopt ($ch, CURLOPT_PORT, INSERTYOURPORT);
INSERTYOURPORT=try your open port.
albert
onLet’s start from the beginning, I ultimaversion, upon entering the city, and leaves looking for this error:
Warning: file_get_contents(http://xoap.weather.com/search/search?where=madrid) [function.file-get-contents]: failed to open stream: Connection timed out in /var/www/ids/wp-content/plugins/myweather/myweather.php on line 39
it can be?
Eduardo
onYou do not have the CURL and file_get_contents does not work because you have a proxy. I am sorry but I do not know how to help.
nick
onHey do you have a list of what the icon numbers mean?
Elizabeth
onI am using the Talian 1.0 theme for WordPress. How can I get MyWeather to display a title?
The title box appears but is empty and this causes MyWeather to appear incorrectly on some computers, especially Apples.
Thanks so much. I love your widget!!!!
Bas
onIs it possible for me to change the colours of the image?
Bas
onAlso… I’d like to put it in the sidebar without using the widget. What’s the code for this?
Eduardo
onfor use in sidebar: <?php wp_myweather();?>
for color: yes, if you use a graphics program (Photoshop, gimp, etc etc).
sweed
onThaks for your great plugin.
Can you make a list of what the icon numbers mean?
It will be realy helpfull.
thanks again and keep it up
topscorer
onHi
This looks really cool but I have no idea what to do to get it working on my blog.
Any idiots guide in English I can refer to please?
Thanks
Eduardo
ona guide in English is expected as soon as possible.
John
onFLIK is “feels like” (si sente come), e.g., “the actual temperature is 89, but it feels like it’s 85″ (la temperatura effettiva è 89, ma ci si sente come è 85)
Eduardo
onThank John, you’ve helped me to understand. however, in italy we use a words “temperatura percepita” for feels like temperature.
leave one