mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
Поддержка Open Graph для топиков
This commit is contained in:
parent
8fdb1b6e7f
commit
30426ac488
|
@ -808,6 +808,21 @@ class ActionBlog extends Action
|
|||
$this->Viewer_SetHtmlDescription(func_text_words($sTextSeo, Config::Get('seo.description_words_count')));
|
||||
$this->Viewer_SetHtmlKeywords($oTopic->getTags());
|
||||
$this->Viewer_SetHtmlCanonical($oTopic->getUrl());
|
||||
/**
|
||||
* Open Graph
|
||||
*/
|
||||
$this->Viewer_SetOpenGraphProperty('og:type', 'article');
|
||||
$this->Viewer_SetOpenGraphProperty('og:title', $oTopic->getTitle());
|
||||
$this->Viewer_SetOpenGraphProperty('og:description', $this->Viewer_GetHtmlDescription());
|
||||
$this->Viewer_SetOpenGraphProperty('og:url', $oTopic->getUrl());
|
||||
$this->Viewer_SetOpenGraphProperty('article:author', $oTopic->getUser()->getUserWebPath());
|
||||
$this->Viewer_SetOpenGraphProperty('article:published_time', date('c', strtotime($oTopic->getDateAdd())));
|
||||
if ($sImage = $oTopic->getPreviewImageWebPath(Config::Get('module.topic.default_preview_size'))) {
|
||||
$this->Viewer_SetOpenGraphProperty('og:image', $sImage);
|
||||
}
|
||||
if ($aTags = $oTopic->getTagsArray()) {
|
||||
$this->Viewer_SetOpenGraphProperty('article:tag', $aTags);
|
||||
}
|
||||
/**
|
||||
* Вызов хуков
|
||||
*/
|
||||
|
@ -1456,13 +1471,13 @@ class ActionBlog extends Action
|
|||
$oViewer->Assign('showActions', true, true);
|
||||
|
||||
$aResult[] = array(
|
||||
'bStateError' => false,
|
||||
'sMsgTitle' => $this->Lang_Get('attention'),
|
||||
'sMsg' => $this->Lang_Get('blog.invite.notices.add',
|
||||
'bStateError' => false,
|
||||
'sMsgTitle' => $this->Lang_Get('attention'),
|
||||
'sMsg' => $this->Lang_Get('blog.invite.notices.add',
|
||||
array('login' => htmlspecialchars($sUser))),
|
||||
'user_id' => $oUser->getId(),
|
||||
'user_login' => htmlspecialchars($sUser),
|
||||
'html' => $oViewer->Fetch("component@blog.invite-item")
|
||||
'user_id' => $oUser->getId(),
|
||||
'user_login' => htmlspecialchars($sUser),
|
||||
'html' => $oViewer->Fetch("component@blog.invite-item")
|
||||
);
|
||||
$this->SendBlogInvite($oBlog, $oUser);
|
||||
} else {
|
||||
|
@ -1780,7 +1795,8 @@ class ActionBlog extends Action
|
|||
if (!$bAccess = $this->ACL_IsAllowDeleteBlog($oBlog, $this->oUserCurrent)) {
|
||||
return parent::EventNotFound();
|
||||
}
|
||||
$aTopics = $this->Topic_GetTopicsByBlogId($sBlogId, 1,1,array(),false); // нужно переделать функционал переноса топиков в дргугой блог
|
||||
$aTopics = $this->Topic_GetTopicsByBlogId($sBlogId, 1, 1, array(),
|
||||
false); // нужно переделать функционал переноса топиков в дргугой блог
|
||||
switch ($bAccess) {
|
||||
case ModuleACL::CAN_DELETE_BLOG_EMPTY_ONLY :
|
||||
if ($aTopics['count']) {
|
||||
|
|
|
@ -141,6 +141,7 @@ $config['module']['topic']['allow_empty_tags'] = false; // Разрешать и
|
|||
$config['module']['topic']['default_period_top'] = 1; // Дефолтный период (количество дней) для отображения ТОП топиков. Значения: 1,7,30,'all'
|
||||
$config['module']['topic']['default_period_discussed'] = 1; // Дефолтный период (количество дней) для отображения обсуждаемых топиков. Значения: 1,7,30,'all'
|
||||
$config['module']['topic']['max_blog_count'] = 3; // Количество блогов, которые можно задать топику. Максимальное значение 5.
|
||||
$config['module']['topic']['default_preview_size'] = '900x300crop'; // Дефолтный размер превью для топика (все размеры задаются в конфиге media), который будет использоваться, например, для Open Graph
|
||||
// Модуль User
|
||||
$config['module']['user']['per_page'] = 15; // Число юзеров на страницу на странице статистики и в профиле пользователя
|
||||
$config['module']['user']['friend_on_profile'] = 15; // Ограничение на вывод числа друзей пользователя на странице его профиля
|
||||
|
|
BIN
application/frontend/skin/developer/og-default.png
Normal file
BIN
application/frontend/skin/developer/og-default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
|
@ -1 +1 @@
|
|||
Subproject commit c9c28990dc657bd5e3373581a6915aa21b5f1c7e
|
||||
Subproject commit bfabe502d7f1789ea3e9e66e86e8e070d2173c67
|
Loading…
Reference in a new issue