myWeather: come creare un template
Ecco a voi la guida per creare un template per myWeather:
- Create una cartella in plugin/myweather/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} :: anche qui, oblio
- {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.
Feb62008
12 commenti
myWeather 2.0 released (v2.3) | The Developer Inside dice:
6 Febbraio 2008 alle 21:05
[...] website » [...]
website »
Anders Olsen dice:
14 Marzo 2008 alle 00:33
Hello!
Your plugin looks very promising. If possible, please provide an English translation of how to create a template.
Best regards,
albert dice:
16 Giugno 2008 alle 16:41
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/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 dice:
16 Giugno 2008 alle 17:12
try latest version.
website »
albert dice:
18 Giugno 2008 alle 09:51
if I have the latest version, and does not work, which ports are used?
albert dice:
18 Giugno 2008 alle 09:55
I 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 dice:
18 Giugno 2008 alle 11:01
PORT 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 dice:
18 Giugno 2008 alle 11:20
If you have curl add this line into the script after curl_init():
curl_setopt ($ch, CURLOPT_PORT, INSERTYOURPORT);
INSERTYOURPORT=try your open port.
website »
albert dice:
18 Giugno 2008 alle 12:28
Let’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 dice:
18 Giugno 2008 alle 13:00
You 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.
website »
nick dice:
25 Giugno 2008 alle 23:45
Hey do you have a list of what the icon numbers mean?
website »
Elizabeth dice:
1 Luglio 2008 alle 22:46
I 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!!!!
website »