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.

20 commenti

20 commenti

myWeather 2.0 released (v2.3) | The Developer Inside dice:

6/02/2008 alle 21:05

[...] website » [...]

website »

Anders Olsen dice:

14/03/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/06/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/06/2008 alle 17:12

try latest version.

website »

albert dice:

18/06/2008 alle 09:51

if I have the latest version, and does not work, which ports are used?

albert dice:

18/06/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/06/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/06/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/06/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/06/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/06/2008 alle 23:45

Hey do you have a list of what the icon numbers mean?

website »

Elizabeth dice:

1/07/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 »

Bas dice:

16/09/2008 alle 18:15

Is it possible for me to change the colours of the image?

website »

Bas dice:

16/09/2008 alle 18:23

Also… I’d like to put it in the sidebar without using the widget. What’s the code for this?

website »

Eduardo dice:

16/09/2008 alle 20:05

for use in sidebar: <?php wp_myweather();?>
for color: yes, if you use a graphics program (Photoshop, gimp, etc etc).

website »

sweed dice:

14/12/2008 alle 12:25

Thaks 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 dice:

11/01/2009 alle 05:51

Hi

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 dice:

19/01/2009 alle 10:28

a guide in English is expected as soon as possible.

website »

John dice:

6/06/2009 alle 01:15

FLIK 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 dice:

6/06/2009 alle 12:02

Thank John, you’ve helped me to understand. however, in italy we use a words “temperatura percepita” for feels like temperature.

website »

lascia un commento

gravatar

Comment Form

* campi necessari

usa gravatar.com per
avere un avatar nei commenti.

Sandbox

latest twitter loading...

advertising

about

about photo

Benvenuto sul blog e portfolio di Eduardo. Tutti i codici e i testi presenti sul sito sono rilasciati sotto licenza creative commons.

tag cloud

lastest scripts