Author Topic: Help installing firedangerWD with Alt Dashboard 6.95  (Read 1023 times)

0 Members and 1 Guest are viewing this topic.

Offline thebigboi

  • Member
  • *
  • Posts: 24
    • Murfreesboro Weather Station
Help installing firedangerWD with Alt Dashboard 6.95
« on: July 13, 2017, 04:49:49 PM »
I have just recently reinstalled my website from the ground up. I have attempted to install firedangerWD and made the modifications as recommended in http://www.wxforum.net/index.php?topic=20581.msg266869#msg266869 to the three scripts. However, I must be doing something wrong because each time the dashboard fails to load and I have to go back to the original scripts. I am attaching the scripts as modified. If someone could please look at the scripts and tell me what I am doing wrong I sure would appreciate it. I know it can work because I see other sites using it. Thanks. My website is www.murfreesboroweather.com.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Help installing firedangerWD with Alt Dashboard 6.95
« Reply #1 on: July 13, 2017, 05:51:20 PM »
The issue may be in the ajax-dashboard6.php line
Code: [Select]
<?php langtrans('Current FWI'); ?>:<sup>4</sup><br/><a href="<?php echo $fwi_url?>" target="_blank" title="USFS Wildfire Danger"><?php langtrans('Fire Danger'); ?>:</a><br />
The <a href="<?php echo $fwi_url?>" maybe should be <a href="<?php echo $fwi_url; ?>"

When it 'fails to load', what does the error_log on your website say about the error?

The ajaxWDwx3.js is not involved at all with a PHP 'fails to load' error..it will only dynamically update the HTML between
<span class="ajax" id="ajaxfireindex"> ... and </span> with the current FWI.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline thebigboi

  • Member
  • *
  • Posts: 24
    • Murfreesboro Weather Station
Re: Help installing firedangerWD with Alt Dashboard 6.95
« Reply #2 on: July 13, 2017, 08:38:03 PM »
Ken, The error that shows is [13-Jul-2017 19:29:59 America/Chicago] PHP Parse error:  syntax error, unexpected '}' in /home/lganglin/public_html/ajax-dashboard6.php on line 631. FYI, Line 631 is "<?php } // end $useCBI   ?> ". I did make the change you suggested and got the same response.

Offline thebigboi

  • Member
  • *
  • Posts: 24
    • Murfreesboro Weather Station
Re: Help installing firedangerWD with Alt Dashboard 6.95
« Reply #3 on: July 14, 2017, 12:16:59 PM »
Ken, This is the code that I add to the script (ajax-dashboard6.php) that causes the error:<?php } // end $useCBI   ?>                 
<?php if ($useFD) {  //  Show Chandler Buring Index using firedangerWD.php ?>
                             <tr>
                               <td colspan ="2" style="text-align: center;">
                                    <a href="<?php echo $fwi_url?>" target="_blank" title="Nebraska Wildfire Danger">
                                <span class="ajax" id="ajaxfdimg"><img src="firedangerWD.php" height="135" width="170" alt=""/></span></a>
                               </td>
                             </tr>
<?php } // end $useFD   ?>                                     
            </table>
The first and last line are for reference as to where I added the code into the standard script. If I remove the code everything is fine. As soon as I add it back I get an error. Thanks for any assistance you can render. I tried semi-colons at every possible place I thought might work but my efforts were futile.

The first and last line was already there and is for reference only as to the location in the standard

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Help installing firedangerWD with Alt Dashboard 6.95
« Reply #4 on: July 14, 2017, 01:22:36 PM »
The only thing I can see on this is
Code: [Select]
<?php echo $fwi_url?> which should be
Code: [Select]
<?php echo $fwi_url?> (with the semi-colon and space before the closing ?>

Have you tried just that?
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline thebigboi

  • Member
  • *
  • Posts: 24
    • Murfreesboro Weather Station
Re: Help installing firedangerWD with Alt Dashboard 6.95
« Reply #5 on: July 14, 2017, 03:33:52 PM »
Ken, I tried it with the change as you suggested and got an error code as follows: [14-Jul-2017 14:25:49 America/Chicago] PHP Parse error:  syntax error, unexpected '}' in /home/lganglin/public_html/ajax-dashboard6.php on line 632. Line 632 is "<?php } // end $useCBI   ?> ". This is the script line right before the useFD section of the script which I added. You are correct in that the error is in the script that I've added. I'll keep messing with it and sooner or later will hit on something. I appreciate you looking at the code and all you help.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Help installing firedangerWD with Alt Dashboard 6.95
« Reply #6 on: July 15, 2017, 12:08:14 AM »
Are you loading a JQuery source script somewhere in the mix?  The code falls apart right where JQuery comes into play.

I load it in my 'menubar.php' at line 52 in order to use JQuery for my sunlight pie chart:
Code: [Select]
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

In addition there's a problem with the 'jq' substitution I used to avoid naming conflicts for JQuery's default '$' in the javascript.  It's also loaded in my menubar in the sunlight pie chart's javascript routine at line 284:
Code: [Select]
var jq = jQuery.noConflict();

Add these two changes somewhere in your script sequence, and I think it just might start working for you.
Regards, Jerry Wilkins
gwwilk@gmail.com

 

anything