Author Topic: Caterlake Gizmo on wxindex.php  (Read 2871 times)

0 Members and 1 Guest are viewing this topic.

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Caterlake Gizmo on wxindex.php
« on: July 21, 2008, 06:26:14 PM »
On the wxindex.php page I set the...

$showGizmo = true;  // set to false to exclude the gizmo

and when I do I get this error and the currents do not load.

Fatal error: Cannot redeclare gen_difference() (previously declared in /home/mesquit1/public_html/weather/ajax-gizmo.php:134) in /home/mesquit1/public_html/weather/ajax-dashboard.php on line 692

Is their a setting I need to set that I am overlooking to use the gizmo on the index page?

-Thanks

Offline Arthurhh

  • Senior Contributor
  • ****
  • Posts: 266
  • IT Fixer
    • Tokoroa Weather Live
Re: Caterlake Gizmo on wxindex.php
« Reply #1 on: July 21, 2008, 10:08:16 PM »
I dont think you can run the gizmo on the dashboard page, I too get this issue but have not worried as the gizmo is redundant anyway when the dashboard is present


Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: Caterlake Gizmo on wxindex.php
« Reply #2 on: July 21, 2008, 11:30:45 PM »
I would have to agree, it is a little redundant with all the other information on that page. It just looks real plain though on the front page with just the temp up there all alone. At the least I would like to have the date and local time. I see it is possible from the Carter Lake page.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Caterlake Gizmo on wxindex.php
« Reply #3 on: July 22, 2008, 01:19:15 AM »
In the current Canada, USA, World distributions, you can run either the ajax-dashboard OR the ajax-gizmo on a page, but not both.  The reason is that the AJAX requires unique id="ajax...." for each WD variable to be AJAXed .. HTML rules allow only one instance of a specific id="" per page.  On the wxindex.php, leave the $showGizmo = false; so the dashboard will have the correct information.

In a future release, I'll replace the ajax-gizmo with a new one (and a modified ajaxWDwx.js script) so that you could run the gizmo on each page (including the one with the dashboard) .. but that's a future release :)

Best regards,
Ken
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 MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: Caterlake Gizmo on wxindex.php
« Reply #4 on: July 22, 2008, 01:23:15 AM »
Thanks for the explanation Ken. I am not real familiar with how AJAX works, but I like its functionality. I guess I can live with for the meantime and wait for future upgrades. I like the layout so far and I am really enjoying customizing it.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Caterlake Gizmo on wxindex.php
« Reply #5 on: July 22, 2008, 01:47:42 AM »
Cool!  I'm glad you like it.  The template set was a communal effort starting with TNETweather/Carterlake doing the first HTML template set for Weather-Display.  Then Carterlake and Pinto collaborated for the original AJAX routine (with enhancements made by jcweather and myself).  I released a Carterlake HTML template with AJAX.  Then MCHALLIS and I collaborated to integrate TNETweather's PHP site design into a Carterlake/AJAX/PHP template you're using now.  I've also worked with multiple international sites to do the translations for the World-ML (multilingual) Carterlake/AJAX/PHP template set (which does have the new gizmo/ajaxWDwx.js script set) .. I'm retrofitting that into the Canada/USA/World set for the next release of them.

Best regards,
Ken
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