mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-22 02:38:18 +03:00
выставление количества слов из текста топика в метатег description в конфиге
и так быстрее чем через регекспу. Signed-off-by: Serge Pustovit <light.feel@gmail.com>
This commit is contained in:
parent
eccd4dad8f
commit
a4cf8a6da6
|
@ -713,8 +713,8 @@ class ActionBlog extends Action {
|
|||
/**
|
||||
* Выставляем SEO данные
|
||||
*/
|
||||
$sTextSeo=preg_replace("/<.*>/Ui",' ',$oTopic->getText());
|
||||
$this->Viewer_SetHtmlDescription(func_text_words($sTextSeo,20));
|
||||
$sTextSeo=strip_tags($oTopic->getText());
|
||||
$this->Viewer_SetHtmlDescription(func_text_words($sTextSeo, Config::Get('seo.description_words_count')));
|
||||
$this->Viewer_SetHtmlKeywords($oTopic->getTags());
|
||||
/**
|
||||
* Загружаем переменные в шаблон
|
||||
|
@ -835,8 +835,8 @@ class ActionBlog extends Action {
|
|||
/**
|
||||
* Выставляем SEO данные
|
||||
*/
|
||||
$sTextSeo=preg_replace("/<.*>/Ui",' ',$oBlog->getDescription());
|
||||
$this->Viewer_SetHtmlDescription(func_text_words($sTextSeo,20));
|
||||
$sTextSeo=strip_tags($oBlog->getDescription());
|
||||
$this->Viewer_SetHtmlDescription(func_text_words($sTextSeo, Config::Get('seo.description_words_count')));
|
||||
/**
|
||||
* Получаем список юзеров блога
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,11 @@ $config['view']['img_max_height'] = 3000; // максимальная выс
|
|||
$config['view']['img_max_size_url'] = 500; // максимальный размер картинки в kB для загрузки по URL
|
||||
$config['view']['no_assign'] = array('db'); // список групп конфигурации, которые необходимо исключить из передачи во Viewer. Только для системного пользования.
|
||||
|
||||
/**
|
||||
* Настройки СЕО для вывода топиков
|
||||
*/
|
||||
$config['seo']['description_words_count'] = 20; // количество слов из топика для вывода в метатег description
|
||||
|
||||
/**
|
||||
* Настройка основных блоков
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue