Author Topic: saratoga template, not showing up on website ?! help please!!  (Read 9559 times)

0 Members and 1 Guest are viewing this topic.

Offline wthrmn654

  • Senior Member
  • **
  • Posts: 97
    • Mikes Weather Station
Re: saratoga template, not showing up on website ?! help please!!
« Reply #25 on: August 13, 2016, 11:12:56 PM »
yep ecept i dont have logs or web option

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: saratoga template, not showing up on website ?! help please!!
« Reply #26 on: August 13, 2016, 11:46:47 PM »
yep ecept i dont have logs or web option
Ummm... you did sign up for a "Hosting Account", not a "Site Builder" account.. if you picked the latter, it won't work with (any) template set.
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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: saratoga template, not showing up on website ?! help please!!
« Reply #27 on: August 13, 2016, 11:53:48 PM »
I just figured out what you did.. you unzipped the Base-USA into a Base-USA directory, and the MB-plugin into an MB-plugin directory.

That's incorrect.  The contents of the Base-USA.zip should go into the 'home' directory, as should the contents of the MB-plugin and the saratoga-icons.zip files.

When I said 'use the extract to here' option, that was to prevent the WinZip from extracting it to a subdirectory.

Correct the directory structure, and try your uploads again.
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 wthrmn654

  • Senior Member
  • **
  • Posts: 97
    • Mikes Weather Station
Re: saratoga template, not showing up on website ?! help please!!
« Reply #28 on: August 14, 2016, 08:40:59 AM »
So the home directory is what exactly? Name wise

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #29 on: August 14, 2016, 09:10:32 AM »
What Ken meant is that you took the ZIP file, unzipped it into a new folder and then uploaded this folder to your server, which means that on your server, the path to the files was like this:

SERVER_ROOT/folder/files

but you need to upload the content of this folder directly to the server root, which means it will be:

SERVER_ROOT/files

So for example the renamed wxindex.php will be directly in the root

SERVER_ROOT/index.php - this is where the server looks for the homepage.

What you should do now is simply transfer all the files in that directory you uploaded one level above.

Offline wthrmn654

  • Senior Member
  • **
  • Posts: 97
    • Mikes Weather Station
Re: saratoga template, not showing up on website ?! help please!!
« Reply #30 on: August 14, 2016, 09:22:46 AM »
I tried to do that,it won't let me

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #31 on: August 14, 2016, 09:29:54 AM »
What do you mean "won´t let me"

Do you use some FTP client?

Offline wthrmn654

  • Senior Member
  • **
  • Posts: 97
    • Mikes Weather Station
Re: saratoga template, not showing up on website ?! help please!!
« Reply #32 on: August 14, 2016, 10:12:45 AM »
I uploaded it into the first section it let's me to online.

Offline wthrmn654

  • Senior Member
  • **
  • Posts: 97
    • Mikes Weather Station
Re: saratoga template, not showing up on website ?! help please!!
« Reply #33 on: August 14, 2016, 10:13:31 AM »
If someone thinks they can get it to upload right,I'll more then gladly let them try for me!

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #34 on: August 14, 2016, 10:22:50 AM »
If you PM me your FTP details I can try.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #35 on: August 14, 2016, 10:54:20 AM »
OK I fixed the paths and I set your template to use the MBTags, but there is still some problem. I guess Ken will have to help us here, I am not very familiar with Saratoga template, so I probably wont get much further.

http://wthrmn654.bravehost.com/

Offline wthrmn654

  • Senior Member
  • **
  • Posts: 97
    • Mikes Weather Station
Re: saratoga template, not showing up on website ?! help please!!
« Reply #36 on: August 14, 2016, 11:01:48 AM »
I hate you! That took you no time lol

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #37 on: August 14, 2016, 11:04:15 AM »
It did actually, because your server is exceptionally slow, so it took about 2 minutes just to transfer the files :D Normally it should take a few miliseconds :D

The other thing I did is set up your ajax and that works fine, if you look at the header, it shows your current conditions. The problem right now is in some included function, I cannot tell what exactly is causing this because I don´t know in which file that function is supposed to be included. Either you have some files missing or some path is incorrectly set, but it should be possible for Ken now to tell what is wrong :)

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: saratoga template, not showing up on website ?! help please!!
« Reply #38 on: August 14, 2016, 11:30:47 AM »
Yes, a simple problem.  There has been some essential code removed from Settings.php which now reads (at the end)
Code: [Select]
##########################################################################
# end of configurable settings
##########################################################################
?>
  and should have at the end
Code: [Select]
##########################################################################
# end of configurable settings
##########################################################################
# Multilanguage support constants - please do NOT change the settings below
#DO NOT CHANGE THESE SETTINGS
$SITE['installedLanguages'] = array (
  'af' => 'Afrikaans',
  'bg' => 'български език',
  'ct' => 'Català',
  'dk' => 'Dansk',
  'nl' => 'Nederlands',
  'en' => 'English',
  'fi' => 'Suomi',
  'fr' => 'Français',
  'de' => 'Deutsch',
  'el' => 'Ελληνικά',
  'ga' => 'Gaeilge',
  'hu' => 'Magyar',
  'it' => 'Italiano',
  'no' => 'Norsk',
  'pl' => 'Polski',
  'pt' => 'Português',
  'ro' => 'limba română',
  'es' => 'Español',
  'se' => 'Svenska',
);
# DO NOT CHANGE THESE SETTINGS
$SITE['ISOLang'] = array ( // ISO 639-1 2-character language abbreviations from country domain
  'af' => 'af',
  'bg' => 'bg',
  'ct' => 'ca',
  'dk' => 'da',
  'nl' => 'nl',
  'en' => 'en',
  'fi' => 'fi',
  'fr' => 'fr',
  'de' => 'de',
  'el' => 'el',
  'ga' => 'ga',
  'it' => 'it',
  'hu' => 'hu',
  'no' => 'no',
  'pl' => 'pl',
  'pt' => 'pt',
  'ro' => 'ro',
  'es' => 'es',
  'se' => 'sv',
);
# DO NOT CHANGE THESE SETTINGS
$SITE['langCharset'] = array( // for languages that DON'T use ISO-8859-1 (latin) set
 'bg' => 'ISO-8859-5',
 'el' => 'ISO-8859-7',
 'hu' => 'ISO-8859-2',
 'ro' => 'ISO-8859-2',
 'pl' => 'ISO-8859-2',
 'ru' => 'UTF-8',
 'gr' => 'UTF-8'
);
# DO NOT CHANGE THESE SETTINGS
$SITE['WULanguages'] = array ( // for WeatherUnderground forecast supported languages
  'af' => 'afrikaans',
  'bg' => 'bulgarian',
  'ct' => 'catalan',
  'dk' => 'danish',
  'nl' => 'dutch',
  'en' => 'english',
  'fi' => 'finnish',
  'fr' => 'french',
  'de' => 'deutsch',
  'el' => 'greek',
  'ga' => 'gaelic',
  'hu' => 'hungarian',
  'it' => 'italian',
  'no' => 'norwegian',
  'pl' => 'polish',
  'pt' => 'portuguese',
  'ro' => 'romanian',
  'es' => 'espanol',
  'se' => 'swedish',
);
# End - multilanguage support constants
# Now prune the installedLanguages based on langavail selection
$tarray = array();
foreach ($SITE['langavail'] as $n => $k) {
  if(isset($SITE['installedLanguages'][$k])) {
    $tarray[$k] = $SITE['installedLanguages'][$k];
  }
}
$SITE['installedLanguages'] = $tarray;
# end prune the installedLanguages based on langavail selection
#
# set the Timezone abbreviation automatically based on $SITE['tzname'];
# Set timezone in PHP5/PHP4 manner
  if (!function_exists('date_default_timezone_set')) {
putenv("TZ=" . $SITE['tz']);
// print "<!-- using putenv(\"TZ=". $SITE['tz']. "\") -->\n";
    } else {
date_default_timezone_set($SITE['tz']);
// print "<!-- using date_default_timezone_set(\"". $SITE['tz']. "\") -->\n";
   }

$SITE['tzname'] = date("T",time());
if($SITE['allowThemeSwitch']) {
  # begin Color Theme Switcher Plugin by Mike Challis
  # http://www.642weather.com/weather/scripts.php
  include_once('include-style-switcher.php');
  $SITE['CSSscreen'] = validate_style_choice();
  # end Color Theme Switcher Plugin
} else {
  session_start(); // for preservation of language settings.
  if ($SITE['CSSwideOrNarrowDefault'] == 'wide') {
          $_SESSION['CSSwidescreen'] = 1;
          $CSSstyle = str_replace ('.css','-wide.css',$SITE['CSSscreenDefault']);
  } else {
          $_SESSION['CSSwidescreen'] = 0;
          $CSSstyle = str_replace ('.css','-narrow.css',$SITE['CSSscreenDefault']);
  }
  $SITE['CSSscreen'] = $CSSstyle;
}
# Automatic Info we might need
############################################################################
if(isset($_SERVER['REMOTE_ADDR']))   {$SITE['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR'];}
if(isset($_SERVER['REMOTE_HOST']))   {$SITE['REMOTE_HOST'] = $_SERVER['REMOTE_HOST'];}
if(isset($_SERVER['DOCUMENT_ROOT'])) {$SITE['WEBROOT'] = $_SERVER['DOCUMENT_ROOT'];}
if(isset($_SERVER['REQUEST_URI']))   {$SITE['REQURI'] = $_SERVER['REQUEST_URI'];}
if(isset($_SERVER['SERVER_NAME']))   {$SITE['SERVERNAME'] = $_SERVER['SERVER_NAME'];}
$SITE['remote'] = "onclick=\"window.open(this.href,'_blank');return false;\"";
$SITE['PHPversion'] = phpversion();
// default settings needed for various pages when the weather software plugin is not installed.
// do not change these
$SITE['WXsoftwareURL'] = '#';
$SITE['WXsoftwareLongName'] = '(unspecified)';
$SITE['WXtags'] = '';
# now fetch the weather software settings if it exists
if(isset($_REQUEST['wx']) and file_exists('Settings-weather-'.strtoupper($_REQUEST['wx']).'.php')) {
include_once('Settings-weather-'.strtoupper($_REQUEST['wx']).'.php');
} elseif(file_exists("Settings-weather.php")) {
    include_once("Settings-weather.php");
}
?>

The missing code in Settings.php is causing the error you see.  Put that code back, and the site should function correctly.
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #39 on: August 14, 2016, 11:35:14 AM »
done

Offline wthrmn654

  • Senior Member
  • **
  • Posts: 97
    • Mikes Weather Station
Re: saratoga template, not showing up on website ?! help please!!
« Reply #40 on: August 14, 2016, 01:35:58 PM »
Oh you people are so nice lol. How about the radar stuff lol

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #41 on: August 14, 2016, 01:45:09 PM »
You need to go through the settings and customize it for your location. Just open the Settings.php and edit it and then upload it replacing the current one.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: saratoga template, not showing up on website ?! help please!!
« Reply #42 on: August 14, 2016, 03:06:20 PM »
Now the issue is with Settings-weather.php.  It currently ends with
Code: [Select]
##########################################################################
# end of configurable settings
?>
and needs to have this instead
Code: [Select]
##########################################################################
# end of configurable settings
#
// default settings needed for various pages when the weather software plugin is not installed.
// do not change these
$SITE['WXsoftware']     = 'MB';  // 'WD' for Weather-Display, 'CU' for Virtual Weather Station,
                                 // 'CU' for Cumulus, 'CU' for Cumulus, 'WXS' for WXSolution
                                 // 'MH' for Meteohub
$SITE['WXsoftwareURL'] = 'http://www.meteobridge.com/wiki/index.php/Main_Page';
$SITE['WXsoftwareLongName'] = 'Meteobridge';
$SITE['ajaxDashboard'] = './ajax-dashboard.php';
$SITE['trendsPage']     = 'MB-trends-inc.php'; // CU-specific trends page
?>

That's zero for two on modifications made to the site that have deleted essential code.  Please--only configure the parts marked for configuration and leave the rest of the code where you find it..it is essential for the proper operation of your site.

Also.. you are missing the ./forecast/images/*.jpg images from the saratoga-icons.zip file.. upload them to have conditions images displayed in the forecast.

And, in Settings.php you have
Code: [Select]
$SITE['cityname']        = Orient;
which is incorrect syntax for PHP.  Change it to
Code: [Select]
$SITE['cityname']        = 'Orient';
« Last Edit: August 14, 2016, 03:10:25 PM by saratogaWX »
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #43 on: August 14, 2016, 04:21:45 PM »
Hi Ken,
I have no clue what he has done.... I will try to do what you suggested

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #44 on: August 14, 2016, 04:56:34 PM »
OK, I fixed the settings-weather (I think the problem is that what he did is when he saw "end of ...." he deleted everything that followed).

I copied it back and I fixed the location in the Settings.php.

The images for the forecast were on the server, but he created a separate subdirectory for them, that should now be ok too. But there still seem to be some images missing, which Im not sure where to look for...

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: saratoga template, not showing up on website ?! help please!!
« Reply #45 on: August 14, 2016, 05:06:54 PM »
...getting to know Saratoga Template :D

The problem was he has the gif images and set jpg in the settings. It still throws an error in the thermometer script though, the WXSoftware is set correctly. Possibly a problem with GD support?

Offline wthrmn654

  • Senior Member
  • **
  • Posts: 97
    • Mikes Weather Station
Re: saratoga template, not showing up on website ?! help please!!
« Reply #46 on: August 14, 2016, 06:30:38 PM »
Ugh lol

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: saratoga template, not showing up on website ?! help please!!
« Reply #47 on: August 14, 2016, 06:35:51 PM »
The thermometer.php is broken because the Settings.php has a space before the <?php at the start of the file.

Both Settings.php and Settings-weather.php (and Settings-language.php if it exists) must start with <?php as the first characters in the respective file and end with ?> with no blank lines either before or after them.  The thermometer.php will include Settings.php to get the UOM to use for temperature, and the space before the starting <?php will cause the webserver to emit a header message which spoils the raw PNG file generated by the script.

.gif images are ok and check-fetch-times.php?show=info shows that GD is present, and the .gif images for the forecast are in the expected location :)

Remove the starting space before the <?php in Settings.php and the thermometer will show correctly.
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: saratoga template, not showing up on website ?! help please!!
« Reply #49 on: August 14, 2016, 06:51:48 PM »
Now to customize it for his forecast, NOAA warning zones, local radar...

Then there's the getting Meteobridge to both process and upload the MBtags.php and use the conds.php HTTP to update his realtime and gauges files regularly.  Right now, it's just showing the sample data from my site (in 2013) so the template could be seen as 'working'.

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