Meteotemplate - new free website template

hello…

so do I change this …

$con=mysqli_connect(“host”,“login”,“password”,$dbName);

TO This…

$con=mysqli_connect(“localhost”,“login”,“password”,$dbName);

yes… :wink:

and also change the login to your username and password to your password (for the mysql)

Yes, asi Brian pointed out though, you also have to fill in your username (login) and password (password) and the database name. These are all set when you create your database in the control panel of your hosting provider.

So your final string might look for example like this:

// MySQL set up
	$dbName = "my_database";
	$con=mysqli_connect("localhost","george","mypassword",$dbName);
	if (mysqli_connect_errno($con)){
		echo "Failed to connect to MySQL: " . mysqli_connect_error();
	}

Jachym, Great job on the template. I have it set-up here it still a work in progress http://southwestweather.com/meteopage/index.php.

Thank again for all your hard work
BTrip

It always feels great when someone says that and you see that your work and effort was worth it.

Just one thing guys, I have a section in my meteotemplate blog called “users” in the info tab in the menu. I thought it would be nice to have a list of all sites that use it. I already have relatively lot of people giving links to their sites, but I thought I wont be adding the links without them knowing about it and agreeing with it.

So if you want your website to be put on the users list let me know here or just via the blog :slight_smile:

@Jachym

on the live gauges…is there a way to have the values always appeaing instead of clicking on the Sghow Value button ?

thanks
:wink:

Hi Carl, currently no, you have to show/hide them, but I was already asked about this so in the next version there will be an option in the settings, where you can choose if you want them shown/hidden by default.

Hello Jachym…

well it took me a few obstacles to get the templates working but I have it now going here…

http://www.gateway2capecod.com/meteotemplate/pages/station/index.php

I use Meteobridge now but use to use Weather Display for Many Years.

if you want to add my site to your list of Users page, feel free to do so. I will leave them running and add a link to them also on my saratoga template Site navigation Menu titled “Meteotemplates”, next to my link for the Leuven templates.

I will most likely have a few more questions on how to do certain things or add things to these Templates, but for now got them up and running, changed the font and Color’s and have them updating every full 5 minutes.

I think you have done a Great Job and as time goes on the templates may get even better with additions you may add or users may suggest adding in future. Cheers To you for all your hard work.

one thing I would recommend to anyone else setting up these templates is when adding the top title to your Site put city, state and Country so that other’s know exactly where you are located when they visit your new meteotemplate site. this is why I have titled mine as “West Wareham, Mass USA” I mention this because I just looked at another users site from a few post’s back and the site was titled as “South west Weather”…if I didnt see in his sig that he was from Arizona USA I would have never known by visiting his meteotemplate site with the title on it now as South west weather…I would have no idea where he was located.

…chris

OK, I tested it, so it will be in the next update, but if you want you can try setting it up yourself without having to wait.

So in your station/live.php

Find the part with this:

$('#gaugeHumidity').jqxGauge('setValue', <?php echo $humidity?>);
			$('#gaugeWind').jqxGauge('setValue', <?php echo $wind?>);
			$('#gaugeGust').jqxGauge('setValue', <?php echo $gust?>);
			$('#gaugePress').jqxGauge('setValue', <?php echo $pressure?>);
			$('#gaugeTemp').jqxLinearGauge('value', <?php echo $temperature?>);
			$('#gaugeApparent').jqxLinearGauge('value', <?php echo $apparent?>);
			$('#gaugeDew').jqxLinearGauge('value', <?php echo $dew?>);
			$('#gaugeRain').jqxLinearGauge('value', <?php echo $rain?>);
			$('#gaugeDirection').jqxGauge('setValue', <?php echo $direction?>);
			<?php if($solarSensor){ ?>
				$('#gaugeSolar').jqxGauge('setValue', <?php echo $solar?>);
			<?php } ?>

It should be around line 850

and replace it like this so that it has this one extra line at the end:

$('#gaugeHumidity').jqxGauge('setValue', <?php echo $humidity?>);
			$('#gaugeWind').jqxGauge('setValue', <?php echo $wind?>);
			$('#gaugeGust').jqxGauge('setValue', <?php echo $gust?>);
			$('#gaugePress').jqxGauge('setValue', <?php echo $pressure?>);
			$('#gaugeTemp').jqxLinearGauge('value', <?php echo $temperature?>);
			$('#gaugeApparent').jqxLinearGauge('value', <?php echo $apparent?>);
			$('#gaugeDew').jqxLinearGauge('value', <?php echo $dew?>);
			$('#gaugeRain').jqxLinearGauge('value', <?php echo $rain?>);
			$('#gaugeDirection').jqxGauge('setValue', <?php echo $direction?>);
			<?php if($solarSensor){ ?>
				$('#gaugeSolar').jqxGauge('setValue', <?php echo $solar?>);
			<?php } ?>
			$("#valueToggle").click();

This should do it.

Thanks Chris, as I just mentioned, it feels great when people find something you do useful. I already have a VERY long to do list with things I want to add, new plugins features etc. I just released one new thing today and I am working on others, meanwhile I already fixed some minor bugs and of course Im more than happy helping people setting it up and I already am in contact with a few, so this is definately not a “finished product” and I will (hopefully) actively further develop it and offer support, the only limitation is my free time, but I will try to learn to sleep even faster :smiley:

With regards to the name of the site at the top, that is a very good point and also, I can already tell you that one of the next plugins I want to make is to implement the interactive banner I already did and have that as a possible replacement of this just simple text.

See dfltweb1.onamae.com – このドメインはお名前.comで取得されています。 and click the banner and description. It is the same thing as in the forecast from WorldWeatherOnline and it would be nice to have the possibility of showing this at the top.

Good job Jachym! Despite this being a very different template concept you have a impressive number of users up and running already :smiley:

Thanks NIko, you also helped a lot.

And I think that this is actually the best thing about it - you are completely right, ok it does look a bit different than Ken

hello jachym…

It’s the Birth of something new and over time can become even bigger and better. I always like trying new things and see how they work.

my next question now is…is the worldweatheronline API key free or do I need a subscription to get one? I saw it was free on their site and also wanted to ask what format do I choose when trying to get my api key from them? the choices are Output format as JSON, TAB or XML
I believe I need this Api key in order for my forecast section to work as it is blank now…see attachment below

The worldweatheronline site to me seems very hard to navigate and struggling to figure out where to get the API free key so my forecast cestion works.

also inside the config file of the templates for worldweatheronline info…it shows this:

/* ########### Worldweatheronline.com forecast ####################### */
$WWOApiKey = “key”; // your worldweatheronline API key
$WWOLocation = “Brno”; // location name to use (followed by comma and country abbreviation if further specification necessary) - if not found, coordinates will be used
$WWOCacheTime = 15; // update interval in minutes - data will be cached and if the file with the saved data is older than this, data will be again retrieved from external server and the file updated. Be careful about setting too low values as you might run out of your maximum allowed daily calls, depending on your plan with worldweatheronline and the data is not updated every minute anyway. Recommended value is approximately 10 to 15 minutes.

1>for the KEY section I figure when I get a key it goes there
2>for the location yours is BRNO…What will mine be for my area? is it a 4 letter code? where do I find out mine? do I use a metar code or a code I will get from WWOnline?
3>cache time was default to 10 but I am going to use 15 as forecast doesn’t change very fast anyways

Thanks…Chris


hi…the key should be already available…search for get new api key or something like that on the web page

replace BRNO with your city :wink:

cheers

Thanks for reply Carl,
Yes your key should be in your wwo profile. And yes you only need the free version. For the city just put name of yours and if it doesn’t find it the script will use your coordinates.

Homepage forecast however is from aeris, another free forecast provider. I am also now working on a version which uses yahoo forecast where no registration is necessary

Jachym…with Tom’s mod for the winds :computer: …PROBLEM SOLVED =D>

Maybe a little add on…in the Info/DataBase tabs

if you could add the time of last data registered like…

Time of last entry or
Time of last DB update

it would just be a short cut to verify

also,if something happend like an alarm on the main index.php that would indicate that the DB hasnt been updated for X period of time…like…

WARNING the database is outdated…last update at xx:xx (based on the timezone of the user)

Hi…ive been struggling with this for a bit now and just cant point where to put the thing that will move upwards the side colums on the /page/station/index.php like on the attached image :wink:

ive tried numerous things like: align top ,remove br, ect…and it looks like its related to livedata.php cuz,before that page appears,both side colums are at the top but move down after :roll: