Адаптация для версии ave.cms v3.26

This commit is contained in:
Repellent 2019-09-02 21:29:34 +05:00
parent 5fc46d26cc
commit a331a3378c
8 changed files with 44 additions and 25 deletions

View File

@ -14,4 +14,6 @@
## Changelog:
02.09.2019 - версия 1.26.01 - Адаптация для версии ave.cms 3.26
07.05.2016 - версия 1.01

20
weather/info.php Normal file
View File

@ -0,0 +1,20 @@
<?php
if (! defined('BASE_DIR'))
exit;
$module = array(
'ModuleSysName' => 'weather',
'ModuleVersion' => '1.26.01',
'ModuleAutor' => 'N. Popova, npop@abv.bg',
'ModuleCopyright' => '&copy; 2016 npop@abv.bg',
'ModuleStatus' => 1,
'ModuleIsFunction' => 1,
'ModuleTemplate' => 0,
'ModuleAdminEdit' => 1,
'ModuleFunction' => 'mod_weather',
'ModuleTag' => '[mod_weather]',
'ModuleTagLink' => null,
'ModuleAveTag' => '#\\\[mod_weather]#',
'ModulePHPTag' => '<?php mod_weather(); ?>'
);
?>

View File

@ -1,3 +1,8 @@
[name]
MODULE_NAME = "Weather widget"
MODULE_DESCRIPTION = "Weather is weather module which utilizes the Openweather/Yahoo API allowing you to display weather data and related information from regions from all over the world very easily.<br />You can enrich your website with your own weather channel, were all weather conditions from any place of the world will look as you want to be, using the most reliable weather forecast source and combining with the most professional style.<br />System tag <strong>[mod_weather]</strong>."
WEATHER_NAME = 'Времето'
[admin]
WEATHER_MODULE_NAME = "Модул Прогноза"

View File

@ -1,3 +1,8 @@
[name]
MODULE_NAME = "Weather widget"
MODULE_DESCRIPTION = "Weather is weather module which utilizes the Openweather/Yahoo API allowing you to display weather data and related information from regions from all over the world very easily.<br />You can enrich your website with your own weather channel, were all weather conditions from any place of the world will look as you want to be, using the most reliable weather forecast source and combining with the most professional style.<br />System tag <strong>[mod_weather]</strong>."
WEATHER_NAME = 'WEATHER'
[admin]
WEATHER_MODULE_NAME = "Module WEATHER"

View File

@ -1,3 +1,8 @@
[name]
MODULE_NAME = "Weather widget"
MODULE_DESCRIPTION = "Weather is weather module which utilizes the Openweather/Yahoo API allowing you to display weather data and related information from regions from all over the world very easily.<br />You can enrich your website with your own weather channel, were all weather conditions from any place of the world will look as you want to be, using the most reliable weather forecast source and combining with the most professional style.<br />System tag <strong>[mod_weather]</strong>."
WEATHER_NAME = 'Погода'
[admin]
WEATHER_MODULE_NAME = "Модуль Погода > Настройки"

View File

@ -10,29 +10,11 @@
if (!defined('BASE_DIR')) exit;
if (defined('ACP'))
{
$modul['ModuleName'] = 'Weather widget';
$modul['ModuleSysName'] = 'weather';
$modul['ModuleVersion'] = '1.01';
$modul['ModuleDescription'] = 'Weather is weather module which utilizes the Openweather/Yahoo API allowing you to display weather data and related information from regions from all over the world very easily.<br />You can enrich your website with your own weather channel, were all weather conditions from any place of the world will look as you want to be, using the most reliable weather forecast source and combining with the most professional style.<br />System tag <strong>[mod_weather]</strong>.';
$modul['ModuleAutor'] = "N. Popova, npop@abv.bg"; // Автор
$modul['ModuleCopyright'] = '&copy; 2016 npop@abv.bg'; //
$modul['ModuleIsFunction'] = 1;
$modul['ModuleAdminEdit'] = 1;
$modul['ModuleFunction'] = 'mod_weather';
$modul['ModuleTag'] = '[mod_weather]';
$modul['ModuleTagLink'] = null;
$modul['ModuleAveTag'] = "#\\\[mod_weather]#";
$modul['ModulePHPTag'] = "<?php mod_weather(); ?>";
}
function mod_weather()
{
require_once(BASE_DIR . "/modules/weather/class.weather.php");
require_once(BASE_DIR . "/modules/weather/class/weather.php");
$weather = new Weather();
@ -48,7 +30,7 @@ function mod_weather()
if (defined('ACP') && ! empty($_REQUEST['moduleaction']))
{
require_once(BASE_DIR . "/modules/weather/class.weather.php");
require_once(BASE_DIR . "/modules/weather/class/weather.php");
$tpl_dir = BASE_DIR . '/modules/weather/templates/';
$lang_file = BASE_DIR . "/modules/weather/lang/" . $_SESSION['user_language'] . ".txt";

View File

@ -16,9 +16,9 @@ $module_sql_install = array();
$module_sql_deinstall = array();
$module_sql_update = array();
$module_sql_deinstall[] = "DROP TABLE IF EXISTS `CPPREFIX_module_weather`;";
$module_sql_deinstall[] = "DROP TABLE IF EXISTS `%%PRFX%%_module_weather`;";
$module_sql_install[] = "CREATE TABLE `CPPREFIX_module_weather` (
$module_sql_install[] = "CREATE TABLE `%%PRFX%%_module_weather` (
`id` tinyint(1) unsigned NOT NULL auto_increment,
`location` char(100) default 'Varna',
`country` char(100) default 'Bulgaria',
@ -40,11 +40,11 @@ $module_sql_install[] = "CREATE TABLE `CPPREFIX_module_weather` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;" ;
$module_sql_install[] = "INSERT INTO `CPPREFIX_module_weather` VALUES (1, 'Varna','Bulgaria', '726050', '43.216671', '27.91667', '0', 'openweathermap','','','3','full','1', '1','bg','10','metric','1');";
$module_sql_install[] = "INSERT INTO `%%PRFX%%_module_weather` VALUES (1, 'Varna','Bulgaria', '726050', '43.216671', '27.91667', '0', 'openweathermap','','','3','full','1', '1','bg','10','metric','1');";
$module_sql_update[] = "
UPDATE
CPPREFIX_module
%%PRFX%%_module
SET
CpEngineTag = '" . $modul['CpEngineTag'] . "',
CpPHPTag = '" . $modul['CpPHPTag'] . "',
@ -55,7 +55,7 @@ $module_sql_update[] = "
$module_sql_update[] = "
ALTER TABLE
`CPPREFIX_module_weather`
`%%PRFX%%_module_weather`
ADD
`secret_key` CHAR(255) NOT NULL
AFTER