Let the site admin choose whether to display the Discover tab.
This commit is contained in:
parent
7ed177c7cd
commit
fedd19ec95
@ -1382,14 +1382,17 @@ function network_tabs() {
|
|||||||
$cmd = $a->cmd;
|
$cmd = $a->cmd;
|
||||||
|
|
||||||
// tabs
|
// tabs
|
||||||
$tabs = array(
|
$tabs = array();
|
||||||
array(
|
|
||||||
|
if(get_config('system','discover_tab'))
|
||||||
|
$tabs[] = array(
|
||||||
'label' => t('Discover'),
|
'label' => t('Discover'),
|
||||||
'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&fh=1' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
|
'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&fh=1' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
|
||||||
'sel'=> $public_active,
|
'sel'=> $public_active,
|
||||||
'title'=> t('Imported public streams'),
|
'title'=> t('Imported public streams'),
|
||||||
),
|
);
|
||||||
|
|
||||||
|
array_push($tabs,
|
||||||
array(
|
array(
|
||||||
'label' => t('Commented Order'),
|
'label' => t('Commented Order'),
|
||||||
'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
|
'url'=>$a->get_baseurl(true) . '/' . $cmd . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
|
||||||
@ -1402,7 +1405,6 @@ function network_tabs() {
|
|||||||
'sel'=>$postord_active,
|
'sel'=>$postord_active,
|
||||||
'title' => t('Sort by Post Date'),
|
'title' => t('Sort by Post Date'),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'label' => t('Personal'),
|
'label' => t('Personal'),
|
||||||
'url' => $a->get_baseurl(true) . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&conv=1',
|
'url' => $a->get_baseurl(true) . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&conv=1',
|
||||||
@ -1414,8 +1416,7 @@ function network_tabs() {
|
|||||||
'url' => $a->get_baseurl(true) . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&new=1' . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
|
'url' => $a->get_baseurl(true) . '/' . $cmd . '?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . '&new=1' . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''),
|
||||||
'sel' => $new_active,
|
'sel' => $new_active,
|
||||||
'title' => t('Activity Stream - by date'),
|
'title' => t('Activity Stream - by date'),
|
||||||
),
|
)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if(feature_enabled(local_user(),'star_posts'))
|
if(feature_enabled(local_user(),'star_posts'))
|
||||||
|
@ -169,6 +169,7 @@ function poller_run($argv, $argc){
|
|||||||
|
|
||||||
|
|
||||||
// pull in some public posts
|
// pull in some public posts
|
||||||
|
if(get_config('system','discover_tab'))
|
||||||
proc_run('php','include/externals.php');
|
proc_run('php','include/externals.php');
|
||||||
|
|
||||||
|
|
||||||
|
@ -244,6 +244,7 @@ function admin_page_site_post(&$a){
|
|||||||
$allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : '');
|
$allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : '');
|
||||||
$block_public = ((x($_POST,'block_public')) ? True : False);
|
$block_public = ((x($_POST,'block_public')) ? True : False);
|
||||||
$force_publish = ((x($_POST,'publish_all')) ? True : False);
|
$force_publish = ((x($_POST,'publish_all')) ? True : False);
|
||||||
|
$discover_tab = ((x($_POST,'discover_tab')) ? True : False);
|
||||||
$no_login_on_homepage = ((x($_POST,'no_login_on_homepage')) ? True : False);
|
$no_login_on_homepage = ((x($_POST,'no_login_on_homepage')) ? True : False);
|
||||||
$global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
|
$global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
|
||||||
$no_community_page = !((x($_POST,'no_community_page')) ? True : False);
|
$no_community_page = !((x($_POST,'no_community_page')) ? True : False);
|
||||||
@ -341,6 +342,7 @@ function admin_page_site_post(&$a){
|
|||||||
set_config('system','allowed_email', $allowed_email);
|
set_config('system','allowed_email', $allowed_email);
|
||||||
set_config('system','block_public', $block_public);
|
set_config('system','block_public', $block_public);
|
||||||
set_config('system','publish_all', $force_publish);
|
set_config('system','publish_all', $force_publish);
|
||||||
|
set_config('system','discover_tab', $discover_tab);
|
||||||
if($global_directory=="") {
|
if($global_directory=="") {
|
||||||
del_config('system','directory_submit_url');
|
del_config('system','directory_submit_url');
|
||||||
}
|
}
|
||||||
@ -462,6 +464,7 @@ function admin_page_site(&$a) {
|
|||||||
'$allowed_email' => array('allowed_email', t("Allowed email domains"), get_config('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")),
|
'$allowed_email' => array('allowed_email', t("Allowed email domains"), get_config('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")),
|
||||||
'$block_public' => array('block_public', t("Block public"), get_config('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")),
|
'$block_public' => array('block_public', t("Block public"), get_config('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")),
|
||||||
'$force_publish' => array('publish_all', t("Force publish"), get_config('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")),
|
'$force_publish' => array('publish_all', t("Force publish"), get_config('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")),
|
||||||
|
'$discover_tab' => array('discover_tab', t("Discovery tab"), get_config('system','discover_tab'), t("Display a tab in the network view with public content pulled from sources chosen for this site.")),
|
||||||
'$no_login_on_homepage' => array('no_login_on_homepage', t("No login on Homepage"), get_config('system','no_login_on_homepage'), t("Check to hide the login form from your sites homepage when visitors arrive who are not logged in (e.g. when you put the content of the homepage in via the site channel).")),
|
'$no_login_on_homepage' => array('no_login_on_homepage', t("No login on Homepage"), get_config('system','no_login_on_homepage'), t("Check to hide the login form from your sites homepage when visitors arrive who are not logged in (e.g. when you put the content of the homepage in via the site channel).")),
|
||||||
|
|
||||||
'$proxyuser' => array('proxyuser', t("Proxy user"), get_config('system','proxyuser'), ""),
|
'$proxyuser' => array('proxyuser', t("Proxy user"), get_config('system','proxyuser'), ""),
|
||||||
|
@ -319,7 +319,7 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($firehose) {
|
if($firehose && get_config('system','discover_tab')) {
|
||||||
require_once('include/identity.php');
|
require_once('include/identity.php');
|
||||||
$sys = get_sys_channel();
|
$sys = get_sys_channel();
|
||||||
$uids = " and item.uid = " . intval($sys['channel_id']) . " ";
|
$uids = " and item.uid = " . intval($sys['channel_id']) . " ";
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
<h3>{{$corporate}}</h3>
|
<h3>{{$corporate}}</h3>
|
||||||
{{include file="field_checkbox.tpl" field=$block_public}}
|
{{include file="field_checkbox.tpl" field=$block_public}}
|
||||||
{{include file="field_checkbox.tpl" field=$force_publish}}
|
{{include file="field_checkbox.tpl" field=$force_publish}}
|
||||||
|
{{include file="field_checkbox.tpl" field=$discover_tab}}
|
||||||
|
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user