cloudy

Author Topic: Graphic Sun Position  (Read 799 times)

0 Members and 1 Guest are viewing this topic.

Offline RonParWX

  • Posts: 12
  • Paradise, CA
    • none
    • Paradise Weather Station
Graphic Sun Position
« on: December 28, 2011, 09:04:47 PM »
Can anyone please help me with the sunpos.php. I have been working on it for the past couple of days. I get no background colors.
« Last Edit: December 28, 2011, 09:09:08 PM by RonParWX »

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Graphic Sun Position
« Reply #1 on: December 28, 2011, 09:33:15 PM »
What version of jpgraph are you using?

Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
    • Countryside Manor
Re: Graphic Sun Position
« Reply #2 on: December 28, 2011, 10:01:45 PM »
I'm running jpgraph 3.5.0.b1  and all my graphs have white backgrounds also.. so i never got that figured out either..

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Graphic Sun Position
« Reply #3 on: December 28, 2011, 10:15:48 PM »
This was all developed using earlier versions of jpgraph. The most recent versions have a whole different way of choosing the background etc. that will likely need code changes to accomodate. Also note that 3.5 is very sensitive to the order of commands and some older scripts may need to be modified to work as they did before, see reply 256 onward in this thread.

Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
    • Countryside Manor
Re: Graphic Sun Position
« Reply #4 on: December 28, 2011, 10:24:18 PM »
Niko -- yikes, reading thru all of that.. thats gonna be alot of work to the code to change that..  esp for those who use jpgraphs to plot everything else, temp, humidity, wind etc..

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Graphic Sun Position
« Reply #5 on: December 28, 2011, 10:47:30 PM »
Yeah, I gave it a try because I wanted to use a function that's in the new version, but I'm still using the older 'cause I need to spend more time battling the themes thing :banghead: I think themes will be a good addition, but life may be too short for me to get them working as I would like.

Offline RonParWX

  • Posts: 12
  • Paradise, CA
    • none
    • Paradise Weather Station
Re: Graphic Sun Position
« Reply #6 on: December 29, 2011, 12:24:29 AM »
What version of jpgraph are you using?

I'm using version 3.5.0b1
« Last Edit: December 29, 2011, 12:27:32 AM by RonParWX »

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Graphic Sun Position
« Reply #7 on: December 29, 2011, 12:31:50 AM »
See the comments above, if you want it to work as described then I suggest you use an earlier version of jpgraph, I was using 1.21 when I worked on this. 

Offline RonParWX

  • Posts: 12
  • Paradise, CA
    • none
  • OS/Browser:
  • Windows 7/Server 2008 R2
  • Firefox 8.0.1
    • Paradise Weather Station
Re: Graphic Sun Position
« Reply #8 on: December 29, 2011, 03:29:23 PM »
Can anyone please help me with the sunpos.php. I have been working on it for the past couple of days. I get no background colors.

Just a little information about showing the background colors in the sunpos.php. I decided to try removing "required_once('jpgraph_theme.inc.php') from the jpgraph.php script and it worked (or I guess you could just comment it). This is in jpgraph version 3.5.0b1
« Last Edit: December 29, 2011, 03:33:20 PM by RonParWX »

Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
  • OS/Browser:
  • Windows 7/Server 2008 R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Graphic Sun Position
« Reply #9 on: December 29, 2011, 03:39:36 PM »
o wow.. now all my graphs have background colors!  thats great..

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Windows 7/Server 2008 R2
  • MS Internet Explorer 7.0
    • http://www.realweatherstation.com
Re: Graphic Sun Position
« Reply #10 on: December 29, 2011, 03:41:28 PM »
Oooh, that's good, thanks  :D

Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
  • OS/Browser:
  • Windows 7/Server 2008 R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Graphic Sun Position
« Reply #11 on: December 29, 2011, 06:42:30 PM »
any idea whats controlling the white space on the left?

with no white space.   http://frogville.us/include-wxastronomy.php

with white space (yuk) http://frogville.us/wxastronomy.php

wxastronomy is based on wxnewpage.php with this added:

Code: [Select]
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Canada/World-ML template set)
############################################################################
#
#   Project:    Sample Included Website Design
#   Module:     sample.php
#   Purpose:    Sample Page
#   Authors:    Kevin W. Reed <kreed@tnet.com>
#               TNET Services, Inc.
#
Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
############################################################################
# This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once(
"common.php");
############################################################################
$TITLE langtransstr($SITE['organ']) . " - " .langtransstr('Sun, Moon, Seasons');
$showGizmo true;  // set to false to exclude the gizmo
include("top.php");
############################################################################
?>

</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>


 
<?php include("include-wxastronomy.php"); ?>

<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>



UPDATE --
silly css file grr..

<div id="main-copy-dark" style="background: black; color: white; font: 12px Arial; background: <?php echo $stars; ?>">

changed to

<div style="background: black; color: white; font: 12px Arial; background: <?php echo $stars; ?>">

I dont understand the css files totally but somehow that was doing it..

I have other files that call out "main-copy" but none of them add that huge space..  at a loss.. but its fixed..
« Last Edit: December 29, 2011, 07:21:31 PM by tman1991 »

Offline Axelvold

  • Posts: 980
  • Axelvold / Sweden
  • Axelvold, Sverige
  • OS/Browser:
  • Windows XP
  • MS Internet Explorer 8.0
    • Axelvold's weather and photo
Re: Graphic Sun Position
« Reply #12 on: December 29, 2011, 07:26:11 PM »
any idea whats controlling the white space on the left?

with no white space.   http://frogville.us/include-wxastronomy.php

with white space (yuk) http://frogville.us/wxastronomy.php

wxastronomy is based on wxnewpage.php with this added:

UPDATE --
silly css file grr..

<div id="main-copy-dark" style="background: black; color: white; font: 12px Arial; background: <?php echo $stars; ?>">

changed to

<div style="background: black; color: white; font: 12px Arial; background: <?php echo $stars; ?>">

I dont understand the css files totally but somehow that was doing it..

I have other files that call out "main-copy" but none of them add that huge space..  at a loss.. but its fixed..


First there is white space to the left, but if I change to narrow and the back to wide it does go away.



Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
  • OS/Browser:
  • Windows 7/Server 2008 R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Graphic Sun Position
« Reply #13 on: December 29, 2011, 07:28:59 PM »
well i changed it, so there used to be about a 1" white gap on the left.. it was awful..  Somehow calling out the "main-copy" did that.. and i looked at the stylesheet nothing weird there.. dunno why that happened.

for example http://frogville.us/wxforecast-discussion.php uses "main-copy" on a <div id "..." line also.. and no weird space..


Offline RonParWX

  • Posts: 12
  • Paradise, CA
    • none
  • OS/Browser:
  • Windows 7/Server 2008 R2
  • Firefox 8.0.1
    • Paradise Weather Station
Re: Graphic Sun Position
« Reply #14 on: December 29, 2011, 08:02:11 PM »
any idea whats controlling the white space on the left?

with no white space.   http://frogville.us/include-wxastronomy.php

with white space (yuk) http://frogville.us/wxastronomy.php

wxastronomy is based on wxnewpage.php with this added:

Code: [Select]
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Canada/World-ML template set)
############################################################################
#
#   Project:    Sample Included Website Design
#   Module:     sample.php
#   Purpose:    Sample Page
#   Authors:    Kevin W. Reed <kreed@tnet.com>
#               TNET Services, Inc.
#
Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
############################################################################
# This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once(
"common.php");
############################################################################
$TITLE langtransstr($SITE['organ']) . " - " .langtransstr('Sun, Moon, Seasons');
$showGizmo true;  // set to false to exclude the gizmo
include("top.php");
############################################################################
?>

</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>


 
<?php include("include-wxastronomy.php"); ?>

<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>



UPDATE --
silly css file grr..

<div id="main-copy-dark" style="background: black; color: white; font: 12px Arial; background: <?php echo $stars; ?>">

changed to

<div style="background: black; color: white; font: 12px Arial; background: <?php echo $stars; ?>">

I dont understand the css files totally but somehow that was doing it..

I have other files that call out "main-copy" but none of them add that huge space..  at a loss.. but its fixed..

What I did was to include the entire wxastronomy script into my newpage between menubar.php & footer.php instead of using include ("include-wxastronomy.php") That worked for me.
One other question? I can't seem to get the moonrise and illumination in my sunpos.php script to show. I keep getting a error when trying to call the function for $clientrawextra = get_raw("${hostloc}clientrawextra.txt");