mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-12 13:58:19 +03:00
sitemap config
This commit is contained in:
parent
0aa67825d2
commit
1647bea71e
|
@ -67,8 +67,10 @@ class HookMain extends Hook
|
||||||
},
|
},
|
||||||
'callback_data' => function () {
|
'callback_data' => function () {
|
||||||
return array(
|
return array(
|
||||||
$this->Sitemap_GetDataForSitemapRow(Router::GetPath('/'), time(), '1', 'hourly'),
|
$this->Sitemap_GetDataForSitemapRow(Router::GetPath('/'), time(), Config::Get('module.sitemap.index.priority'),
|
||||||
$this->Sitemap_GetDataForSitemapRow(Router::GetPath('stream/all'), time(), '0.7', 'hourly'),
|
Config::Get('module.sitemap.index.changefreq')),
|
||||||
|
$this->Sitemap_GetDataForSitemapRow(Router::GetPath('stream/all'), time(), Config::Get('module.sitemap.stream.priority'),
|
||||||
|
Config::Get('module.sitemap.stream.changefreq')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
|
@ -1211,7 +1211,11 @@ class ModuleBlog extends Module
|
||||||
$aBlogs = $this->GetBlogsByFilter($aFilter, array('blog_id' => 'asc'), $iPage, 500, array());
|
$aBlogs = $this->GetBlogsByFilter($aFilter, array('blog_id' => 'asc'), $iPage, 500, array());
|
||||||
$aData = array();
|
$aData = array();
|
||||||
foreach ($aBlogs['collection'] as $oBlog) {
|
foreach ($aBlogs['collection'] as $oBlog) {
|
||||||
$aData[] = $this->Sitemap_GetDataForSitemapRow($oBlog->getUrlFull(), null, '0.8', 'weekly');
|
$aData[] = $this->Sitemap_GetDataForSitemapRow(
|
||||||
|
$oBlog->getUrlFull(), null,
|
||||||
|
Config::Get('module.sitemap.blog.priority'),
|
||||||
|
Config::Get('module.sitemap.blog.changefreq')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return $aData;
|
return $aData;
|
||||||
},
|
},
|
||||||
|
|
|
@ -2024,7 +2024,8 @@ class ModuleTopic extends Module
|
||||||
$aData[] = $this->Sitemap_GetDataForSitemapRow(
|
$aData[] = $this->Sitemap_GetDataForSitemapRow(
|
||||||
$oTopic->getUrl(),
|
$oTopic->getUrl(),
|
||||||
is_null($oTopic->getDateEdit()) ? $oTopic->getDatePublish() : $oTopic->getDateEdit(),
|
is_null($oTopic->getDateEdit()) ? $oTopic->getDatePublish() : $oTopic->getDateEdit(),
|
||||||
'0.9', 'weekly'
|
Config::Get('module.sitemap.topic.priority'),
|
||||||
|
Config::Get('module.sitemap.topic.changefreq')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $aData;
|
return $aData;
|
||||||
|
|
|
@ -1999,8 +1999,12 @@ class ModuleUser extends Module
|
||||||
$aUsers = $this->GetUsersByFilter($aFilter, array('user_id' => 'asc'), $iPage, 500, array());
|
$aUsers = $this->GetUsersByFilter($aFilter, array('user_id' => 'asc'), $iPage, 500, array());
|
||||||
$aData = array();
|
$aData = array();
|
||||||
foreach ($aUsers['collection'] as $oUser) {
|
foreach ($aUsers['collection'] as $oUser) {
|
||||||
$aData[] = $this->Sitemap_GetDataForSitemapRow($oUser->getUserWebPath(),
|
$aData[] = $this->Sitemap_GetDataForSitemapRow(
|
||||||
is_null($oUser->getProfileDate()) ? $oUser->getDateRegister() : $oUser->getProfileDate(), '0.5', 'weekly');
|
$oUser->getUserWebPath(),
|
||||||
|
is_null($oUser->getProfileDate()) ? $oUser->getDateRegister() : $oUser->getProfileDate(),
|
||||||
|
Config::Get('module.sitemap.user.priority'),
|
||||||
|
Config::Get('module.sitemap.user.changefreq')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return $aData;
|
return $aData;
|
||||||
},
|
},
|
||||||
|
|
|
@ -269,6 +269,27 @@ $config['module']['wall']['count_last_reply'] = 3; // Число послед
|
||||||
$config['module']['wall']['per_page'] = 10; // Число сообщений на стене на одну страницу
|
$config['module']['wall']['per_page'] = 10; // Число сообщений на стене на одну страницу
|
||||||
$config['module']['wall']['text_max'] = 250; // Ограничение на максимальное количество символов в одном сообщении на стене
|
$config['module']['wall']['text_max'] = 250; // Ограничение на максимальное количество символов в одном сообщении на стене
|
||||||
$config['module']['wall']['text_min'] = 1; // Ограничение на минимальное количество символов в одном сообщении на стене
|
$config['module']['wall']['text_min'] = 1; // Ограничение на минимальное количество символов в одном сообщении на стене
|
||||||
|
// Модуль Sitemap
|
||||||
|
$config['module']['sitemap']['index'] = array( // Главная страница
|
||||||
|
'priority' => '1',
|
||||||
|
'changefreq' => 'hourly' // Вероятная частота изменения этой страницы (https://www.sitemaps.org/ru/protocol.html#changefreqdef)
|
||||||
|
);
|
||||||
|
$config['module']['sitemap']['stream'] = array( // Вся активность
|
||||||
|
'priority' => '0.7',
|
||||||
|
'changefreq' => 'hourly'
|
||||||
|
);
|
||||||
|
$config['module']['sitemap']['topic'] = array( // Топики
|
||||||
|
'priority' => '0.9',
|
||||||
|
'changefreq' => 'weekly'
|
||||||
|
);
|
||||||
|
$config['module']['sitemap']['blog'] = array( // Блоги
|
||||||
|
'priority' => '0.8',
|
||||||
|
'changefreq' => 'weekly'
|
||||||
|
);
|
||||||
|
$config['module']['sitemap']['user'] = array( // Пользователи
|
||||||
|
'priority' => '0.5',
|
||||||
|
'changefreq' => 'weekly'
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Модуль опросов (Poll)
|
* Модуль опросов (Poll)
|
||||||
|
|
Loading…
Reference in a new issue