Author Topic: Meteotemplate - new free website template  (Read 634504 times)

0 Members and 1 Guest are viewing this topic.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #300 on: September 20, 2015, 11:49:24 AM »
Thanks Jachym,
I have experimented more and found setting at 5% has Africa on the same line as the others but has the Global map overlap the seasons images, and anything more than 5% still scrolls Africa to a new line on my weather computer with 1280x1024 LG 17" monitor.  I'll leave it at 10% and have checked my 17" laptop and there it looks fine with all on one line and good separation from the seasons and global map images..
 
Regards,
Paul

To fit nicely for your screen size:

Set it to 7% and also,
replace this:
Code: [Select]
<h2 style="text-align:left;padding-left:25px"><?php echo lang("climate",'c')?></h2>
with this:
Code: [Select]
<h2 style="text-align:left"><?php echo lang("climate",'c')?></h2>
See if that helps.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5530
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #301 on: September 20, 2015, 05:45:46 PM »
I have it now at 6% and changed the code as per your suggestion.  It now is all on one line on my monitor in both IE and FF and looks fine.
 
Thanks,
Paul

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #302 on: September 20, 2015, 06:36:10 PM »
Looks great :-)

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Few important things
« Reply #303 on: September 21, 2015, 05:09:51 AM »
Hi,
based on the emails I get, there are several things I would just like to make a bit more clear to prevent confusion or to help you customize the template.

1. Lang function
When customizing anything in the script, do not use the lang() function. I appologize, it did not occur to me, I should have explained this earlier.
Let me explain how this function works, what it does and why it causes problems to many of you (judging on the number of emails I get).

Basically, in almost all pages of the template, you will often see the lang function and the actual command will look something like this:
Code: [Select]
<?php echo lang("temperature""c")?>The lang function is a function, which instead of hard-coding some text, looks up the particular expression passed to it as the first parameter in the language files for the particular languages. In the above case, the lang function would look for the word "temperature" in the language strings inside the language files. The other parameter ("c") just tells it to capitalize this word (the other possibilities are "l" for lowercase, "u" for uppercase and "w" for capitalizing all words in a phrase). The point of this function is to make sure that the template shows in the language specified by either you (default) or the one chosen by the user.
The above code will therefore sometimes result in "temperature", sometimes in "Temperatur", sometimes in "Teplota" etc. etc.
However! Obviously you cannot use this function for your custom words and pages - only in case it uses words that are already used by the template - i.e. for example temperature, humidity etc. But, lets say you want to add a page in the menu, or anywhere else and call it "extreme weather". Then, if you write:
Code: [Select]
<?php echo lang("extreme weather","c")?>you are telling the script - look up extreme weather in the whatever language file that is set and display it. But the problem obviously is that this phrase does not exist in these files, so the result is, it just doesnt produce anything and you get a blank button/heading etc. Theoretically, you could add this new string in the language file, but remember, that you would then have to add it in the other languages as well, which I guess would be problematic, so even if you add this to the gb.php (the English language file), it will show up correctly, but as soon as someone accesses your page and chooses a different language, they would again see nothing.
So the solution is simple - do not use this code and instead of the above examples, do not use PHP at all and just write "Extreme weather". The only disadvantage will be that this will show regardless of the user language setting - in English. However, there is really no other way, unless you want to translate it to each language currently available in the template.

I hope it makes sense and I once again appologize for not specifying this earlier.

2. Plugin compatibility
I noticed that there is one little problem with compatibility. The newly published plugins were already designed for version 2.0. I said they are still compatible with version 1.2. That still holds, I have only discovered one issue and so, if you are still running 1.2, I would recommend upgrading, but even if you do not want to, the actual problem is that one of the plugins uses a styling that is only specified in the style sheet of version 2.0. In order for this to work properly in 2.0, just add the following lines into the main.css file in the "css" directory:
Code: [Select]
.tableDiv{
display: table;
}
.rowDiv{
display: table-row;
}
.cellDiv{
display: table-cell;
vertical-align: middle;
}

3. Version codenames
I was asked if there will be a version codenamed "Apple". So just to prevent any sort of confusion with regards to compatibility or people thinking this is a special version for particular devices, for obvious reasons I decided there will not be any version called "Apple". Currently there are no major updates planned, there might be some minor updates (2.1, 2.2,...) but those will be very simple to implement and so dont worry you will have to change everything again. I havent decided about the next name :D Maybe... I dont know Blackberry?  :grin: :grin: :grin:

4. Licensing
I have also been asked what are the licensing details of this template. I will include this information in the next update, but for now, I will just try to make it simple, so the basic rules are: The whole template, including plugins, support etc. is offered for free as a freeware (with an optional donation). The template MAY be modified in any way to suit your likings/needs, please do not delete the little link in the footer backlinking to meteotemplate.com. This is purely because I would be happy if more people used it (I dont have any ads on my site, so this is really just to help people, I personally dont have anything from higher traffic). As mentioned above, you can contact me anytime and I will try to help you with either setting it up or even custom pages, create custom icons etc. However, I would rather you do not redistribute the template yourself. If you wish to recommend this to someone or someone asks you about it, please refer them to meteotemplate.com. And there is one last important thing though. The template may not be used for any sort of commercial purposes, unless you discuss the details about this with me.

Thanks and I hope you enjoy it.

Btw. there is a new plugin coming very soon, which Im sure you will love, I personally must say it surpassed my expectations and Im extremely happy with the result. There might also be a little surprise for you very soon, but I will keep that as a surprise :-)
« Last Edit: September 21, 2015, 05:20:05 AM by Jachym »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
New plugin - Station Diary!
« Reply #304 on: September 21, 2015, 02:45:42 PM »
A new plugin is now available. I must say I have been thinking about this one and worked on it for quite some time, but I personally am quite happy with the result and I hope you will enjoy and find it useful too.

Logging the weather conditions and analyzing past weather has always been something I wanted to do – which in fact was why I designed my template in the first place. It is great to see all the stats, graphs, especially for someone like me who loves statistics. However… there are still things that computers just cannot do yet and information that simply cannot be deduced purely from the measured data.
I therefore kept a small weather diary, where I wrote down my notes for that day. But I had a problem, it had all the notes, but did not have the numbers, so I had to copy them from my template outputs and it was time-consuming and didn’t look good anyway.
I’m sure I’m not the only one who thought about this and so I thought – how about I tried to connect the “two worlds” of computer analysis and human input and combine them to form one final solution. I searched the web and I didn’t find anything like this so the only way was to try to create something myself.
I have been working on this for quite some time, trying to include all the stuff I wanted to and since I decided to include this also as a plugin, I had to make sure it is easy to use and intuitive and compatible with all the other Meteotemplate features.
I hope you will like it too, but please make sure you read carefully the instructions and info below so that you know how it works, what it can do and how to use it</strong>.

This new plugin is basically trying to mimic a physical station diary. At the beginning you will see your library – a list of available “diaries” for your station – one year = one diary. These diaries come in two versions – normal and “pocket edition”. The pocket edition is simply a stripped down version of the standard edition. It is smaller, does not contain all the data like the standard version and so also loads faster.

Main features

- automatic generation of days from database info, including day number, week number, month
- daily averages, maximum, minimum for all parameters (info about solar displayed based on config.php settings)
- sun rise, sun set, day length (for station location)
- hourly graph of temperature and precipitation
- comparison to normals, including deviations
- custom content for each day – possibility for adding formatted text, links, images etc. using HTML, added using an interactive text editor automatically
- custom icon for each day
- automatically added content:
  - statistics for days (eg. warmest day of the month, day with lowest average pressure of the year etc.)
  - moon phases
  - solar, lunar eclipses
  - meteor showers
  - seasons beginning (based on hemisphere)
  - solstice, equinox dates
- calendar
- annual statistics
- monthly statistics
- information about weather station, including maps
- information about website, including a QR code with link

Install instructions and how to use can be found in the blog (link below)

Remember this is Diary 1.0 and I am open to suggestions and <strong>I plan to further develop this</strong> as I think it is quite unique, yet very useful thing to have. I already have some things that would be worth adding, but I want to see first if people like it at all and whether it would make sense to add more stuff.

Demo: http://www.meteotemplate.com/template/plugins/diary/diaryIndex.php (look at year 2015 where I have added some sample dummy text)
Download: http://www.meteotemplate.com/web/plugins.php
Info/comments: http://meteotemplate.com/blog/?p=216

Offline erikmm

  • Senior Contributor
  • ****
  • Posts: 201
    • Hřrning By Vejr
Re: Meteotemplate - new free website template
« Reply #305 on: September 21, 2015, 03:19:35 PM »
Wow......nothing else to say....wow  :-)
Erik M M
---------------
Hřrning By Vejr
http://www.danmaach.dk


Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #306 on: September 21, 2015, 03:23:31 PM »
Thanks, I will actually use this myself quite a lot too, as I said in the previous post, on one hand I love stats, and in this perspective, computers are far better than humans in doing all the calculations etc., but there are things you cant deduce from your database and things no computer can understand, in which case it is better to keep your own notes.

Note:
Just one thing, when viewing the demo, the page might be quite slow, sorry about that this is becase since I have the cheapest plan for my webhosting, the bandwidth is limited and when too many people look at it at the same time, it is very slow....

Also I recommend you rather look at the full version, not the pocket one, which is the "bigger book" :D

Offline KapitainOne

  • Senior Contributor
  • ****
  • Posts: 255
    • Sanford Weather
Re: Meteotemplate - new free website template
« Reply #307 on: September 21, 2015, 03:37:35 PM »
Very very nice!!

I made a slight change to the admin section

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Meteotemplate - new free website template
« Reply #308 on: September 21, 2015, 03:44:12 PM »
I love the diary!!  It's really cool.  Thanks.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #309 on: September 21, 2015, 03:47:38 PM »
Very very nice!!

I made a slight change to the admin section

:D I made that change too already in my admin section :D I just couldnt add it because you have to remember that not everyone might install this plugin so I cannot tie the plugins to the core files :-)

Offline ea1hmy

  • Contributor
  • ***
  • Posts: 120
    • meteotorrelavega
Re: Meteotemplate - new free website template
« Reply #310 on: September 21, 2015, 04:33:08 PM »
Very very nice!!
I love the diary!!  It's really cool.  Thanks. =D&gt; =D&gt; =D&gt;

Offline KapitainOne

  • Senior Contributor
  • ****
  • Posts: 255
    • Sanford Weather
Re: Meteotemplate - new free website template
« Reply #311 on: September 21, 2015, 04:46:42 PM »
Very very nice!!

I made a slight change to the admin section

:D I made that change too already in my admin section :D I just couldnt add it because you have to remember that not everyone might install this plugin so I cannot tie the plugins to the core files :-)
Could you not provide a new admin/index.php with the plugin and also instructions on how to replace?  That way the core files wouldn't get touched unless someone wanted the plugin?

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #312 on: September 21, 2015, 05:11:58 PM »
Yes, I thought about that too, but then I also thought about the fact that this would make any core file update problematic. Because I would also have to always think about all the various modifications of the core files for particular plugins if you see what I mean.

What I will probably do instead is post instructions of how to add this and then anyone can do this even if I update the core files. Right now I have one more quite useful plugin almost ready, and then I can look at this and also I want to see if I can find a way of displaying the climate section in the menu so that all the US cities can be included like it was in 1.2.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #313 on: September 21, 2015, 05:23:54 PM »
Very very nice!!

I made a slight change to the admin section

:D I made that change too already in my admin section :D I just couldnt add it because you have to remember that not everyone might install this plugin so I cannot tie the plugins to the core files :-)
Could you not provide a new admin/index.php with the plugin and also instructions on how to replace?  That way the core files wouldn't get touched unless someone wanted the plugin?

I also quite like how you added the webcams, it looks very nice and fits into the design of the rest. Maybe just one little thing, I think it would look better if the icon for the webcams in the menu was also white, you can use the image Im attaching if you want.

Offline KapitainOne

  • Senior Contributor
  • ****
  • Posts: 255
    • Sanford Weather
Re: Meteotemplate - new free website template
« Reply #314 on: September 21, 2015, 05:27:17 PM »
Very very nice!!

I made a slight change to the admin section

:D I made that change too already in my admin section :D I just couldnt add it because you have to remember that not everyone might install this plugin so I cannot tie the plugins to the core files :-)
Could you not provide a new admin/index.php with the plugin and also instructions on how to replace?  That way the core files wouldn't get touched unless someone wanted the plugin?

I also quite like how you added the webcams, it looks very nice and fits into the design of the rest. Maybe just one little thing, I think it would look better if the icon for the webcams in the menu was also white, you can use the image Im attaching if you want.

Thanks, that was on my todo list but had not yet gotten around to it!

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5530
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #315 on: September 21, 2015, 11:23:07 PM »
I like it, I like it, I like it...
Still looking around to see how to get to a page within a month quickly.  Also how to automatically, or quickly, add our daily CoCoRaHS manual precipitation data, sunshine hours and percentage, etc.
 
Very well done Jachym, again!
Paul
 

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5530
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #316 on: September 21, 2015, 11:57:50 PM »
Very very nice!!

I made a slight change to the admin section

Very very nice!!

I made a slight change to the admin section

I have tried to figure out how to add the addDiary to that Admin section but haven't been able yet.  Could you share or let me know what and where.  I have looked at the Admin/index.php at line 69 but not sure what next.

Thanks,
Paul

Offline SimonB

  • Contributor
  • ***
  • Posts: 139
    • meteo.capetown
Re: New plugin - Station Diary!
« Reply #317 on: September 22, 2015, 03:19:28 AM »
A new plugin is now available. I must say I have been thinking about this one and worked on it for quite some time, but I personally am quite happy with the result and I hope you will enjoy and find it useful too.

Gobsmacked... how awesome is this :)

Offline ea1hmy

  • Contributor
  • ***
  • Posts: 120
    • meteotorrelavega
Re: Meteotemplate - new free website template
« Reply #318 on: September 22, 2015, 05:45:12 AM »
The URL of the image will therefore look like this:

http://www.meteotorrelavega.com/template/plugins/stickers/sticker200_120.php?parameter=T&text=Hello&color1=grey&color2=dark_red

respuesta del servidor
Parse error: syntax error, unexpected '[' in /home/meteotor/www/template/plugins/stickers/sticker200_120.php on line 61
 #-o #-o #-o #-o ](*,) ](*,) ](*,)

que puede ser
« Last Edit: September 22, 2015, 05:46:46 AM by ea1hmy »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #319 on: September 22, 2015, 06:48:24 AM »
The URL of the image will therefore look like this:

http://www.meteotorrelavega.com/template/plugins/stickers/sticker200_120.php?parameter=T&text=Hello&color1=grey&color2=dark_red

respuesta del servidor
Parse error: syntax error, unexpected '[' in /home/meteotor/www/template/plugins/stickers/sticker200_120.php on line 61
 #-o #-o #-o #-o ](*,) ](*,) ](*,)

que puede ser

Which PHP version are you using, PHP 5.3?

Offline ea1hmy

  • Contributor
  • ***
  • Posts: 120
    • meteotorrelavega
Re: Meteotemplate - new free website template
« Reply #320 on: September 22, 2015, 06:49:51 AM »
SetEnv PHP_VER 5_6

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1990
    • My PWS at Leuven Belgium Europe
Re: Meteotemplate - new free website template
« Reply #321 on: September 22, 2015, 06:56:41 AM »
SetEnv PHP_VER 5_6
Sorry, I think you are mistaken. http://www.meteotorrelavega.com/weather2/info.php
As far as I can see your site uses PHP Version 5.2.17

Wim

P.S. I had the same error with this language construct:
Code: [Select]
$timezone_canada = ["CA" => ["name" => "Canada" ],];
« Last Edit: September 22, 2015, 06:58:16 AM by wvdkuil »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #322 on: September 22, 2015, 07:00:24 AM »
Milio, I suspect you must be using something lower than 5.4. I have seen this error before, I highly recommend you upgrade to 5.4. This version has been around for quite some time already and has been tested. There are lot of new functions and you will run into problems with 5.3 at other places too. I have already changed some scripts because of this, but you never know when something will not work again.

All people that have upgraded to 5.4 did not encounter any problems whatsoever, so do not be afraid to do it.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #323 on: September 22, 2015, 07:02:16 AM »
Basically, the most common problem I have with 5.3 and lower is when you want to get a variable from a function that produces an array,

so for example this:

Code: [Select]
$x = explode(",",$array)[0];
will most likely not work in 5.3 and lower and you would have to first do the explode function and save it as an array and then get the first item from that array

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #324 on: September 22, 2015, 07:06:04 AM »
Very very nice!!

I made a slight change to the admin section

Very very nice!!

I made a slight change to the admin section

I have tried to figure out how to add the addDiary to that Admin section but haven't been able yet.  Could you share or let me know what and where.  I have looked at the Admin/index.php at line 69 but not sure what next.

Thanks,
Paul

I decided I will be regularly releasing something like "tips" for customizing the template. These tips will then be posted in the blog and added to either the extra features section of meteotemplate.com or maybe in the FAQ.

Currently, the things I plan to talk about are:
- adding "addDiary.php" to admin section
- modifiying the size of the big diary to make it smaller but still with all the info

and I am currently trying to find a way of how to cram more items in the climate tab, I already have sort of an idea how it could be solved, so once I have that, I will post it there