• English
  • Nederlands

User Tools

Site Tools


en:miscellaneous

Other things you might need

Adding one extra tag/value to be used on your start-page

If you want to use a new temperature variable on the current start-screen, there are two actions

  1. Add the tag to a file to be processed and uploaded by the weather program
  2. Put the value on the screen were you want to display it.

Add it to a file to be processed by your weather program

For this explanation we are going to use WeatherDisplay. But most tag-files have the same format and also the $ws[] names are the same. So you can "translate" this description to your own environment.

For WD we are going to add the new temp-tag to tags.wd.txt .

You find that file in weather28/scriptsWD/

There are three seldom used weather-variables in all tag-files for display extra temperatures in and around the house.

|tempActInside|%indoortemp%|!
|tempActExtra1|%generalextratemp1%|!
|tempActExtra2|%generalextratemp2%|!

So if not in use already we are going to use one of those fields to contain our new temp-field.

|tempActExtra1|%maxtempfortodayfromyourdata%|!

You save the file and copy the changed tags.wd.txt to your WD webfiles folder on the PC

Check if those fields are already used

In your wsUserSettings.php during your first install (Leuven-Template install step 4 of 7) you told the scripts to use and display those fields.

#---------------------------------------------------------------------------
# IMPORTANT     Weather Station sensors and options for dashboard
#---------------------------------------------------------------------------
$SITE['UV']         = true;   // ##### set to false if no UV sensor
$SITE['SOLAR']      = true;   // ##### set to false if no Solar sensor
$SITE['tempInside'] = true;   // ##### set to false if no inside temp sensor available or wanted on Ajax page
$SITE['extraTemp1'] = false;  // ##### set to false if no extra sensor available or wanted on Ajax page
$SITE['extraTemp2'] = false;  // ##### set to false if no extra sensor available or wanted on Ajax page

Change the setting to true for the field you want to use.

$SITE['extraTemp1'] = true;  // ##### set to false if no extra sensor available or wanted on Ajax page

You have to have a place to add that value to your screen

You could use the default place for that variable which is below the thermometer on the startpage just above high low, as you can see on the image.

In the current scripts those two optional fields are displayed according to a setting and if you are not using those fields those settings are now set to false.:

veld op start-pagina instelling waarde uit WD-tag omschrijving bij veld
$ws['tempActInside'] $SITE['insideTemp'] %indoortemp% Inside
$ws['tempActExtra1'] $SITE['extraTemp1'] %generalextratemp1% Pool
$ws['tempActExtra2'] $SITE['extraTemp2'] %generalextratemp2% extra2

Both extra temps use a descriptive string to display which is ALWAYS passed to the language translation script.

We need the correct description so we add a language line to weather28/_my_texts/wsLanguage-en-local.txt

langlookup|Pool|Max temp ever|

Now the text before the value shows the correct description.

If done the startpage should display the text you want and the temp from the WD tag you specified in tags.wd.txt

You will have to add the langlookup line for every supported language to the corresponding wsLanguage-??-local.txt files.
langlookup|Pool|h e r e the correct t r a n s l a t i o n|

Adding a Pay-Pal button in the side column

In the side column a donate button can be included: You can instruct the display of this button in wsUserSettings.php

#---------------------------------------------------------------------------
#		optional donate button
#---------------------------------------------------------------------------
if (isset ($SITE['donateButton']) 		&& $SITE['donateButton'] == true) {
	include ('_widgets/donateButton.php');
}

In the wsSideColom.php script this setting is cecked and the donate button is added when true

#---------------------------------------------------------------------------
#		optional donate button
#---------------------------------------------------------------------------
if (isset ($SITE['donateButton']) 		&& $SITE['donateButton'] == true) {
	include ('_widgets/donateButton.php');
}

As you see above in the wsSideColom.php lines, the code to be included is in weather28/_widgets/donateButton.php <WRAP important 100%> Be aware that this code is an example for 4 languages. You have to generate your own code at the pay-pal organization. Otherwise the donations would go to the developer of the template. After that generation you can adapt the code in _widget/

Adding a usage counter

If you start using your Leuven-Template for the first time, you probably noticed a red usage counter on the bottom of the page. When you click that counter the browser will open a page at Histats.com.

You can study the pro and cons of such a counter and decide either to remove or adapt the counter to your liking. As long as you leave the code unchanged you will see the results for the other users who are also just starting with the implementation of the template.

As far as I know the free HiStats counter is save and is never accused of wrong-doing, what so ever.

Adapting the counter

  • The code for the Histats counter is stored in weather28/_widgets/histats.txt
  • If you configured your own histats counter use the code you downloaded / copied from their site to replace the code in weather28/_widgets/histats.txt
$SITE['statsCode']  = './_widgets/histats.txt';  //      set your own visitors code or set to false
  • if you want to use another counter
    • you can store the needed html/java code in the same manner in a file in weather28/_widgets/
    • change the setting $SITE['statsCode'] to point to the right file
$SITE['statsCode']  = './_myscripts/my_xyz_counter.txt';  //      set your own visitors code or set to false
  • If you do not want a counter set $SITE['statsCode'] = false;
$SITE['statsCode']  = false;  //      set your own visitors code or set to false
en/miscellaneous.txt · Last modified: 2015/09/17 12:09 (external edit)