aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-01-26 19:04:32 -0800
committerredmatrix <git@macgirvin.com>2016-01-26 19:04:32 -0800
commit202817740ab13f91ab9bd90de43116d1778cb751 (patch)
tree2e36e2d59d1195cd09e4e99d21641558f4e499f6
parent9b08051703ff6695ba989f1cb968200ca59daeb1 (diff)
downloadvolse-hubzilla-202817740ab13f91ab9bd90de43116d1778cb751.tar.gz
volse-hubzilla-202817740ab13f91ab9bd90de43116d1778cb751.tar.bz2
volse-hubzilla-202817740ab13f91ab9bd90de43116d1778cb751.zip
control the generation or acceptance of directory keywords
-rw-r--r--doc/hidden_configs.bb6
-rw-r--r--mod/directory.php7
-rw-r--r--mod/dirsearch.php2
3 files changed, 12 insertions, 3 deletions
diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb
index 5cb482cd9..0f6c0f635 100644
--- a/doc/hidden_configs.bb
+++ b/doc/hidden_configs.bb
@@ -59,7 +59,11 @@ This document assumes you're an administrator.
[b]system.taganyone[/b]
Allow the @mention tagging of anyone whether you are connected or not.
[b]system.directorytags[/b]
- Set the number of keyword tags displayed on the directory page.
+ Set the number of keyword tags displayed on the directory page. Default is 50 unless set to a
+ positive integer.
+ [b]system.disable_directory_keywords[/b]
+ If '1', do not show directory keywords. If the hub is a directory server, prevent returning
+ tags to any directory clients. Please do not set this for directory servers in the RED_GLOBAL realm.
[b]system.disable_dreport[/b]
If '1', don't store or link to delivery reports
[b]system.startpage[/b]
diff --git a/mod/directory.php b/mod/directory.php
index 4ab118b17..dca96694e 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -144,11 +144,14 @@ function directory_content(&$a) {
}
if($url) {
- // We might want to make the tagadelic count (&kw=) configurable or turn it off completely.
$numtags = get_config('system','directorytags');
- $kw = ((intval($numtags)) ? $numtags : 50);
+ $kw = ((intval($numtags) > 0) ? intval($numtags) : 50);
+
+ if(get_config('system','disable_directory_keywords'))
+ $kw = 0;
+
$query = $url . '?f=&kw=' . $kw . (($safe_mode != 1) ? '&safe=' . $safe_mode : '');
if($token)
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 388e5f3ac..bc2fa108f 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -75,6 +75,8 @@ function dirsearch_content(&$a) {
$kw = ((x($_REQUEST,'kw')) ? intval($_REQUEST['kw']) : 0 );
$forums = ((array_key_exists('pubforums',$_REQUEST)) ? intval($_REQUEST['pubforums']) : 0);
+ if(get_config('system','disable_directory_keywords'))
+ $kw = 0;
// by default use a safe search