FinWX Foorumi
keskiviikko, 08.02.2012, 19:23 *
Tervetuloa, Vieras. Ole hyvä ja kirjaudu tai rekisteröidy.
Jäikö aktivointi sähköposti saamatta?

Kirjaudu käyttäjätunnuksen, salasanan ja istunnonpituuden mukaan
Uutiset:
04.02.2012
FinWX-asemien lukumäärässä tuli nyt 60 täyteen!!

Toivotamme lämpimästi tervetulleeksi FinWX Valkeakoski-72:n!!
Sääasema on Länsi-Suomen läänin 19. FinWX-jäsenasema.
Lue uudesta sääasemasta lisää täältä

Tervetuloa mukaan!!
 
   Etusivu   Ohjeet Haku Kalenteri Kirjaudu Rekisteröidy  
Sivuja: 1 ... 4 5 [6]
  Tulostusversio  
Kirjoittaja Aihe: Sivut muuttavat!  (Luettu 2166 kertaa)
0 jäsentä ja 1 vieras katselee tätä aihetta.
teutari
Taso ei enää mitattavissa
*****
Poissa Poissa

Viestejä: 965


WWW
« Vastaus #50 : tiistai, 04.08.2009, 18:20 »

Latasin kanssa tuon uudemman paketin Saratogasta kun minulla on se vanhempi 1-versio käytössä, tein siihen ne tarvittavat asetukset kun siihen oli näköjään tullut muutamia juttuja lisää mutta ei sen kanssa mitään ongelmia näyttänyt olevan.

Siellä on nyt jossain sivun koodissa pieni virhe mikä sotkee koko sivuston, mutta missä?

Tuossa alhaalla on ne asetukset mitä tein ja muuta ei tarvitse tehdä niin sivut toimivat oikein.
Muuta nuo punaisella olevat omiisi ja loput kuin noissa sivuissa ne on laitettu.

Muuten mitä editoria käytät kun teet noihin asetuksiin muutoksia?

ajaxWDwx.js

// -- begin settings --------------------------------------------------------------------------
var flashcolor = '#00CC00'; // color to flash for changed observations RGB
var flashtime  = 2000;       // miliseconds to keep flash color on (2000 = 2 seconds);
var reloadTime = 10000;       // reload AJAX conditions every 5 seconds (= 5000 ms)
var maxupdates = 12;            // Maxium Number of updates allowed (set to zero for unlimited)
                             // maxupdates * reloadTime / 1000 = number of seconds to update
var clientrawFile = '/clientraw.txt'; // location of clientraw.txt relative to this page on website
var ajaxLoaderInBody = false; // set to true if you have <body onload="ajaxLoader(..."
var imagedir = './ajax-images';  // place for wind arrows, rising/falling arrows, etc.
var useunits = 'M';         // 'E'=USA(English) or 'M'=Metric
var useKnots = false;       // set to true to use wind speed in Knots (otherwise
                     // wind in km/hr for Metric or mph for English will be used.
var useMPS   = true;       // set to true for meters/second for metric wind speeds, false= km/h
var useMPH   = false;       // set to true to force MPH for both English and Metric units
var useFeet  = false;       // set to true to force Feet for height in both English and Metric
var usehPa  = true;       // set to true to force hPa for baro in both English and Metric
var showUnits = true;       //  set to false if no units are to be displayed
var thermometer = './thermometer.php'; // script for dynamic thermometer PNG image (optional)
// optional settings for the Wind Rose graphic in ajaxwindiconwr as wrName + winddir + wrType
var wrName   = 'wr-';       // first part of the graphic filename (followed by winddir to complete it)
var wrType   = '.png';      // extension of the graphic filename
var wrHeight = '58';        // windrose graphic height=
var wrWidth  = '58';        // windrose graphic width=
var wrCalm   = 'wr-calm.png';  // set to full name of graphic for calm display ('wr-calm.gif')
// -- end of settings -


ajax-dashboard.php

// --- settings for standalone use --------------------------
$Lang    = 'en';
$uomTemp = '&deg;F';
$uomBaro = ' inHg';
$uomWind = ' mph';
$uomRain = ' in';
$uomPerHour = '/hr';
$imagesDir = './ajax-images/';  // directory for ajax-images with trailing slash
//  $timeFormat = 'D, d-M-Y g:ia T';  // Fri, 31-Mar-2006 6:35pm TZone
$timeFormat = 'd-M-Y g:ia';  // Fri, 31-Mar-2006 6:35pm TZone
$timeOnlyFormat = 'g:ia';    // h:mm[am|pm];
//$timeOnlyFormat = 'H:i';     // hh:mm
$dateOnlyFormat = 'd-M-Y';   // d-Mon-YYYY
$WDdateMDY = true;     // true=dates by WD are 'month/day/year'
//                     // false=dates by WD are 'day/month/year'

$ourTZ = "Europe/Helsinki";  //NOTE: this *MUST* be set correctly to
// translate UTC times to your LOCAL time for the displays.
//
// optional settings for the Wind Rose graphic in ajaxwindiconwr as wrName . winddir . wrType
$wrName   = 'wr-';       // first part of the graphic filename (followed by winddir to complete it)
$wrType   = '.png';      // extension of the graphic filename
$wrHeight = '58';        // windrose graphic height=
$wrWidth  = '58';        // windrose graphic width=
$wrCalm   = 'wr-calm.png';  // set to full name of graphic for calm display ('wr-calm.gif')
$haveUV   = false;        // set to false if no UV sensor
$haveSolar = true;       // set to false if no Solar sensor
$WXtags  =  'testtags.php';  // source of our weather variables
$fcstorg =   'NWS'; // default forecast organization ('NWS','EC','WU','WXSIM')
$fcstscript = 'advforecast2.php'; // default forecast script
//            NWS - 'advforecast2.php', EC - 'ec-forecast.php',
//            WU - 'WU-forecast.php', WXSIM - 'plaintext-parser.php',
$UVscript      = 'get-UV-forecast-inc.php'; // worldwide forecast script for UV Index
//   comment out above line to exclude UV forecast
$DavisVP   = false;    // set to false if weather station is not a Davis VP
$showSnow   = true;      // set to false if Snow values not recorded manually in WD
$showSnowTemp = 4;      // display Snow instead of Rain when temp (C) is <= this temperature.
// --- end of settings for standalone use


Setting.php

# Sitewide configuration
#
############################################################################
$SITE['charset']      = 'ISO-8859-1'; // character set for webpages (iso-8859-1=latin)
$SITE['WDlanguage']      = 'en';  // Language used by WD
#  ='en' - English, 'de' = German, 'dk' = Danish, 'it'=Italian, 'fr'=French,
#  ='es' - Spanish, 'no' = Norwegian
#
# Multilanguage support
$SITE['allowLanguageSelect'] = true; // set to false to disable the the use of language selector
$SITE['useLanguageFlags'] = true;  // true=show flags, false=show language 2-char abbreviations
$SITE['lang'] = 'fi'; // default language
$SITE['langavail'] = array('en',   // select languages to offer here.  Use comments to remove languages
// array('en', should be first entry on line above
  'af',  // afrikaans
  'bg',  // bulgarian
//  'ct', // 'catalan',
  'dk', // 'danish',
  'nl', // 'dutch',
  'fi', // 'finnish',
  'fr', // 'french',
  'de', // 'german',
  'el', // 'greek',
  'it', // 'italian',
  'no', // 'norwegian',
  'pl', // 'polish',
  'pt', // 'portuguese',
  'es', // 'spanish',
  'se', // 'swedish',
);

$SITE['CSSscreen']      = 'weather-screen-php.css'; // 800px design
$SITE['CSSprint']      = 'weather-print-php.css';
#
#$SITE['CSSscreen']      = 'weather-screen.css'; // Classic design
#$SITE['CSSprint']      = 'weather-print.css';

#############################################
# Mike Challis' Theme Switch configuration
$SITE['allowThemeSwitch']   = false;  // set to false to disable the the use of Theme Switcher
$SITE['CSSscreenDefault'] = 'weather-screen-orange.css';
$SITE['CSSwideOrNarrowDefault'] = 'wide'; // 'narrow' or 'wide'
#############################################
$SITE['flyoutmenu'] = true; // set to false to use classic menubar.php instead

$SITE['clientrawfile']   = './clientraw.txt';  // relative FILE location of clientraw.txt

# if your WD uploads almanac dates using a language OTHER THAN English, please put the month
# names in your language to replace the English ones below.  This is used primarily by the
# wxastronomy.php page for the local dates of moon phases, solistices, and equinoxes
$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language
'January','February','March','April','May','June',
'July','August','September','October','November','December'
);

//$SITE['monthNames'] = array(  // Danish for wxastronomy page .. replace with month names in your language
//'januar','februar','marts','april','maj','juni',
//'juli','august','september','oktober','november','december'
//);

# Configurable Carterlake/WD/PHP template Site Settings
############################################################################
$SITE['WXtags']         = 'testtags.php';  // for testtags.php weather variables
//$SITE['WXtags'] = 'testtags-dk.php';
$SITE['organ']         = 'World Multilingual Website with WD/PHP &amp; AJAX';
$SITE['copyr']         = '&copy; ' . date("Y",time()) . ', Your Weather Website';
$SITE['remote']         = "onclick=\"window.open(this.href,'_blank');return false;\"";
$SITE['tz']          = 'Europe/Helsinki'; //NOTE: this *MUST* be set correctly to
// translate UTC times to your LOCAL time for the displays.
//  http://saratoga-weather.org/timezone.txt  has the list of timezone names
//  pick the one that is closest to your location and put in $ourTZ like:
//    $ourTZ = 'America/Los_Angeles';  // or
//    $ourTZ = 'Europe/Brussels';
$SITE['location']       = 'Somewhere, Some Country';
$SITE['email']         = 'mailto:somebody@somemail.org';
# Weather Station sensors
$SITE['DavisVP']      = false;  // set to false if not a Davis VP weather station
$SITE['UV']         = false;  // set to false if no UV sensor
$SITE['SOLAR']         = true;  // set to false if no Solar sensor
$SITE['showSnow']      = true;   // set to false if snow not recorded on WD
$SITE['showSnowTemp']    = 4;     // show snow instead of rain if temp (C) is <= this amount
# Station location: latitude, longitude, cityname
$SITE['latitude']      = '60.1493';    //North=positive, South=negative decimal degrees
$SITE['longitude']      = '23.9727';  //East=positive, West=negative decimal degrees

$SITE['cityname']      = 'Lohja';
#
#Forecast script settings area
#
$SITE['UVscript']      = 'get-UV-forecast-inc.php'; // worldwide forecast script for UV Index
//   comment out above line to exclude UV forecast
//
# if you have WXSIM and plaintext-parser.php, set $SITE['WXSIM'] = true;
# to have the WXSIM forecast text appear in the dashboard along with your primary forecast org's
# forecast.  
$SITE['WXSIM']         = false;  // Set to false if no WXSIM/plaintext-parser.php
$SITE['WXSIMscript']    = 'plaintext-parser.php'; // script for decoding plaintext.txt into icons
$SITE['defaultlang']   = 'en';   // 'en' for English (WXSIM plaintext-parser.php)

# fcsturlWU  the Wunderground URL for the non-US/non-Canadian forecasts (WU-forecast.php)
$SITE['fcsturlWU']       = 'http://www.wunderground.com/global/stations/02984.html'; // Awhitu, Waiuku New Zealand

$SITE['fcsticonsdir'] = './forecast/images/';
// NOAA-style icons for NWS, WU, WXSIM forecast scripts
#
#---- in the following section, enable settings for ONE primary forecast organization
# pick which script AND org are to be used for your forecast here: (last uncommented pair will
#  be the ones used on the wxforecast.php page and in your dashboard and sidebar

$SITE['fcstscript']   = 'WU-forecast.php';    // Non-USA, Non-Canada Wunderground Forecast Script
$SITE['fcstorg']      = 'WU';    // set to 'WU' for WeatherUnderground

#$SITE['fcstscript']   = 'plaintext-parser.php';    // WXSIM forecast (if only forecast script)
#$SITE['fcstorg']      = 'WXSIM';    // set to 'WXSIM' for WXSIM forecast

$SITE['EUwarningURL']   = 'http://www.meteoalarm.eu/area.asp?lang=EN&ShowDate=&Country=DK&area=420&areaname=';
// EUwarningURL is used by get-meteoalarm-warning-inc.php for EU countries


###########################################################################

# ajax-dashboard, ajax-sidebar settings (will override defaults in
#  the scripts themselves when included in this site
###########################################################################
$SITE['WDdateMDY'] = false; // for WD date format of month/day/year.  =false for day/month/year
$SITE['uomTemp'] = '&deg;C';
$SITE['uomBaro'] = ' hPa';
$SITE['uomWind'] = ' m/s';
$SITE['uomRain'] = ' mm';
$SITE['uomSnow'] = ' cm';
$SITE['uomDistance'] = ' km';  // or ' miles' -- used for Wind Run display
$SITE['uomPerHour'] = '/hr';
$SITE['imagesDir'] = './ajax-images/';  // directory for ajax-images with trailing slash
# note: date format used for PHP parts only.  Weather-Display dates are not processed
#   except on the astronomy page
#$SITE['timeFormat'] = 'D, d-M-Y g:ia T';  // Day, 31-Mar-2006 6:35pm Tz  (USA Style)
//$SITE['timeFormat'] = 'm/d/Y g:ia';      // USA  format 03/31/2006 14:03
$SITE['timeFormat'] = 'd/m/Y H:i';       // Euro format 31/03/2006 14:03
//$SITE['timeFormat'] = 'Y-m-d H:i';       // ISO  format 2006-03-31 14:03

#$SITE['timeOnlyFormat'] = 'g:ia';          // USA format h:mm[am|pm\
$SITE['timeOnlyFormat'] = 'H:i';          // Euro format hh:mm  (hh=00..23);
$SITE['dateOnlyFormat'] = 'd/m/Y';        // for 31-Mar-2008 or 'j/n/Y' for Euro format

##########################################################################
# 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' => '&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080; &#1077;&#1079;&#1080;&#1082;',
  //'ct' => 'Catal&agrave;',
  //'dk' => 'Dansk',
  //'nl' => 'Nederlands',
  'en' => 'English',
  'fi' => 'Suomi',
  //'fr' => 'Fran&ccedil;ais',
  //'de' => 'Deutsch',
  //'el' => '&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;&#940;',
  //'hu' => 'Magyar',
  //'it' => 'Italiano',
  //'no' => 'Norsk',
  //'pl' => 'Polski',
  //'pt' => 'Portugu&ecirc;s',
  //'es' => 'Espa&ntilde;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',
  //'it' => 'it',
  //'hu' => 'hu',
  //'no' => 'no',
  //'pl' => 'pl',
  //'pt' => 'pt',
  //'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',
 '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',
  //'hu' => 'hungarian',
  //'it' => 'italian',
  //'no' => 'norwegian',
  //'pl' => 'polish',
  //'pt' => 'portuguese',
  //'es' => 'espanol',
  //'se' => 'swedish',
);
# End - multilanguage support constants

« Viimeksi muokattu: lauantai, 08.08.2009, 10:15 kirjoittanut teutari » tallennettu



Davis Vantage Pro2 Plus (cabled)
Pentium Dual-Core E5700 3.00GHz/4GHz/Win XP Pro.
jamo
Moderaattori
*****
Poissa Poissa

Viestejä: 271



WWW
« Vastaus #51 : tiistai, 04.08.2009, 19:52 »

Juurikin nuo punaiset kohdat on tullut tehtyä pariinkin kertaa.
Winukan puolella käytin notepadia ja ubuntussa gedit ohjelmaa.

jamo
tallennettu

teutari
Taso ei enää mitattavissa
*****
Poissa Poissa

Viestejä: 965


WWW
« Vastaus #52 : tiistai, 04.08.2009, 20:37 »

Kannattaisi tuohon Winukkaan ladata tuo ilmainen Notepad++ ,  se värittää tuon php koodin niin sillä on paljon helpompi editoida.
tallennettu



Davis Vantage Pro2 Plus (cabled)
Pentium Dual-Core E5700 3.00GHz/4GHz/Win XP Pro.
weatherc
Foorumin Yleismoderaattori
*****
Paikalla Paikalla

Viestejä: 4274


« Vastaus #53 : tiistai, 04.08.2009, 21:14 »

Oon tässä miettinyt että pitäiskö munkin siirtyä tuohon Saratogan templateen, nykyinen templatenihan on alunperin muunnelma siitä...hmm..  Virnist&#228;&#228;
tallennettu

weatherc
Foorumin Yleismoderaattori
*****
Paikalla Paikalla

Viestejä: 4274


« Vastaus #54 : keskiviikko, 05.08.2009, 16:06 »

Testisivu pystyssä:
-- poistettu --  Iskee silm&#228;&#228;, ei suurempia ongelmia ainakaan nuo perusjutut saada, ainoat säädöt mitä tehty on että clientraw.txt ja testtags.php laitettu (kumpikaan ei ole live), aikavyöhyke asetettu muuten on suoraan out of the box-asennus toistaiseksi.
« Viimeksi muokattu: torstai, 06.08.2009, 09:38 kirjoittanut weatherc » tallennettu

teutari
Taso ei enää mitattavissa
*****
Poissa Poissa

Viestejä: 965


WWW
« Vastaus #55 : keskiviikko, 05.08.2009, 17:59 »

Ei oikein ymmärrä missä Jamolla nuo sivustot sitten lopulta hajoaa siihen malliin ettei saada niitä millään toimimaan niin kuin niiden pitäisi? Huh

Jos nuo Setting.php, ajaxWDwx.js ja ajax-dashboard.php perusasetukset on oikein eikä muuhun koodiin ole koskettu niin eipä siinä montaa vaihtoehtoa ole missä koodi on mennyt rikki joko .zip paketin purkuvaiheessa tai sitten tiedostojen uppaamisessa palvelimelle tulee jotakin ihmeellistä.

Nuo kolme tärkeintä tiedostoa kun saisi sinne palvelimelle ehjänä niin uskoisin että sivut toimisivat aivan oikein.
tallennettu



Davis Vantage Pro2 Plus (cabled)
Pentium Dual-Core E5700 3.00GHz/4GHz/Win XP Pro.
weatherc
Foorumin Yleismoderaattori
*****
Paikalla Paikalla

Viestejä: 4274


« Vastaus #56 : keskiviikko, 05.08.2009, 19:18 »

Lainaus
Ei oikein ymmärrä missä Jamolla nuo sivustot sitten lopulta hajoaa siihen malliin ettei saada niitä millään toimimaan niin kuin niiden pitäisi?

En minäkään ymmrrä, kummallista..

Pikkasen aiheesta, ajoin oman nykyisen sivun optimizerin läpi, todella kaameaa luettavaa tuli vastaukseksi, index-sivussa yli 100 html-requestiä ja kokoa yli 500 kb josta yli 300 kb oli sekalaisia kuvia jota puskee css:stä  J&#228;rkyttynyt J&#228;rkyttynyt
Olen kyllä tiennyt että mm. css-filua pitäisi siivota, sinne kun on kerääntynyt yhtä sun toista, joten ajattelin että on helpompi että aloittais "tyhjältä pöydältä" Saratogan templatella, ja napsis datat sinne pala kerrallaan nykyisestä, sen koko orginaalina samassa optimizerissä oli alle 100 Kb ja 23 html-requestiä.

Pistin muuten ww-foorumille suggestionin että oliskos cache & pakkaus-toiminto templateen jotain Virnist&#228;&#228;
tallennettu

jamo
Moderaattori
*****
Poissa Poissa

Viestejä: 271



WWW
« Vastaus #57 : torstai, 06.08.2009, 19:33 »

Vähän etiäpäin, nyt saa ruusukuvakkeen kummallekin kielelle.
Eli ajaxWDwx.js:n kohta var wrType   = '.png';      // extension of the graphic filename oli '.jpg'

Jatkan vertailua ja kartoitusta

jamo
tallennettu

weatherc
Foorumin Yleismoderaattori
*****
Paikalla Paikalla

Viestejä: 4274


« Vastaus #58 : torstai, 06.08.2009, 21:03 »

Vähän etiäpäin, nyt saa ruusukuvakkeen kummallekin kielelle.
Eli ajaxWDwx.js:n kohta var wrType   = '.png';      // extension of the graphic filename oli '.jpg'

Jatkan vertailua ja kartoitusta

jamo

Joskus se on pienestä kiinni Hymyilee Hyvä että alkaa löytymään!
tallennettu

jamo
Moderaattori
*****
Poissa Poissa

Viestejä: 271



WWW
« Vastaus #59 : tiistai, 18.08.2009, 06:51 »

Taas hiukan vertailtu.

Kuvassa vasemmalla teutarin koodia ja oikealla omaa.
Tässäkohtaa kuvassa selvä ero, mutta mistä se johtuu, kuka osaa sanoa?

jamo

edit: komento takaisin tuossa ei olekaan mitään, on eri sivun koodit


* vertailu1.PNG (41.52 kilotavua, 1405x364 - tarkasteltu 43 kertaa.)
« Viimeksi muokattu: tiistai, 18.08.2009, 07:05 kirjoittanut jamo » tallennettu

Sivuja: 1 ... 4 5 [6]
  Tulostusversio  
 
Siirry:  

MySQL pohjainen foorumi PHP pohjainen foorumi Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Validi XHTML 1.0! Validi CSS!