Author Topic: Ajaxeline AJAX and PHP template. Beta release available.  (Read 112414 times)

xtommo

  • Gentle Breeze
  • **
  • Posts: 48
  • Station Details: LaCrosse WS2355 on iMac 2.66GHz Intel Core 2 Duo
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #75 on: May 02, 2012, 01:29:28 AM »
i believe i have found one of the problems

in the wcfunctions.php file

line 251 - twindgust10 =  (MtoK(wcwindgust)).toFixed(1) + ' kph';

**************************^^^^^^****** should read wcwindgust10

this now shows the correct 10 min wind gust reading...


however WeatherCat is still doing some funny things with readings... or maybe my weather station

im pretty sure its my lacrosse ws2355 weatherstation though

my windspeed and windgust readings are usually pretty much the same they will differ for a half a minute and then match up again same with the windgust averages.

i think that my weather station doesnt update weather cat often enough which will throw the averages out but i dont know if its the weather station that calculates gusts or weather cat itself.

 


tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #76 on: May 04, 2012, 02:47:41 AM »
Thanks for finding that. I've got it fixed in 0.61 which is now available from my site. Also fixed a formatting issue on the iPhone page.

http://atkinsfamily.org/weather-templates

homerc

  • Calm
  • *
  • Posts: 4
  • Station Details: davis vantage pro 2
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #77 on: May 07, 2012, 12:42:03 AM »
I do not understan what the following instruction means:

3. Put wctags.php into your WeatherCat template directory and set it to upload to your webserver root directory. Note this is the only file that weathercat needs to process.

does this mean to move the wctags.php to the WeatherCat Web templats directory in the WeatherCat directory or leave it on the webserver?? [banghead]

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #78 on: May 07, 2012, 02:11:28 AM »
You place the wctags.php in the Weathercat template directory as set in: Weathercat => Preferences => On-Line => Custom Web  and what ever folder you have set as your HTML Source

Tony

batr3a

  • Gentle Breeze
  • **
  • Posts: 12
    • DW5790
    • KMEPARSO2
    • Weather at Maple Trees
  • Station Details: Dedicated Mac Mini, OSX 10.6.8, Davis Vantage Vue, WeatherCat
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #79 on: May 14, 2012, 09:23:25 PM »
I have read thread and am trying to implement the following:

3. Put wctags.php into your WeatherCat template directory and set it to upload to your webserver root directory. Note this is the only file that weathercat needs to process.

How do I process and upload wctags.php when I am using Custom Web for another directory.

Any ideas - I may have missed something.

My Ajaxline 0.61 is at http://www.thetaggarts.net/weather2/ and my Custom Web is at http://www.thetaggarts.net/weather/

Thanks

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #80 on: May 14, 2012, 11:10:59 PM »
This was discussed in an earlier post which i have quoted here:



I may have shot myself in the foot with the rest of it, though. To keep these files separate from my main web site, I uploaded all the files to a subfolder at www.avon-weather.com/live, and that's where I pointed the CGI as well. But WeatherCat's FTP uploads the files to www.avon-weather.com. So I'm not populating the wctags.php file in the "live" subfolder. I can manually drag it there to see what the page looks like.

Any way to point the stuff in the "live" folder to the wctags.pho file in the root folder?

Thanks for your help,
Steve

Yeah, you can create symlink and it should work.

Login to a command prompt on your server via ssh or telnet and go into your /live folder and issue the following command:

Code: [Select]
ln -s ../wctags.php wctags.php

This assumes that the /live folder is a folder underneath your webroot folder where WC is uploading the wctags.php



Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #81 on: May 15, 2012, 01:18:42 AM »
I just ended up putting it in with my regular weather page upload, and renamed index.php to live.php So my AJAXaline link is www.avon-weather.com/live.php
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #82 on: May 15, 2012, 02:45:26 AM »
I just ended up putting it in with my regular weather page upload, and renamed index.php to live.php So my AJAXaline link is www.avon-weather.com/live.php

This is probably the best way. Somebody really ought to start a wiki... heheh

xtommo

  • Gentle Breeze
  • **
  • Posts: 48
  • Station Details: LaCrosse WS2355 on iMac 2.66GHz Intel Core 2 Duo
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #83 on: May 24, 2012, 04:55:10 PM »
hello again
ive been making some mods to personalise the iphone version of the template "m.php" but need a little help with one thing.

i want to add some stats, daily, monthly etc but i am having trouble with getting the format right.

i've added a stats tab/slider thing but when i add the stat tags they dont display properly as in all the data just merges together and is unreadable.

what class or formatting do i need to use to be able to add the stat tags and make them display as in the wctags.php file??

also i sit possible to add the weather underground forecast into the mobile page? icing on the cake ;o)

thanks

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #84 on: May 28, 2012, 02:16:31 AM »
hello again
ive been making some mods to personalise the iphone version of the template "m.php" but need a little help with one thing.

i want to add some stats, daily, monthly etc but i am having trouble with getting the format right.

i've added a stats tab/slider thing but when i add the stat tags they dont display properly as in all the data just merges together and is unreadable.

what class or formatting do i need to use to be able to add the stat tags and make them display as in the wctags.php file??

also i sit possible to add the weather underground forecast into the mobile page? icing on the cake ;o)

thanks

These need to be added the desired stat tags into wctags.php then use a php echo in m.php.

So for example, if you want the max all-time windspeed, you'd add this to wctags.php (i.e. the template file that's in your WC templates directory):

So wctags.php before being processed would have a line like this:
Code: [Select]
$ATMAXWT="STAT$WINDSPEED:MAX:ALLTIME:TIME$";

which will look like this post-processing:
Code: [Select]
$ATMAXWT="34";
[\code]

What this does is set the php variable $ATMAXWT to equal 34. So to include that in m.php, you'd add

[code]
<?php Echo $ATMAXW;?>

This just tells php to print (echo) the variable.

Hope that helps.

xtommo

  • Gentle Breeze
  • **
  • Posts: 48
  • Station Details: LaCrosse WS2355 on iMac 2.66GHz Intel Core 2 Duo
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #85 on: May 29, 2012, 12:08:06 PM »
thanks tigers

but the problem i am having is with the formatting of how it displays.

here is an example

the coding i used is



     <div class id="stats">
               <div class="toolbar">
                    <a href="#" class="back">back</a>
                    <h1><!-- Will be filled in --></h1>
                </div>
                  <?php Echo $STYEAROVERYEAR;?>
               
                  <div class="info"><?php include("footer.php"); ?></div>
            </div>



how can i get it to display properly?

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #86 on: May 29, 2012, 05:06:58 PM »
The $STYEAROVERYEAR tag outputs pre-formatted text so you'll need to use <PRE> and </PRE> tags - i.e.
<PRE>$STYEAROVERYEAR</PRE>

This also applies to other stats tags that output tabled data (i.e STMONTHLY$, STDAILY$ etc).
 
Hope this helps,
Stu.

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #87 on: May 30, 2012, 12:29:53 AM »
thanks tigers

but the problem i am having is with the formatting of how it displays.

here is an example

the coding i used is



     <div class id="stats">
               <div class="toolbar">
                    <a href="#" class="back">back</a>
                    <h1><!-- Will be filled in --></h1>
                </div>
                  <?php Echo $STYEAROVERYEAR;?>
               
                  <div class="info"><?php include("footer.php"); ?></div>
            </div>



how can i get it to display properly?

Stu's right, a <pre> tag wrapping the stat should do it. However I'm not 100% certain even that will work on this template. The issue is that the output of that tag is quite wide and I *think* the template script will truncate it. Never hurts to try tho!

xtommo

  • Gentle Breeze
  • **
  • Posts: 48
  • Station Details: LaCrosse WS2355 on iMac 2.66GHz Intel Core 2 Duo
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #88 on: May 30, 2012, 02:59:28 AM »
thanks guys
the <pre> tag works a charm and the stats display correctly and you just scroll to the right to see all data. the only problem is that the template header remains the same size and doesnt extend the width of the stat data but thats just a cosmetic issue.


WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #89 on: May 30, 2012, 05:11:30 PM »
Good to know you got it going - thanks for the update.