Skip to content

Commit

Permalink
Added support for custom meta keywords, title and description in foru…
Browse files Browse the repository at this point in the history
…m sections for #1203
  • Loading branch information
trustmaster committed Jul 20, 2013
1 parent c012815 commit 1afda76
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/forums/forums.setup.php
Expand Up @@ -3,7 +3,7 @@
[BEGIN_COT_EXT]
Name=Forums
Description=Cotonti Bulletin Board Module
Version=0.9.14
Version=0.9.15
Date=2011-08-19
Author=Neocrome & Cotonti Team
Copyright=(c) Cotonti Team 2008-2011
Expand Down Expand Up @@ -44,6 +44,9 @@
allowpolls=08:radio::1:
autoprune=09:string::0:
defstate=10:select:0,1:1:
keywords=06:string:::
metatitle=07:string:::
metadesc=08:string:::
[END_COT_EXT_CONFIG_STRUCTURE]
==================== */

Expand Down
13 changes: 13 additions & 0 deletions modules/forums/inc/forums.topics.php
Expand Up @@ -151,6 +151,19 @@
$out['desc'] = htmlspecialchars(strip_tags($structure['forums'][$s]['desc']));
$sys['sublocation'] = $structure['forums'][$s]['title'];

if (!empty($cfg['forums']['cat_' . $s]['keywords']))
{
$out['keywords'] = $cfg['forums']['cat_' . $s]['keywords'];
}
if (!empty($cfg['forums']['cat_' . $s]['metadesc']))
{
$out['desc'] = $cfg['forums']['cat_' . $s]['metadesc'];
}
if (!empty($cfg['forums']['cat_' . $s]['metatitle']))
{
$out['subtitle'] = $cfg['forums']['cat_' . $s]['metatitle'];
}

/* === Hook === */
foreach (cot_getextplugins('forums.topics.main') as $pl)
{
Expand Down
3 changes: 3 additions & 0 deletions modules/forums/lang/forums.en.lang.php
Expand Up @@ -52,6 +52,9 @@
$L['cfg_autoprune'] = 'Auto-prune topics after * days';
$L['cfg_defstate'] = 'Default state';
$L['cfg_defstate_params'] = 'Folded,Unfolded';
$L['cfg_keywords'] = 'Keywords';
$L['cfg_metatitle'] = 'Meta title';
$L['cfg_metadesc'] = 'Meta description';

$L['info_desc'] = 'Basic forums for community sites with sections, subsections, topics and posts';

Expand Down
3 changes: 3 additions & 0 deletions modules/forums/lang/forums.ru.lang.php
Expand Up @@ -52,6 +52,9 @@
$L['cfg_autoprune'] = 'Автоочистка тем через * дней';
$L['cfg_defstate'] = 'По умолчанию';
$L['cfg_defstate_params'] = 'Свернут,Развернут';
$L['cfg_keywords'] = 'Ключевые слова';
$L['cfg_metatitle'] = 'Meta-заголовок';
$L['cfg_metadesc'] = 'Meta-описание';

$L['info_desc'] = 'Модуль форумов для сайтов с сообществом или поддержкой';

Expand Down

0 comments on commit 1afda76

Please sign in to comment.