Level:
Intermediate+
Official release:
2012-08-11
Prerequisite:
Php v5.x+
Javascript
Cumulus v1.9.2+
Features:
14 pages
Multilingual
Update module
Modules addons
2 levels menu
Links:
Tools suggested:
In previous page, you have created a new folder to contain all files and folders of your new Weather Blues 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!
Now that you know Weather Blues's principle of operation, you could begin to edit it for your own needs. I've keep it very short and simple! You have to edit file header_menu.php. That file contain 3 important part of your header; your site identification, the language selector and the menu system. Let's begin with the Site Name in the header and it's slogan.
Weather Blues header's first section is identified by this comment: <!-- Website identification section --> and contain these texts:
- Weather Blues (planned to be your website name)
- Small Weather Slogan Goes Here (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!
Weather Blues is showing in its index page, a little analog clock expected to show time at your location.
In file index.php, search this comment: <!-- This place to indicate your location (City and contry) -->
You will see this text as an example of what to put there (actual example is my location in Québec).
As usual, take a copy of original file, before edition
This clock is made of a javascript library and founded on 2 files: clockt.js and clockp.js
These files are stored in folder: lib/clock
Editing clockp.js :
This file is the parameters file, then you have to edit it to correspond to your location. Let see them.
Note: Clock script include needles and numbers, drawed over an image.
clocksize=70; | Size of the clock |
colnumbers='000000'; | Color of numbers on the clock face |
colseconds='ff0000'; | Color of seconds needle or false to hide |
colminutes='000000'; | Color of minutes needle |
colhours='000000'; | Color of hour needle |
numstyle = 0; | Style of numbers 0 = normal, 1 = Roman numerals |
font_family = | font typeface. Actually set to 'helvetica,arial,sans-serif'; |
localZone = 0; | 0 for visitor time, 1 to specify yours |
mytimezone = -5; | if localZone = 0, you could specify your timezone |
dst = 0; | Daylight saving time 0 = off, 1 = on |
city = ''; | City name displayed on clock face |
country = ''; | Country name displayed on clock face |
fix = 1; | If set to 0, you could place it in absolute position |
xpos=0; | If fix = 0, specify horizontal position |
ypos=0; | If fix = 0, specify vertical position |
Editing clockt.js :
In first lines of that file, you could change some constant as language strings:
If you want to go farther with that clock library, see that link
Then that's it for configuration! You could for sure, go ahead and modify any page to give your site a unique "personal touch"! Like we say... "The Sky is the limit"!! We will see in costomization that their is a lot you can do to enhance your personnal weather web site!
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 Blues template. To install your template, you simply need to take all Weather Blues files and folders and send them to your web site, using your prefered ftp software. .
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 Blues template. Also, be sure to keep the option "Include Standard Images" checked as we want to use Cumulus graphs and gauges.
Now, it's time to tell Cumulus to process our unique file: wt_data_inc.php. To do this, you have to fill one line, as indicated below:
To process your template, Cumulus need 4 informations:
Then, for our data file we have to enter the fields in this way:
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! >>