Autor Tema: Plantilla Jachym (Meteotemplate)  (Leído 360072 veces)

0 Usuarios y 3 Visitantes están viendo este tema.

Desconectado javigar66

  • Jr. Member
  • **
  • Mensajes: 53
    • Ver Perfil
    • MeteoCarlet
  • Estación: Carlet - ESPVA4600000046240B
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #360 en: 10 de Diciembre del 2016, 00:02:58 am »
Nada a mi no me funciona y el código está tal cual me indicas. Lo he editado desde Notepad++, aunque en teoría se puede hacer desde el menú Admin del template.

Una curiosidad por aprender. Si realizo la edición desde el template veo que pone una sola comilla (') y sin embargo tu indicas doble comilla (") antes y después del nombre de la ciudad Valencia y del código API. No se cual es la diferencia y cual la correcta. De todas formas he utilizado las dos y nada.

En mi web aparece el cuadro en negro sin datos y con el combo abajo que indica Weather Undergroung

www.meteocarlet.net

Gracias y saludos.



Desconectado kocher

  • Moderador Global
  • Hero Member
  • ******
  • Mensajes: 960
    • Ver Perfil
    • Meteo San Sebastian - Arriola
  • Estación: San Sebastian, Arriola ESEUS2000000020018A
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #361 en: 10 de Diciembre del 2016, 00:15:23 am »
Si funciona; yo lo he probado con tu wuAPI y la ciudad de Valencia; luego, funciona

Código: [Seleccionar]
Una curiosidad por aprender. Si realizo la edición desde el template veo que pone una sola comilla (') y sin embargo tu indicas doble comilla (") antes y después del nombre de la ciudad Valencia y del código API. No se cual es la diferencia y cual la correcta. De todas formas he utilizado las dos y nada.
En PHP, lo que hacen las comillas dobles es reemplazar las variables por su valor. En cambio las comillas simples no leen el valor, solo entregan texto plano.

Por lo tanto, debes ponerlo entre doble comillas (como venía el script "de fábrica")

Mi código es:

Código: [Seleccionar]
<?php

Forecast block
Namespace: forecast
# Meteotemplate Block

Version 2.0 - Feb 26, 2016
# - WxSim forecast added
# - Yr.No display clean-up - thanks Luc, Suriname

// NOTE: If you make any changes to this settings also make sure you empty the cache inside the forecast block directory, otherwise your changes will only be refleceted once the cache time expires.

$defaultForecast "wu";//  "yahoo", "wu", yrNo, "wxsim"
$showyrNoForecast true// yr.No forecast
$yrNoLocation "https://www.yr.no/place/Spain/Basque_Country/San_Sebastian/forecast.xml"// find the analogous string at yr.no for your desired location
$showWUForecast true// Weather Underground
$wuCity "San_Sebastian"// set city to be used for WU forecast retrieval. If your city does not work try one that is close and large enough.
$wuAPI "mi wuAPI"// your unique WU API key (if you don't have one register for one for free)
$showYahooForecast true// Yahoo Weather
$yahooCity "20018"// set city to be used for Yahoo forecast retrieval. If your city does not work try one that is close and large enough.
$showWxSimForecast true// WxSim
$pathLatest "../../../../forecast/latest.csv"// path to your latest.csv
$categories = array("0-6","6-12","12-18","18-24"); // specify the hourly intervals for the forecast - will be aggregated
$maxDays 2// maximum number of days shown unless clicked "more"
$decimalSeparator ","// decimal separator in latest.csv

$forecastsCache 60// cache for the forecasts
« Última modificación: 10 de Diciembre del 2016, 00:18:46 am por kocher »



“La mente es como un paracaídas… Solo funciona si la tenemos abierta”.

“La formulación de un problema, es más importante que su solución”.

“Si buscas resultados diferentes, no hagas siempre lo mismo" . -Albert Einstein-

Desconectado ajimemar

  • Full Member
  • ***
  • Mensajes: 134
    • Ver Perfil
    • Santiago de la Espada
  • Estación: GUADAMUR [ ESCLM4500000045160A ]
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #362 en: 10 de Diciembre del 2016, 00:17:46 am »
Buenas noches, yo creo que tambien lo puede hacer a traves de la administración de la pagina, entra en tu pagina como administrador, entre otros tienes el menu de configurac¡ón de  bloques, entras y te salen todos los bloques, ves a forescast y la derecha del todo,  setting, hay tienes entre otros Weather Underground forecast, ponlo en true, debajo la Ciudad, y debajo la Api que se supone que tienes de Weather Underground. que es la cifra de 16 caracteres, guarda y se supone que te debe funcionar.
Salu2.

Desconectado javigar66

  • Jr. Member
  • **
  • Mensajes: 53
    • Ver Perfil
    • MeteoCarlet
  • Estación: Carlet - ESPVA4600000046240B
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #363 en: 10 de Diciembre del 2016, 00:23:16 am »
Gracias Ajimenar.
Eso es lo primero que hice y no funcionó, ni ayer ni hoy. Luego he editado con el Notepad++ el código y lo he dejado tal cual indica Kocher, poniendo Valencia como ciudad grande más cercana y mi código API.

No funciona tampoco como podrás ver si entras en mi web. Está el bloque en el centro de la pantalla arriba, pero no muestra ningún dato.

www.meteocarlet.net

Javier García



Desconectado kocher

  • Moderador Global
  • Hero Member
  • ******
  • Mensajes: 960
    • Ver Perfil
    • Meteo San Sebastian - Arriola
  • Estación: San Sebastian, Arriola ESEUS2000000020018A
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #364 en: 10 de Diciembre del 2016, 00:25:55 am »
 javigar66

Yo creo que lo vas a solucionar en cuanto copies el archivo que te he puesto mas arriba y, lo sustituyas por el tuyo (respetando las comillas).




“La mente es como un paracaídas… Solo funciona si la tenemos abierta”.

“La formulación de un problema, es más importante que su solución”.

“Si buscas resultados diferentes, no hagas siempre lo mismo" . -Albert Einstein-

Desconectado ajimemar

  • Full Member
  • ***
  • Mensajes: 134
    • Ver Perfil
    • Santiago de la Espada
  • Estación: GUADAMUR [ ESCLM4500000045160A ]
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #365 en: 10 de Diciembre del 2016, 00:29:58 am »
No quisiera contradecir a Kocher, pero mi archivo esta todo con comillas simples y funciona perfectamente.

Desconectado javigar66

  • Jr. Member
  • **
  • Mensajes: 53
    • Ver Perfil
    • MeteoCarlet
  • Estación: Carlet - ESPVA4600000046240B
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #366 en: 10 de Diciembre del 2016, 00:30:56 am »
Por fin ya funciona. He copiado todo tu código Kocher y he puesto mi API y también mi ciudad y ahora si funciona.

Esto es muy raro, pues el fichero settings.php no viene incluido al bajar este bloque de la web meteotemplate, creo que se genera la primera vez que intentas editar la configuración desde el menú Admin de la web. Digo esto porque yo no había editado de forma manual el fichero hasta hoy y lo único que había hecho es poner la ciudad y la API. No se, revisaré linea a linea a ver cual es el error y si lo encuentro lo cuento por aquí por si sirve a alguien.

Gracias por la ayuda de nuevo.

Javier García
www.meteocarlet.net



Desconectado kocher

  • Moderador Global
  • Hero Member
  • ******
  • Mensajes: 960
    • Ver Perfil
    • Meteo San Sebastian - Arriola
  • Estación: San Sebastian, Arriola ESEUS2000000020018A
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #367 en: 10 de Diciembre del 2016, 00:31:39 am »
Saludos ajimemar 

No quisiera contradecir a Kocher, pero mi archivo esta todo con comillas simples y funciona perfectamente.

jjjjjjjjjjjjjjjjjjjj, puedes (y debes) contradecirme todo lo que haga falta y todo lo que quieras.  ;)

Saludos desde San Sebastian



“La mente es como un paracaídas… Solo funciona si la tenemos abierta”.

“La formulación de un problema, es más importante que su solución”.

“Si buscas resultados diferentes, no hagas siempre lo mismo" . -Albert Einstein-

Desconectado kocher

  • Moderador Global
  • Hero Member
  • ******
  • Mensajes: 960
    • Ver Perfil
    • Meteo San Sebastian - Arriola
  • Estación: San Sebastian, Arriola ESEUS2000000020018A
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #368 en: 10 de Diciembre del 2016, 00:37:07 am »
¡ Buenoooo !

Código: [Seleccionar]
Por fin ya funciona. He copiado todo tu código Kocher y he puesto mi API y también mi ciudad y ahora si funciona.
Ya solo te falta "limarlo" un poco:

Sustituir:

Código: [Seleccionar]
$showyrNoForecast = true; // yr.No forecast
$yrNoLocation = "https://www.yr.no/place/Spain/Basque_Country/San_Sebastian/forecast.xml"; // find the analogous string at yr.no for your desired location

Por:

Código: [Seleccionar]
$showyrNoForecast = true; // yr.No forecast
$yrNoLocation = "https://www.yr.no/place/Spain/Valencia/Valencia/forecast.xml"; // find the analogous string at yr.no for your desired location

Si no tienes WXSim, debes poner:

   
Código: [Seleccionar]
$showWxSimForecast = false; // WxSim





« Última modificación: 10 de Diciembre del 2016, 00:42:05 am por kocher »



“La mente es como un paracaídas… Solo funciona si la tenemos abierta”.

“La formulación de un problema, es más importante que su solución”.

“Si buscas resultados diferentes, no hagas siempre lo mismo" . -Albert Einstein-

Desconectado javigar66

  • Jr. Member
  • **
  • Mensajes: 53
    • Ver Perfil
    • MeteoCarlet
  • Estación: Carlet - ESPVA4600000046240B
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #369 en: 10 de Diciembre del 2016, 00:46:42 am »
De locos, ahora con yr.NO a pesar de indicar:
$showyrNoForecast = true; // yr.No forecast
      $yrNoLocation = "https://www.yr.no/place/Spain/Valencia/Valencia/forecast.xml"; // find the analogous string at yr.no for your desired location

Me aparece el pronóstico de San Sebastian.

He borrado cokies por si acaso y nada.



Desconectado kocher

  • Moderador Global
  • Hero Member
  • ******
  • Mensajes: 960
    • Ver Perfil
    • Meteo San Sebastian - Arriola
  • Estación: San Sebastian, Arriola ESEUS2000000020018A
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #370 en: 10 de Diciembre del 2016, 00:52:10 am »
Intenta borrar la memoria caché del navegador

Tambien puedes borrar (eliminar) el archivo ../homepage/blocks/forecast/cache/yrNo.txt:

       http://www.meteocarlet.net/template/homepage/blocks/forecast/cache/yrNo.txt

Cuando elimines ese archivo, el script generará uno nuevo con los nuevos valores.

Esto se debe a que en el archivo "settings", está establecido que la caché permanezca 60 minutos, para ahorrar llamadas inútiles a:

                https://www.yr.no/place/Spain/Valencia/Valencia/forecast.xml"


« Última modificación: 10 de Diciembre del 2016, 01:40:01 am por kocher »



“La mente es como un paracaídas… Solo funciona si la tenemos abierta”.

“La formulación de un problema, es más importante que su solución”.

“Si buscas resultados diferentes, no hagas siempre lo mismo" . -Albert Einstein-

Desconectado javigar66

  • Jr. Member
  • **
  • Mensajes: 53
    • Ver Perfil
    • MeteoCarlet
  • Estación: Carlet - ESPVA4600000046240B
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #371 en: 10 de Diciembre del 2016, 15:41:38 pm »
Gracias Kocher.

Ya funciona correctamente para mi ciudad, Carlet, tanto en yr como en weather underground. He borrado el fichero de la cache que indicabas y al instante todo bien.



Desconectado jachym

  • Full Member
  • ***
  • Mensajes: 127
  • Meteotemplate Developer
    • Ver Perfil
    • Meteotemplate
Meteotemplate 11.0 Passion Fruit!
« Respuesta #372 en: 23 de Diciembre del 2016, 17:14:15 pm »

Hi guys,

first of all I would like to wish all of you who celebrate Christmass Merry Christmas and a happy new year to all of you.

As a little present from me you get a new version of the template - Meteotemplate 11.0 Passion Fruit. This version includes some minor bug fixes, but most importantly - one major new thing - the menu. The menu was something that was bothering me for quite some time. The problem was that it was quite complicated to customize it and once you did you were no longer able to use the default menu.

Well now this is all different. Wouldn´t it be nice if you could create/delete menu tabs via the control panel directly? Set tab icons, insert your own links, set the link order, tab order just be dragging and dropping the tab in the browser, insert separators, headings, custom icons, or even a flashing "new" text next to newly added items? If the answer to these questions is yes then you will like version 11.

Update this time is very simple, however it might take you some time to actually create your new menu. After you update the template you will need to set up the menu the way YOU like it.

Before we move on let me emphasize one absolutely crucial thing - IT IS ABSOLUTELY ESSENTIAL THAT YOU READ THE INSTRUCTIONS ABOUT HOW TO USE THE MENU IN THE UPDATED WIKI PAGE!

Custom menu

The menu looks similar to the original one, but now you can rearrange the tabs using drag & drop, rearrange the links, use your custom icons, insert separators, insert flashing "new" symbol next to new items just be including "(new)" string in the link etc etc. After you finish the update process (copying the new files), you must go to the wiki, which now includes updated section about the menu and includes detailed instructions how to proceed. I have also included examples to make it easier for you.

SVG icons

Another major change is that I have converted all the icons from PNG to vector SVG objects. This update does not yet implement this, for now, only the menu will use this, however, in the next version update I will probably update all the pages, and this now also allows me to start updating the blocks and plugins and change the original PNG icons to these new SVG ones loaded from the template.

What are the advantages of using SVG over PNG? First of all speed, the SVG sprite loads much faster than the icons as PNG. Second, the icon can be enlarged indefinitely, it is not a raster object, so when you make it larger, it will still look sharp and not be pixelated. And last, it behaves as a font, which means I no longer have to include each icon in two versions (black, white). I can simply set any color to the icon, even based on your color scheme set for the template (blue, red, green....). In the future when I update or create a new block, it will use these and no icons folder is necessary.

Server Check

This is something for new users, in the main settings right at the top is now a new function which allows you to check that your server supports the most important functions necessary to install Meteotemplate. If you are already using the template this probably will not have much effect, but I have also included some improved debugging features in the settings files, so everyone can benefit from this.

Bug Fixes

I have fixed several bugs in various parts of the template (station pages etc.).


I hope this further enhances the customization possibilities of the template and allows you to really create a page that looks exactly the way YOU like it, without needing to know how it all works in the backend or ever seeing the code as such! You can already see the new menu in the DEMO, which has been fully updated to version 11.0.

Instructions about how to update are as always in the blog.

Enjoy!
« Última modificación: 23 de Diciembre del 2016, 17:15:49 pm por jachym »

Desconectado kocher

  • Moderador Global
  • Hero Member
  • ******
  • Mensajes: 960
    • Ver Perfil
    • Meteo San Sebastian - Arriola
  • Estación: San Sebastian, Arriola ESEUS2000000020018A
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #373 en: 23 de Diciembre del 2016, 20:35:09 pm »
I have already upgraded to the latest version.

I can only customize the new menu

    Demo: http://kocher.es/meteotemplate/

Many thanks Jachym      :aplaude1:

--------------------------------------------------------------------------------------------------------------------

Ya he actualizado a la última versión.

Solo me queda personalizar el nuevo menú

Demo: http://kocher.es/meteotemplate/

Muchas gracias Jachym    :aplaude1:

« Última modificación: 23 de Diciembre del 2016, 20:37:51 pm por kocher »



“La mente es como un paracaídas… Solo funciona si la tenemos abierta”.

“La formulación de un problema, es más importante que su solución”.

“Si buscas resultados diferentes, no hagas siempre lo mismo" . -Albert Einstein-

Desconectado jachym

  • Full Member
  • ***
  • Mensajes: 127
  • Meteotemplate Developer
    • Ver Perfil
    • Meteotemplate
Re:Plantilla Jachym (Meteotemplate)
« Respuesta #374 en: 24 de Diciembre del 2016, 18:35:07 pm »

Merry Christmas and a happy new year 2017 to all of you and your families! After at least 5 years we finally have snow here on Christmas Eve so it at least feels a bit like winter here :)

Enjoy!