diff --git a/README.md b/README.md index e6d012c..a7e6d2b 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,6 @@ ## Changelog: +Версия 1.26.0 - адаптация для версии ave.cms 3.26 + Версия 1.0 \ No newline at end of file diff --git a/whoisonline/info.php b/whoisonline/info.php new file mode 100644 index 0000000..d5c0963 --- /dev/null +++ b/whoisonline/info.php @@ -0,0 +1,20 @@ + 'whoisonline', + 'ModuleVersion' => '1.26.0', + 'ModuleAutor' => 'AVE.cms Team', + 'ModuleCopyright' => '© 2007-' . date('Y') . ' AVE.cms', + 'ModuleStatus' => 1, + 'ModuleIsFunction' => 1, + 'ModuleTemplate' => 0, + 'ModuleAdminEdit' => 0, + 'ModuleFunction' => 'mod_online', + 'ModuleTag' => '[mod_online]', + 'ModuleTagLink' => null, + 'ModuleAveTag' => '#\\\[mod_online]#', + 'ModulePHPTag' => "" + ); +?> \ No newline at end of file diff --git a/whoisonline/lang/index.php b/whoisonline/lang/index.php new file mode 100644 index 0000000..4ca25aa --- /dev/null +++ b/whoisonline/lang/index.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/whoisonline/lang/ru.txt b/whoisonline/lang/ru.txt new file mode 100644 index 0000000..2353977 --- /dev/null +++ b/whoisonline/lang/ru.txt @@ -0,0 +1,3 @@ +[name] +MODULE_NAME = "Who is online" +MODULE_DESCRIPTION = "Данный модуль предназначен для отображения присутствующих на сайте пользователей с гео-информацией." \ No newline at end of file diff --git a/whoisonline/module.php b/whoisonline/module.php index d8668f9..583ed75 100644 --- a/whoisonline/module.php +++ b/whoisonline/module.php @@ -13,26 +13,6 @@ if (!defined('BASE_DIR')) exit; -if (defined('ACP')) - $modul = - [ - 'ModuleName' => "Who is online", - 'ModuleSysName' => "whoisonline", - 'ModuleVersion' => "1.0", - 'ModuleDescription' => "Данный модуль предназначен для отображения присутствующих на сайте пользователей с гео-информацией.", - 'ModuleAutor' => "AVE.cms Team", - 'ModuleCopyright' => "© AVE.cms Team 2016", - 'ModuleStatus' => 1, - 'ModuleIsFunction' => 1, - 'ModuleTemplate' => 0, - 'ModuleAdminEdit' => 0, - 'ModuleFunction' => 'mod_online', - 'ModuleTag' => '[mod_online]', - 'ModuleTagLink' => null, - 'ModuleAveTag' => '#\\\[mod_online]#', - 'ModulePHPTag' => "" - ]; - function mod_online() { ?> @@ -111,7 +91,7 @@ if (! defined('ACP') && isset($_REQUEST['module']) && $_REQUEST['module'] == 'wh { // Making an API call to Hostip: - $xml = json_decode(file_get_contents('http://freegeoip.net/json/' . $stringIp), true); + $xml = json_decode(file_get_contents('https://freegeoip.net/json/' . $stringIp), true); $city = $xml['city']; $countryName = $xml['country_name']; diff --git a/whoisonline/sql.php b/whoisonline/sql.php index 324f55c..5d6d72a 100644 --- a/whoisonline/sql.php +++ b/whoisonline/sql.php @@ -13,9 +13,9 @@ $module_sql_install = array(); $module_sql_deinstall = array(); $module_sql_update = array(); -$module_sql_deinstall[] = "DROP TABLE IF EXISTS CPPREFIX_module_who_is_online"; +$module_sql_deinstall[] = "DROP TABLE IF EXISTS %%PRFX%%_module_who_is_online"; -$module_sql_install[] = "CREATE TABLE CPPREFIX_module_who_is_online ( +$module_sql_install[] = "CREATE TABLE %%PRFX%%_module_who_is_online ( `id` int(10) unsigned NOT NULL auto_increment, `ip` int(11) unsigned NOT NULL default '0', `country` char(64) NOT NULL default '', @@ -29,7 +29,7 @@ $module_sql_install[] = "CREATE TABLE CPPREFIX_module_who_is_online ( $module_sql_update[] = " UPDATE - `CPPREFIX_module` + `%%PRFX%%_module` SET ModuleAveTag = '" . $modul['ModuleAveTag'] . "', ModulePHPTag = '" . $modul['ModulePHPTag'] . "',