Page 1 of 1

weather blues 2 questions

Posted: Fri 03 Mar 2017 10:09 pm
by fastbysuzuki
Hi I am trying to learn php I have a test site as of yet no data going to it and I have two questions to ask please where can I edit the text
"The weather station in use is the Davis Vantage Pro2, and these pages are updated every 10 minutes
The meteorological day used at this station ends a 9 am." on the index.php page I have searched through god knows how many pages I cannot find it anywhere.
also I would like to remove "humidex" and "sun up" from showing on the index.php page.
any help would be appreciated.
I have asked on the weather by you forum but had no reply's.

Re: weather blues 2 questions

Posted: Fri 03 Mar 2017 11:22 pm
by uncle_bob
fastbysuzuki wrote:Hi I am trying to learn php I have a test site as of yet no data going to it and I have two questions to ask please where can I edit the text
"The weather station in use is the Davis Vantage Pro2, and these pages are updated every 10 minutes
The meteorological day used at this station ends a 9 am." on the index.php page I have searched through god knows how many pages I cannot find it anywhere.
Those options are pulled from the Cumulus station settings.
also I would like to remove "humidex" and "sun up" from showing on the index.php page.
any help would be appreciated.
It's been a while since I used the Weather Blues template but you will need to find the references in the php code.
BTW, Notepad + is great for this stuff so you can open all the pages code at once and search them all for any text string.

Re: weather blues 2 questions

Posted: Sun 05 Mar 2017 7:35 pm
by fastbysuzuki
Hi thanks for the reply, am I right or wrong in assuming the values are taken from cumulus as in the highlighted parts here
"The weather station in use is the Davis Vantage Pro 2 these pages are updated every 10 minutes. The meteorological day used at this station ends at 10am.
I would like to add "Please check the date & time below to ensure information is current."

but I cannot find the text The weather station in use is the ---- these pages are updated every ------ The meteorological day used at this station ends at ----
the only place I have located it is in the indexT.htm but this file is not processed when using wb2
I searched via notepad all the likely php pages looking for the string "the weather station* with no results stumped now! :bash:

Re: weather blues 2 questions

Posted: Sun 05 Mar 2017 11:51 pm
by water01
indexT.htm is the template file that Cumulus processes and uploads as index.htm. All changes should be made in these template files so they are kept and not overwritten in the next upload, so make your changes there.

Re: weather blues 2 questions

Posted: Mon 06 Mar 2017 1:52 am
by uncle_bob
fastbysuzuki wrote:Hi thanks for the reply, am I right or wrong in assuming the values are taken from cumulus as in the highlighted parts here
"The weather station in use is the Davis Vantage Pro 2 these pages are updated every 10 minutes. The meteorological day used at this station ends at 10am.
I would like to add "Please check the date & time below to ensure information is current."

but I cannot find the text The weather station in use is the ---- these pages are updated every ------ The meteorological day used at this station ends at ----
the only place I have located it is in the indexT.htm but this file is not processed when using wb2
I searched via notepad all the likely php pages looking for the string "the weather station* with no results stumped now! :bash:
Like I said. Those text fields are in the Cumulus Station Settings menu item. Change them in there and the webtag will update.

Re: weather blues 2 questions

Posted: Mon 06 Mar 2017 2:40 am
by PaulMy
but I cannot find the text The weather station in use is the ---- these pages are updated every ------ The meteorological day used at this station ends at ----
the only place I have located it is in the indexT.htm but this file is not processed when using wb2
I searched via notepad all the likely php pages looking for the string "the weather station* with no results stumped now
I don't use the WB template but if the standard Cumulus files, including indexT.htm file, are not uploaded (unticked Use Standard Files) for the WB template then there must be a similar file in WB that will have that string.

The View Source of your WB site looks nearly identical to the Cumulus standard files so if that is not the standard Cumulus indexT.htm it is a near like copy of it.

Paul

Re: weather blues 2 questions

Posted: Mon 06 Mar 2017 7:35 pm
by fastbysuzuki
Hi thanks for the reply yes the "include standard files" has to be unticked and "include standard images" (ticked) will carry on searching :|

Re: weather blues 2 questions

Posted: Mon 06 Mar 2017 8:36 pm
by PaulMy
I have just downloaded the WB zip and extracted. I see there is a similar indexT, etc. in the web folder and in indexT.htm

Code: Select all

		<!-- content begins -->
		<div class="cont_top"></div>
		<div id="content">
			<div class="razd_lr_h">
				<div id="left_h">
					<h1 style="padding-top:15px">Welcome to <#longlocation></h1>
					<p>The weather station in use is the <#stationtype>, and these pages are updated every <#interval> minutes.<br />The meteorological day used at this station ends at <#rollovertime>.
					</p>
					<br />
					<h1>Forecast : <span style="color: #000"><#forecast></span></h1><br />
					<!-- WEATHER DATA BEGIN -->
That is where you would edit. Presumably you would have these files being processed and FTP by Cumulus through the extra Files settings.

Enjoy,
Paul

Re: weather blues 2 questions

Posted: Mon 06 Mar 2017 9:15 pm
by PaulMy
Sorry, I may have misled. My first attempt was downloading an older version of WB. Doing a download of V.2.2b I see it has changed quite a bit. I think your answer is in the \lang\text_standard_en.php lines 335, etc. and then in index.php lines 83 to 93

Code: Select all

$Tr_ind_station = "The weather station in use is the  ";
$Tr_ind_update = "and these pages are updated every ";
$Tr_ind_mday = "The meteorological day used at this station ends a";

Code: Select all

		<!-- content begins -->
		<div class="cont_top"></div>
		<div id="content">
			<div class="razd_lr_h">
				<div id="left_h">
					<h1 style="padding-top:15px"><?php echo $Tr_welcome.' '.$Tr_station; ?></h1>
					<p><?php echo $Tr_ind_station.' '.$stationtype.', '.$Tr_ind_update.' '.$interval.' '.$Tr_minutes.'<br />'.$Tr_ind_mday.' '.$rollovertime; ?>.
					</p>
					<br />
					<h1><?php echo $Tr_forecast; ?> : <span style="color: #000"><?php echo $forecast; ?></span></h1><br />
					<!-- WEATHER DATA INCLUSION -->
I am not knowledgeable with PHP so not sure what or how you would edit those.

Enjoy,
Paul

Re: weather blues 2 questions

Posted: Mon 06 Mar 2017 10:02 pm
by PaulMy
Checking your http://ncirossallpoint.co.uk/weather/ and looks like you've found it and got it changed.

Enjoy,
Paul

Re: weather blues 2 questions

Posted: Mon 06 Mar 2017 11:25 pm
by fastbysuzuki
Hi, thanks again for the reply it's looks like you have found it as you say I will have to look into how to add to it.
You are looking at out present weather site that is weather blues 1 ( the HTML edition) the one I am working on is a test site and has no data going to it http://www.ncirossallpoint.co.uk/test/index.php