diff --git a/doc/htconfig.md b/doc/htconfig.md index 6ebf1086f..684be22fb 100644 --- a/doc/htconfig.md +++ b/doc/htconfig.md @@ -87,6 +87,7 @@ Example: To set the directory value please add this line to your .htconfig.php: * **remove_multiplicated_lines** (Boolean) - If enabled, multiple linefeeds in items are stripped to a single one. * **show_unsupported_addons** (Boolean) - Show all addons including the unsupported ones. * **show_unsupported_themes** (Boolean) - Show all themes including the unsupported ones. +* **show_global_community_hint** (Boolean) - When the global community page is enabled, use this option to display a hint above the stream, that this is a collection of all public top-level postings that arrive on your node. * **throttle_limit_day** - Maximum number of posts that a user can send per day with the API. * **throttle_limit_week** - Maximum number of posts that a user can send per week with the API. * **throttle_limit_month** - Maximum number of posts that a user can send per month with the API. diff --git a/mod/community.php b/mod/community.php index d428bddf8..df2126327 100644 --- a/mod/community.php +++ b/mod/community.php @@ -28,8 +28,6 @@ function community_content(App $a, $update = 0) { require_once('include/security.php'); require_once('include/conversation.php'); - - $o .= '

' . t('Community') . '

'; if (! $update) { nav_set_selected('community'); } @@ -83,9 +81,15 @@ function community_content(App $a, $update = 0) { $o .= conversation($a, $s, 'community', $update); - $o .= alt_pager($a, count($r)); + $o .= alt_pager($a, count($r)); - return $o; + $t = get_markup_template("community.tpl"); + return replace_macros($t, array( + '$content' => $o, + '$header' => t("Community"), + '$show_global_community_hint' => (Config::get('system', 'community_page_style') == CP_GLOBAL_COMMUNITY && Config::get('system', 'show_global_community_hint')), + '$global_community_hint' => t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.") + )); } function community_getitems($start, $itemspage) { diff --git a/view/templates/community.tpl b/view/templates/community.tpl new file mode 100644 index 000000000..eb96fabb4 --- /dev/null +++ b/view/templates/community.tpl @@ -0,0 +1,7 @@ +

{{$header}}

+ +{{if $show_global_community_hint}} +

{{$global_community_hint}}

+{{/if}} + +{{$content}}