- New page: privacy policy.
- New layout on the about page.
- Added visibility and precipitation for current weather.
- Updated the default language (English).
- Removed the Swedish language for later re-translation.
- Added cookie support on the settings page.
- Added the ability to search for a place (cities only).
- Added better support for weather icons.
- Added a version file for future update checks.
- Using CDN for files that will not be updated so often.
- Using better config method, PHP instead of JSON.
- Bug fixes and improvements.
# You can use variables from {config.json} to print out for an example website's title.
# Here's what variables has been used and from what file:
# $settings->title shows the set title (line 6 in config.php)
# $config_title shows the set title (line 6 in config.php)
# link_(string, url) is a functions and creates a link that opens in a new tab (line 20 in site-functions.php).
$data=[
@ -28,8 +28,9 @@
'link_settings'=>'Settings',
'link_about'=>'About',
'link_faq'=>'FAQ',
'link_privacy'=>'Privacy',
'link_api'=>'API',
'data_from'=>$settings->title.' uses'
'data_from'=>$config_title.' uses'
],
@ -46,12 +47,12 @@
'subtitle_options'=>'Options',
'subtitle_apikey'=>'API key',
'subtitle_save'=>'Save your settings',
'desc_gps'=>'<p>Let '.$settings->title.' use your device\'s GPS to get your current position.</p>',
'desc_manualplace_jsenabled'=>'<p>We are working on adding places. Until then, you can enter coordinates or use the map above and choose a place that way.</p>',
'desc_gps'=>'<p>Let '.$config_title.' use your device\'s GPS to get your current position.</p>',
'desc_manualplace_jsenabled'=>'<p>Search for a place (city) or enter the coordinates.</p>',
'desc_manualplace_jsdisabled'=>'<p>At the moment, you can only enter the coordinates.</p>',
'desc_options'=>'<p>Customize '.$settings->title.' after your liking.</p>',
'desc_apikey'=>'<p>'.$settings->title.' use its own API key, but you can also use your own. Go to '.link_('openweathermap.com','https://openweathermap.org/').' and create an account there (if you don\'t already have one) to get your own API key.</p>',
'desc_save'=>'<p>If you want to use your settings right away, you can use the URL below. Nothing are saved in the database and the link does not expire.</p>',
'desc_options'=>'<p>Customize '.$config_title.' after your liking.</p>',
'desc_apikey'=>'<p>'.$config_title.' uses its own API key, but you are able to use your own. Go to '.link_('openweathermap.com','https://openweathermap.org/').' and create an account (if you don\'t already have one) to get your own API key.</p>',
'desc_save'=>'<p>If you want to get access to your settings in a easy way, you can choose to either use a link or save a cookie on your device. The link will not be stored anywhere and will never expire while the cookie will be automatically deleted from your device 7 days after you pressed the Continue button.</p>',
'error_coordinates_empty'=>'You must enter coordinates in order to continue',
'error_coordinates_invalid'=>'The coordinates are not valid',
'error_apikey_not32'=>'The API key must be 32 characters long',
@ -62,6 +63,7 @@
'info_gps_unavailable'=>'Couldn\'t locate your position. Try again',
'info_urlcopied'=>'The shortcut address has been copied',
'info_searching'=>'Searching, please wait...',
'gps_fetch'=>'Fetch my current position',
'gps_fetching'=>'Trying to find you, please wait...',
'field_place'=>'Place',
@ -79,6 +81,8 @@
'theme_light'=>'Light',
'theme_dark'=>'Dark',
'link_copy'=>'Copy the shortcut address',
'cookie_store'=>'Save a cookie on my device',
'cookie_delete'=>'Delete the cookie',
'button_continue'=>'Continue'
],
@ -87,7 +91,8 @@
'loading'=>'Fetching weather data - please wait...',
'error_401'=>'<p>The given API key can\'t be used. Please go to settings and enter an API key that you have got from OpenWeatherMap by logging in to your OpenWeather account.</p>',
'error_404'=>'<p>An error occured. Please check so the given API key can be used for '.link_('One Call API','https://openweathermap.org/api/one-call-api').'. The issue can also be that the name of the place are wrong.</p>',
'error_429'=>'<p>We can\'t use the given API key because it has been used 60 times under a minute (which is '.link_('the limit for free plans','https://openweathermap.org/price').'). Please wait for a while and then try again.</p><p>In the meantime, you can use our API key by remove your key from the settings page here on '.$settings->title.'.</p>',
'error_429'=>'<p>We can\'t use the given API key because it has been used 60 times under a minute (which is '.link_('the limit for free plans','https://openweathermap.org/price').'). Please wait for a while and then try again.</p><p>In the meantime, you can use our API key by remove your key from the settings page here on '.$config_title.'.</p>',
'error_failed'=>'<p>Something went wrong. Try again by reloading the page. If the error persist, please contact us and explain the error.</p>',
'details_wind'=>'Wind',
'details_feelslike'=>'Feels like',
'details_dewpoint'=>'Dew point',
@ -95,6 +100,8 @@
'details_humidity'=>'Humidity',
'details_pressure'=>'Pressure',
'details_uvindex'=>'UV index',
'details_visibility'=>'Visibility',
'details_precipitation'=>'Precipitation',
'subtitle_forecast_48h'=>'48 hours forecast',
'subtitle_forecast_7d'=>'7 hours forecast at 11:00',
'message_moredatalateron'=>'More data will be added eventually'
@ -102,15 +109,23 @@
'page_about'=>[
'intro'=>'<p>'.$settings->title.' are a weather service that are keen to your privacy. It displays the current weather report, the forecast for the next 48 hours and 7 days for the location you choose.</p>',
'intro'=>'<p>'.$config_title.' are a weather service that strongly respects your privacy. It displays the current weather report, the forecast for the next 48 hours and 7 days for the location you choose.</p>',
'subtitle_opensource'=>'Open source',
'subtitle_install'=>'Install',
'subtitle_privacy'=>'Privacy',
'subtitle_contactus'=>'Contact us',
'subtitle_using'=>'Uses',
'opensource'=>'<p>'.$settings->title.' are free, licensed under <b>GNU GPLv3</b>. See more at '.link_('git.airikr.me/serenum','https://git.airikr.me/serenum').'.</p>',
'privacy'=>'<p>We have strict privacy rules. '.$settings->title.' does not log anything about your visit - period.</p>',
'contactus'=>'<p>You can contact us either through email (hi@serenum.org) or through '.link_('Telegram','https://telegram.org').'. You can join our group with the following link: '.link_('t.me/'.strtolower($settings->title).'foss','https://t.me/'.strtolower($settings->title).'foss').'</p>',
'using'=>'<p>We are using the following to let '.$settings->title.' work as it should.</p>'
'opensource'=>'<p>'.$config_title.' are free, licensed under <b>GNU GPLv3</b>. Go to '.link_('git.airikr.me/serenum','https://git.airikr.me/serenum').' to see the source code.</p>',
'privacy'=>'<p>We have strict privacy rules. '.$config_title.' does not log anything about your visit - period.</p><p>For more info, choose "Privacy" in the footer.</p>',
'install'=>'<p>You can install '.$config_title.' on your own server. The installation are very basic and do not require much experience. Read '.link_('INSTALL.md','https://git.airikr.me/serenum/website/src/branch/master/INSTALL.md').' to get started.</p>',
'contactus'=>'<p>You can contact us via email (<b>hi@serenum.org</b>) and via '.link_('Telegram','https://telegram.org').' by joining our group with the following link: '.link_('t.me/'.strtolower($config_title).'foss','https://t.me/'.strtolower($config_title).'foss').'</p>',
'using'=>'<p>Below you can see what we are using to make '.$config_title.' work.</p>'
],
'page_privacy'=>[
'title'=>'Privacy policy',
'content'=>'<p>'.$config_title.' does not collect any personal or non-personal information about you, the visitor, or any visitors for that matter. We do not want to log anything and will probably never will be. With "probably" we mean that we are not sure if we will log at least your device\'s IP address. But if that happens, we will update our privacy policy and also let you know next time you visit '.$config_title.'.</p><p>As of today, we do not care about how many people are visiting our website. To build and manage a good and stable weather service are our priority.</p>'
],
@ -118,16 +133,16 @@
'title'=>'FAQ',
'items'=>[
[
'question'=>'Are '.$settings->title.'\'s source code open for all?',
'answer'=>'Yes. The source code of '.$settings->title.' can be downloaded by anyone under the GNU GPLv3 license. You can get the source code at '.link_('git.airikr.me/serenum','https://git.airikr.me/serenum').'.'
'question'=>'Are '.$config_title.'\'s source code open for all?',
'answer'=>'Yes. The source code of '.$config_title.' can be downloaded by anyone under the GNU GPLv3 license. You can get the source code at '.link_('git.airikr.me/serenum','https://git.airikr.me/serenum').'.'
],
[
'question'=>'Can I install '.$settings->title.' on my own server?',
'answer'=>'Yes. Go to '.link_('the installation guide','https://git.airikr.me/'.$settings->title.'/website/src/branch/master/INSTALL.md').' to get started.'
'question'=>'Can I install '.$config_title.' on my own server?',
'answer'=>'Yes. Go to '.link_('the installation guide','https://git.airikr.me/'.$config_title.'/website/src/branch/master/INSTALL.md').' to get started.'
],
[
'question'=>$settings->title.' can\'t fetch my current position. Why?',
'answer'=>'<p>There can be several reasons to this.</p><ol><li>You are inside a building. Be close to a window or an open door to allow the satellites to find you easier. But for best result, be sure to be outside with the sky above you.</li><li>The system settings for GPS are set to only use GPS and not WiFi and/or mobile data. If you allow your device to use both WiFi and mobile data when using GPS, your device will be easier to be found.</li><li>The GPS does not work as it should. See if your device can be found in an application for an example '.link_('OsmAnd','https://osmand.net/').', '.link_('Apple Maps','https://apple.com/maps/').' or '.link_('OpenStreetMap','https://openstreetmap.org/').'. If some of these apps can find your location, try again with '.$settings->title.'. If the issue persist, try another device.</li></ol>'
'question'=>$config_title.' can\'t fetch my current position. Why?',
'answer'=>'<p>There can be several reasons to this.</p><ol><li>You are inside a building. Be close to a window or an open door to allow the satellites to find you easier. But for best result, be sure to be outside with the sky above you.</li><li>The system settings for GPS are set to only use GPS and not WiFi and/or mobile data. If you allow your device to use both WiFi and mobile data when using GPS, your device will be easier to be found.</li><li>The GPS does not work as it should. See if your device can be found in an application for an example '.link_('OsmAnd','https://osmand.net/').', '.link_('Apple Maps','https://apple.com/maps/').' or '.link_('OpenStreetMap','https://openstreetmap.org/').'. If some of these apps can find your location, try again with '.$config_title.'. If the issue persist, try another device.</li></ol>'
],
[
'question'=>'How often do the weather data update?',
die_content($settings->title.' - Update language',$language.'.json has been updated. Go to <a href="'.$protocol.'://'.$host.'/serenum">Go to '.$settings->title.'</a>.');
die_content($config_title.' - Update language','<h2>Success</h2><p>'.$language.'.json has been updated. Go to <a href="'.$protocol.'://'.$host.'/serenum">Go to '.$config_title.'</a>.</p>');
# } else {
# die_content($settings->title, 'Can\'t write to <code>'.$file.'</code> due to the lack of permissions.');
# }
}else{
die_content($config_title,'<h2>Permission denied</h2><p>Please set proper permissions for <code>'.$file.'</code>.</p><p>See '.link_('the guide','').' for more information.</p>');
die_content('Please edit the settings file','Please edit <code>configs/website-settings.php</code> after your liking and then go to <a href="'.url('update-settings',true).'">/update-settings</a>.');