Skip to content

Commit

Permalink
update copyright info and notice
Browse files Browse the repository at this point in the history
  • Loading branch information
siddik-web committed Dec 26, 2023
1 parent c475853 commit 9deb476
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ web.config.txt
robots.txt.dist

/node_modules/*
package-lock.json
package-lock.json
.vscode
2 changes: 1 addition & 1 deletion modules/mod_sp_weather/assets/css/flat.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @package mod_sp_weather
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @copyright Copyright (c) 2010 - 2024 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

Expand Down
2 changes: 1 addition & 1 deletion modules/mod_sp_weather/assets/css/mod_sp_weather.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @package mod_sp_weather
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @copyright Copyright (c) 2010 - 2024 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

Expand Down
10 changes: 4 additions & 6 deletions modules/mod_sp_weather/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package mod_sp_weather
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @copyright Copyright (c) 2010 - 2024 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

Expand All @@ -19,7 +19,8 @@ class modSPWeatherHelper {
private $location;
private $forecast_limit;
private $getdataby;
private $locaion_id;
private $location_id;
private $location_ip;
private $location_latlon;
private $api_key;
private $y_appid;
Expand All @@ -41,16 +42,13 @@ class modSPWeatherHelper {
* @param int $id
*/
public function __construct($params, $id) {

jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
$this->params = $params;
$this->moduleID = $id;
$this->moduledir = basename(dirname(__FILE__));
$this->location = str_replace(', ', ',', $this->params->get('location', 'London,GB'));
$this->forecast_limit = $this->params->get('forecast', '7');
$this->getdataby = $this->params->get('getdataby', 'locaion_name');
$this->locationid = $this->params->get('locationid', '2643743');
$this->location_id = $this->params->get('locationid', '2643743');
$this->location_latlon = $this->params->get('location_latlon', '48.139130, 11.580220');
$this->location_ip = $this->params->get('location_ip', '88.198.50.103');
$this->platform = $this->params->get('platform', 'openweathermap');
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_sp_weather/mod_sp_weather.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package mod_sp_weather
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @copyright Copyright (c) 2010 - 2024 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

Expand Down
4 changes: 2 additions & 2 deletions modules/mod_sp_weather/mod_sp_weather.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<name>SP Weather</name>
<author>JoomShaper.com</author>
<creationDate>Sep 2012</creationDate>
<copyright>Copyright (C) 2010 - 2021 JoomShaper.com. All rights reserved.</copyright>
<copyright>Copyright (C) 2010 - 2024 JoomShaper.com. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomshaper.com</authorUrl>
<version>4.0.1</version>
<version>4.0.2</version>
<description>Weather module by JoomShaper.com using 5 API platform.</description>

<languages>
Expand Down
13 changes: 6 additions & 7 deletions modules/mod_sp_weather/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package mod_sp_weather
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @copyright Copyright (c) 2010 - 2024 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

Expand All @@ -15,20 +15,20 @@

if ( $getdataby == 'locaion_id' && $platform == 'openweathermap' ) {
$country = ( isset($data['current']->sys->country) && $data['current']->sys->country ) ? $data['current']->sys->country : '';
$location = (trim($params->get('locationTranslated')) =='') ? $data['current']->name . ', ' . $country : $params->get('locationTranslated');
$location = (trim($params->get('locationTranslated') ?? '') =='') ? $data['current']->name . ', ' . $country : $params->get('locationTranslated');
} else {
if ($platform == 'weatherbit') {
$city = ( isset($data['current']->city_name) && $data['current']->city_name ) ? $data['current']->city_name : '';
$country = ( isset($data['current']->country_code) && $data['current']->country_code ) ? $data['current']->country_code : '';
$location = (trim($params->get('locationTranslated'))=='') ? $city . ', ' . $country : $params->get('locationTranslated');
$location = (trim($params->get('locationTranslated') ?? '')=='') ? $city . ', ' . $country : $params->get('locationTranslated');
} elseif ($platform == 'darksky') {
$location = (trim($params->get('locationTranslated'))=='') ? str_replace('_', ' ', $location) : $params->get('locationTranslated');
$location = (trim($params->get('locationTranslated') ?? '')=='') ? str_replace('_', ' ', $location) : $params->get('locationTranslated');
} elseif ($platform == 'yahoo') {
$city = ( isset($data['current']->sys->city) && $data['current']->sys->city ) ? $data['current']->sys->city : '';
$country = ( isset($data['current']->sys->country) && $data['current']->sys->country ) ? $data['current']->sys->country : '';
$location = (trim($params->get('locationTranslated'))=='') ? $city . ', ' . $country : $params->get('locationTranslated');
$location = (trim($params->get('locationTranslated') ?? '')=='') ? $city . ', ' . $country : $params->get('locationTranslated');
} else {
$location = (trim($params->get('locationTranslated'))=='') ? $params->get('location') : $params->get('locationTranslated');
$location = (trim($params->get('locationTranslated') ?? '')=='') ? $params->get('location') : $params->get('locationTranslated');
}
}

Expand Down Expand Up @@ -81,7 +81,6 @@

$compass = array('N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N');
$data['wind']['direction'] = (isset($data['wind']['direction']) && $data['wind']['direction']) ? $compass[round($data['wind']['direction'] / 22.5)] . Text::_('SP_WEATHER_AT') : '';


echo Text::_($data['wind']['direction']) . $helper->Numeric2Lang($data['wind']['speed']) . ' ' . Text::_(strtoupper($data['units']['speed'])); ?>
</div>
Expand Down
12 changes: 6 additions & 6 deletions modules/mod_sp_weather/tmpl/flat.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package mod_sp_weather
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @copyright Copyright (c) 2010 - 2024 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

Expand All @@ -14,20 +14,20 @@

if ( $getdataby == 'locaion_id' && $platform == 'openweathermap' ) {
$country = ( isset($data['current']->sys->country) && $data['current']->sys->country ) ? $data['current']->sys->country : '';
$location = ( trim((string)$params->get('locationTranslated')) =='' ) ? $data['current']->name . ', ' . $country : $params->get('locationTranslated');
$location = ( trim((string)$params->get('locationTranslated')?? '') =='' ) ? $data['current']->name . ', ' . $country : $params->get('locationTranslated');
} else {
if ($platform == 'weatherbit') {
$city = ( isset($data['current']->city_name) && $data['current']->city_name ) ? $data['current']->city_name : '';
$country = ( isset($data['current']->country_code) && $data['current']->country_code ) ? $data['current']->country_code : '';
$location = ( trim((string)$params->get('locationTranslated'))=='' ) ? $city . ', ' . $country : $params->get('locationTranslated');
$location = ( trim((string)$params->get('locationTranslated')?? '')=='' ) ? $city . ', ' . $country : $params->get('locationTranslated');
} elseif ($platform == 'darksky') {
$location = ( trim((string)$params->get('locationTranslated'))=='' ) ? str_replace('_', ' ', $location) : $params->get('locationTranslated');
$location = ( trim((string)$params->get('locationTranslated')?? '')=='' ) ? str_replace('_', ' ', $location) : $params->get('locationTranslated');
} elseif ($platform == 'yahoo') {
$city = ( isset($data['current']->sys->city) && $data['current']->sys->city ) ? $data['current']->sys->city : '';
$country = ( isset($data['current']->sys->country) && $data['current']->sys->country ) ? $data['current']->sys->country : '';
$location = ( trim((string)$params->get('locationTranslated'))=='' ) ? $city . ', ' . $country : $params->get('locationTranslated');
$location = ( trim((string)$params->get('locationTranslated')?? '')=='' ) ? $city . ', ' . $country : $params->get('locationTranslated');
} else {
$location = ( trim((string)$params->get('locationTranslated'))=='' ) ? $params->get('location') : $params->get('locationTranslated');
$location = ( trim((string)$params->get('locationTranslated')?? '')=='' ) ? $params->get('location') : $params->get('locationTranslated');
}
}

Expand Down

0 comments on commit 9deb476

Please sign in to comment.