Now things are Simple!

 for weather stations using Cumulus software

Description

Level:
  Intermediate+

Official release:
  2014-12-26

Prerequisite:
  Php v5.x+
  Javascript
  Cumulus v1.9.4+

Features:
  12 pages
  Multilingual
  Update module
  Modules addons

Links:

Tools suggested:



Quality website
template


Exclusively
for You!

Weather Sunset

Weather Sunset Template

Template Preparation

In previous page, you have created a new folder to contain all files and folders of your new Weather Sunset template and we have take a look on the most important files it contains.

Also, we have talked about why so many files? And the "law of least effort", consisting to seperate the content to be repeated all over again, and to not duplicate tedious tasks which in the end will give us more time for creations and customizations.

Finally, I indicated NEVER to modify files, as they will be updated frequently! (files ending with "_txt.php" and files in lang folder!

Template Configuration

Now that you know Weather Sunset's principle of operation, you could begin to edit it for your own needs. I've keep it very short and simple!

Header website name

Weather Sunset header section is identified by this: <div id="title"> and contain these texts:

- Weather Sunset (planned to be your website name line)
- by Weather by You! (your site's slogan)

You simply have to edit these 2 lines to identify your weather site. Take time to fill it at your very best, because these 2 lines will probably be used by search engines (as Google, Yahoo, etc...) to identify your site; the more it's accurate and attractive the more you will be visited!

Default language:

Weather Sunset provides a list of 13 different languages that could be selected in any pages within the language selector box. These languages are stored in a separate language file and each of these files are available in the lang folder. Filenames are ending with 2 letters language abbreviation, as this:

text_standard_XX.php, where "XX" is the language code.

You see below a list of languages code used at time of template launch:

Abbr Language Abbr Language
cz Czech de German
en English es Spanish
fi Finnish fr French
gr Greek it Italiano
nl Dutch no Norwegian
pl Polish sl Slovenian
sv Swedish    

In each pages, you will find in first lines a language module, where default language is defined. At line #18, you will find that line:

$lang = 'en'; // Default language

If you want to change default language for your website, simply change language code ('en' in that example) with one included in your lang folder.

Data files:

To have Cumulus data in you pages, you need 2 different files:

For months page only:
wt_month_inc.php

For all other pages:
wt_data_inc.php

These files are now compilant to UTF-8 to work at its best in all languages. Since build 1093, Cumulus support UTF-8 as default standard.

Date presentation:

Now that you have choosen your data files, you could also choose how dates will be presented; to do so edit wt_data_inc.php and wt_month_inc.php files. In the first lines, you will see these lines:

$to = "to "; // Ex: to 20 may
$pre_time ="at "; // Ex: at 10:45
$pre_date = " on "; // Ex: on 25 may
$only_date = "on "; // Ex: On 25 may

Like explain in each lines, these variable has been added to Cumulus date and time to normalize these timestamp. You could define your own words or let them empty to have nothing to "surround" your date and/or time.

Template installation

Now that you have prepared and configured your template, it's time to send it to your web-site. If you already have a weather template, like the Cumulus standard, you need to wipe it from your website to avoid a mix between that one and your new Weather Sunset template. To install your template, you simply need to take all Weather Sunset files and folders and send them to your web site, using your prefered ftp software. .

Cumulus configuration

Now that you have sent (uploaded) your new template, it's time to tell Cumulus to use it! To do so, start Cumulus and go to menu: Configuration --> Internet --> Files tab. That will bring you a screen as the one you see (partly) in the image shown below

First thing you have to do is to unselect option "Include Standard Files" as we don't want Cumulus to send its standard template at the same time as your Weather Sunset template. Also, be sure to keep the option "Include Standard Images" checked as we want to use Cumulus graphs.

Now, it's time to tell Cumulus to process our data files: wt_data_inc.php and wt_month_inc.php. To do this, you have to fill 2 lines, as indicated below:

To process your template, Cumulus need 4 informations:

  • Local filename: - Name, with complete path to your wt_data_inc.php. file
  • Remote filename: - URL adress to put wt_data_inc.php file.
  • Process?: - To be checked to tell Cumulus that this file contains webtags to process.
  • Ftp?: - Command to upload wt_data_inc.php file.

Then, for our data file we have to enter the fields in this way:

  • Local filename: Take browse button to point wt_data_inc.php file.
  • Remote filename: public_html/wt_data_inc.php
  • Process?: Checked
  • Ftp?: Checked

(This example is for the wt_data_inc.php file, then you have to repeat it for the second line but replacing filename with the wt_month_inc.php.)

Note: In our example, we've show public_html for remote path as it is the most common name used in website configuration, but this could be different on your provider configuration or you could want to send it to a subfolder of your site.

Now, that all is in place, it's time to launch the Template Manager Module on your website to "initialize" you website template (eg. http://MyWeatherSite/manage.php.)

Now, Final: Template Manager Module! >>