Skip to content

Commit 275808c

Browse files
committed
You can define customized heading in config.php.
Humidity is saved separately when variable humV exists.
1 parent d6397f9 commit 275808c

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Application demo: [roudnice.eu](http://www.roudnice.eu)
1111

1212
Read tmep-info-en.html or tmep-info-cz.html for more information.
1313

14-
* **Version 8.2 released at 2017-02-23** (New Highcharts library, better graphs on Actually tab)
14+
* **Version 8.2.1 released at 2017-05-09** (Minor changes - custom page heading in config, humidity detected separately from temperature, proposed by [mikrom](http://www.mikrom.cz))
15+
* Version 8.2 released at 2017-02-23 (New Highcharts library, better graphs on Actually tab)
1516
* Version 8.1.3 released at 2016-12-20 (Fixed XSS vulnerability, thank you [@spazef0rze](https://www.michalspacek.cz)!)
1617
* Version 8.1.2 released at 2016-11-18 (Fix for MySQL 5.7)
1718
* Version 8.1.1 released at 2016-05-09 (Small fixes)

app/config.php

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
// (or your private local address, if webserver and TME are on the same
4242
// local network)
4343

44+
$vlastniTitulekStranky = ""; // $lang['titulekstranky'] = "TH2E - ethernetový teploměr a vlhkoměr";
45+
46+
$vlastniHlavniNadpis = ""; // $lang['hlavninadpis'] = "<span>TH2E</span> - ethernetový teploměr a vlhkoměr";
47+
4448
$umisteni = "Na zahradě"; // CZ: Umisteni teplomeru (text na strance teplomeru)
4549
// EN: Thermoter location (showed as text on webpage)
4650

app/index.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/*************************************************************************
44
*** Systém pro TME/TH2E - TMEP ***
5-
*** (c) Michal Ševčík 2007-2014 - [email protected] ***
5+
*** (c) Michal Ševčík 2007-2017 - [email protected] ***
66
*************************************************************************/
77

88
//////////////////////////////////////////////////////////////////////////
@@ -28,8 +28,10 @@
2828
if(isset($_GET[$GUID]) && $_GET[$GUID] != ""){ $teplota = $_GET[$GUID]; }
2929

3030
// TH2E
31-
if(isset($_GET['tempV']) AND $_GET['tempV'] != "")
32-
{ $teplota = $_GET['tempV']; if(strlen($_GET['humV']) < 7){ $vlhkost = $_GET['humV']; } }
31+
if(isset($_GET['tempV']) AND $_GET['tempV'] != ""){ $teplota = $_GET['tempV']; }
32+
33+
// Vlhkost
34+
if(isset($_GET['humV']) AND strlen($_GET['humV']) < 7){ $vlhkost = $_GET['humV']; }
3335

3436
// nahrazeni carky teckou
3537
$teplota = str_replace(",", ".", $teplota);
@@ -104,7 +106,7 @@
104106
<html>
105107

106108
<head>
107-
<title><?php echo $lang['titulekstranky']; ?></title>
109+
<title><?php if($vlastniTitulekStranky == ""){echo $lang['titulekstranky'];}else{echo $vlastniTitulekStranky;}; ?></title>
108110
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
109111
<link rel="stylesheet" href="css/css.css" type="text/css">
110112
<meta NAME="description" CONTENT="<?php echo $lang['popisstranky']; ?>">
@@ -144,7 +146,7 @@ function loadTab(tab){
144146

145147
echo "<div class='roztahovak-modry'>
146148
<div class='hlavicka container'>
147-
<div id='nadpis'><h1>".$lang['hlavninadpis']."</h1></div>";
149+
<div id='nadpis'><h1>"; if($vlastniHlavniNadpis == ""){ echo $lang['hlavninadpis']; }else{ echo $vlastniHlavniNadpis; } echo "</h1></div>";
148150

149151
if($zobrazitNastaveni == 1)
150152
{

tmep-info-cz.html

+7
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,13 @@ <h2><a name="aktualizace">Aktualizace na verzi 8</a></h2>
178178

179179
<h2><a name="seznamzmen">Seznam změn</a></h2>
180180

181+
<h4>verze 8.2.1 (2017-05-09)</h4>
182+
183+
<ul>
184+
<li>Možnost v konfigu definovat vlastní nadpis stránky.</li>
185+
<li>Vlhkost se ukládá i pokud jen existuje humV sama o sobě.</li>
186+
</ul>
187+
181188
<h4>verze 8.2 (2017-02-23)</h4>
182189

183190
<ul>

tmep-info-en.html

+7
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ <h2><a name="update">Update to v8</a></h2>
168168

169169
<h2><a name="chagelog">Changelog</a></h2>
170170

171+
<h4>version 8.2.1 (2017-05-09)</h4>
172+
173+
<ul>
174+
<li>You can define customized heading in config.php.</li>
175+
<li>Humidity is saved separately when variable humV exists.</li>
176+
</ul>
177+
171178
<h4>version 8.2 (2017-02-23)</h4>
172179

173180
<ul>

0 commit comments

Comments
 (0)