
Мощный модуль для DLE Парсер погоды с GisMeteo и Yandex - предназначить для сбора данных и вывода на вашем сайте прогноз погоды с GisMeteo и Yandex. Судя по настройкам имеется своя админ панель для тонкой настройки парсера. Есть возможность выводить на сайте дле погоду в виде блока или в виде полного списка таблицы прогноза на отдельной странице.
Установка модуль DataLife Engine Парсер погоды с GisMeteo и Yandex
.htaccess найти
RewriteEngine On
ниже добавить
#Прогноз погоды
RewriteRule ^pogoda(/?)+$ /?do=pogoda [QSA,L]
RewriteRule ^pogoda/([^/]*)/([^/]*)(/?)+$(/?)+$ /?do=pogoda&action=$2&city=$1 [QSA,L]
RewriteRule ^weather(/?)+$ /?do=pogoda [QSA,L]
RewriteRule ^weather/([^/]*)/([^/]*)(/?)+$(/?)+$ /?do=pogoda&action=$2&city=$1 [QSA,L]
index.php найти
require_once ROOT_DIR . '/engine/init.php';
ниже вставить
require_once ROOT_DIR.'/engine/modules/weather/wetr.php';
найти
$tpl->load_template ( 'main.tpl' );
ниже вставить
$tpl->set ('{weather}', $tpl->result['wetr']);
engine/inc/options.php найти
showRow( $lang['opt_sys_reason'], $lang['opt_sys_reasond'], "<textarea class="edit bk" style="width:350px;height:100px;" name="save_con[offline_reason]">{$config['offline_reason']}</textarea>" );
ниже вставить
showRow("Блок погоды", "Активен или нет, шаблон находится по адресу: /templates/".$config[skin]."/wetr.tpl", makeDropDown(array("1"=>$lang['opt_sys_yes'],"0"=>$lang['opt_sys_no']), "save_con[wetr_block]", "{$config['wetr_block']}"));
showRow("Кеширование блока погоды", "включен или нет", makeDropDown(array("0"=>"Выключен","1"=>"Включен"), "save_con[allow_cache_weather]", "{$config['allow_cache_weather']}"));
найти
array (
'name' => $lang['opt_logs'],
'url' => "$PHP_SELF?mod=logs",
'descr' => $lang['opt_logsc'],
'image' => "admin_logs.png",
'access' => "admin"
),
после вставить
array (
'name' => "Настройка погоды",
'url' => "$PHP_SELF?mod=pogoda_edit_config",
'descr' => "Настройка общих параметров погоды",
'image' => "pogoda.png",
'access' => "admin"
),
array (
'name' => "Города в прогнозе погоды",
'url' => "$PHP_SELF?mod=weatherfields&xfieldsactionser=configure",
'descr' => "Настройка городов в прогнозе погоды",
'image' => "pogoda.png",
'access' => "admin"
),
engine/modules/function.php найти
function dle_session( $sid = false ) {
перед вставить
function msg($city){
return $output;
}
engine.php найти
switch ( $do ) {
ниже вставить
case "pogoda" :
include ENGINE_DIR.'/modules/weather/pogoda.php';
break;
Установите права (chmod)
uploads/pogoda права (chmod) 777
Скачать разные модули для dle
Версия Движка: DataLife Engine 10.1, Dle 10.0, dle 9.8
Автор: web2work