Author Topic: alert box text  (Read 4494 times)

0 Members and 1 Guest are viewing this topic.

Offline LFWX

  • Forecaster
  • *****
  • Posts: 1089
  • Liberty Township, Butler County, Ohio
    • Liberty Fairfield Weather Center
Re: alert box text
« Reply #25 on: December 06, 2012, 01:06:58 AM »
In atom-advisory.php

Around line 506
Change
Code: [Select]
        $string .= '<p>' . $icons_warning.$title . " for zone $Zone.</p>";To
Code: [Select]
        $string .= '<p>' . $icons_warning.$title . " for Butler County, Ohio.</p>";
Around line 509
Change
Code: [Select]
      $Summary = $icons_warning.$title . " for zone $Zone.";To
Code: [Select]
      $Summary = $icons_warning.$title . " for Butler County, Ohio.";
Around line 676
Change
Code: [Select]
          $string .= " for zone $Zone.\n";To
Code: [Select]
          $string .= " for Butler County, Ohio.\n";
Around line 684
Change
Code: [Select]
    $string .= "<strong>Source:</strong> <a href=\"$RSS_URL\">NWS Watches, Warnings or Advisories for zone $Zone</a>\n</p>";To
Code: [Select]
    $string .= "<strong>Source:</strong> <a href=\"$RSS_URL\">NWS Watches, Warnings or Advisories for Butler County, Ohio</a>\n</p>";

An easy way to do this - use the "find and replace" feature of notepad.
Find: "zone $Zone"
Replace with: "Butler County, Ohio"
Station: Davis Vantage Pro2 Fan Aspirated
Software: Virtual Weather Station V14.00p64
www.LFWeatherCenter.com
CWOP: DW1039
CoCoRaHS: OH-BT-1
Weather Underground: KOHHAMIL7
Weather For You: DW1039
Midwestern Weather Network

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: alert box text
« Reply #26 on: December 06, 2012, 12:39:08 PM »
Thank You. This worked!  =D&gt;




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: alert box text
« Reply #27 on: December 07, 2012, 12:06:07 PM »
It fixed it when I have an advisory but did not when I have no advisories. I don't think this is possible.




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline LFWX

  • Forecaster
  • *****
  • Posts: 1089
  • Liberty Township, Butler County, Ohio
    • Liberty Fairfield Weather Center
Re: alert box text
« Reply #28 on: December 08, 2012, 07:03:33 PM »
It fixed it when I have an advisory but did not when I have no advisories. I don't think this is possible.
Like this? http://screencast.com/t/ygBC8V0c6
Station: Davis Vantage Pro2 Fan Aspirated
Software: Virtual Weather Station V14.00p64
www.LFWeatherCenter.com
CWOP: DW1039
CoCoRaHS: OH-BT-1
Weather Underground: KOHHAMIL7
Weather For You: DW1039
Midwestern Weather Network

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: alert box text
« Reply #29 on: December 08, 2012, 08:49:40 PM »
It fixed it when I have an advisory but did not when I have no advisories. I don't think this is possible.
Like this? http://screencast.com/t/ygBC8V0c6

Yes




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline LFWX

  • Forecaster
  • *****
  • Posts: 1089
  • Liberty Township, Butler County, Ohio
    • Liberty Fairfield Weather Center
Re: alert box text
« Reply #30 on: December 08, 2012, 10:22:52 PM »
Hmm, I did a little checking and it turns out back in February I saved my "atom-advisory.php" as "atom-warning.php" (when I switched from zone OHZ070 to county OHC017)...But the 4 instances of "Butler County, Ohio" seem to be the same.
The version is "atom-advisory.php - V2.03 29-Oct-2009"

I've included a copy as a text file on the server http://www.lfweathercenter.com/atom-warning.txt

Here is the code on my index page

Code: [Select]
<?php
if ( isset($_GET['zone']) ) {
   
$DefaultZone $_GET['zone'];
} else {
   
$DefaultZone 'OHC017'// set to your NOAA zone
}
$detailpage  'advisories.php'// overrides $hurlURL setting
$doSummary   1;  // display alert links only, not full alert details
$includeOnly 1;  // include mode
$noprint     1;  // required for echo $advisory_html output
include 'atom-warning.php';
if (
preg_match("|There are no active|i",$advisory_html) ||
   
preg_match("|Advisory Information Unavailable|i",$advisory_html)) {
   echo 
'<div class="advisoryBoxnoactive">' .$advisory_html .'</div>';
}else{
   echo 
'<div class="advisoryBox">' $advisory_html .'</div>';
}
?>

My knowledge of php is rather limited.
Station: Davis Vantage Pro2 Fan Aspirated
Software: Virtual Weather Station V14.00p64
www.LFWeatherCenter.com
CWOP: DW1039
CoCoRaHS: OH-BT-1
Weather Underground: KOHHAMIL7
Weather For You: DW1039
Midwestern Weather Network

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: alert box text
« Reply #31 on: December 08, 2012, 11:43:47 PM »
I will give this a try tommorrow. Thanks!




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: alert box text
« Reply #32 on: December 12, 2012, 02:18:36 PM »
I've figured this out! Change atom-advisory.php.

Change at line 530 to the text you want.

Code: [Select]
  $Summary = $icons_warning.$title . " for Ellis County in West Central Kansas.";




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2432
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: alert box text
« Reply #33 on: December 14, 2012, 07:00:41 PM »
I've figured this out! Change atom-advisory.php.

Change at line 530 to the text you want.

Code: [Select]
 $Summary = $icons_warning.$title . " for Ellis County in West Central Kansas.";


Thanks for pinning this down.  I've changed mine to what I wanted on the main page.  I'll be monitoring it when a warning is issued to make sure I didn't mess something  up.  
« Last Edit: December 14, 2012, 07:05:09 PM by Bunty »

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

 

anything