implement features
This commit is contained in:
@@ -83,6 +83,8 @@ function network_to_name($s) {
|
||||
NETWORK_LINKEDIN => t('LinkedIn'),
|
||||
NETWORK_XMPP => t('XMPP/IM'),
|
||||
NETWORK_MYSPACE => t('MySpace'),
|
||||
NETWORK_MAIL2 => t('Email'),
|
||||
NETWORK_GPLUS => t('Google+')
|
||||
);
|
||||
|
||||
call_hooks('network_to_name', $nets);
|
||||
|
||||
@@ -47,6 +47,8 @@ function networks_widget($baseurl,$selected = '') {
|
||||
if(! local_user())
|
||||
return '';
|
||||
|
||||
if(! feature_enabled(local_user(),'networks'))
|
||||
return '';
|
||||
|
||||
$r = q("select distinct(network) from contact where uid = %d and self = 0",
|
||||
intval(local_user())
|
||||
@@ -80,6 +82,9 @@ function fileas_widget($baseurl,$selected = '') {
|
||||
if(! local_user())
|
||||
return '';
|
||||
|
||||
if(! feature_enabled(local_user(),'filing'))
|
||||
return '';
|
||||
|
||||
$saved = get_pconfig(local_user(),'system','filetags');
|
||||
if(! strlen($saved))
|
||||
return;
|
||||
@@ -106,8 +111,12 @@ function fileas_widget($baseurl,$selected = '') {
|
||||
}
|
||||
|
||||
function categories_widget($baseurl,$selected = '') {
|
||||
|
||||
$a = get_app();
|
||||
|
||||
if(! feature_enabled($a->profile['profile_uid'],'categories'))
|
||||
return '';
|
||||
|
||||
$saved = get_pconfig($a->profile['profile_uid'],'system','filetags');
|
||||
if(! strlen($saved))
|
||||
return;
|
||||
@@ -196,4 +205,4 @@ function common_friends_visitor_widget($profile_uid) {
|
||||
'$items' => $r
|
||||
));
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -686,7 +686,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
||||
'$mode' => $mode,
|
||||
'$user' => $a->user,
|
||||
'$threads' => $threads,
|
||||
'$dropping' => ($page_dropping?t('Delete Selected Items'):False),
|
||||
'$dropping' => ($page_dropping && feature_enabled(local_user(),'multi_delete') ? t('Delete Selected Items') : False),
|
||||
));
|
||||
|
||||
return $o;
|
||||
@@ -887,9 +887,12 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||
|
||||
$geotag = (($x['allow_location']) ? get_markup_template('jot_geotag.tpl') : '');
|
||||
|
||||
$plaintext = false;
|
||||
if(local_user() && intval(get_pconfig(local_user(),'system','plaintext')))
|
||||
$plaintext = true;
|
||||
/* $plaintext = false;
|
||||
if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) )
|
||||
$plaintext = true;*/
|
||||
$plaintext = true;
|
||||
if( local_user() && feature_enabled(local_user(),'richtext') )
|
||||
$plaintext = false;
|
||||
|
||||
$tpl = get_markup_template('jot-header.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
@@ -958,7 +961,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||
if($notes_cid)
|
||||
$jotnets .= '<input type="hidden" name="contact_allow[]" value="' . $notes_cid .'" />';
|
||||
|
||||
$tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
|
||||
// $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
|
||||
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$return_path' => $a->query_string,
|
||||
@@ -981,7 +984,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||
'$title' => "",
|
||||
'$placeholdertitle' => t('Set title'),
|
||||
'$category' => "",
|
||||
'$placeholdercategory' => t('Categories (comma-separated list)'),
|
||||
'$placeholdercategory' => (feature_enabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
|
||||
'$wait' => t('Please wait'),
|
||||
'$permset' => t('Permission settings'),
|
||||
'$shortpermset' => t('permissions'),
|
||||
@@ -1000,7 +1003,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||
'$acl' => $x['acl'],
|
||||
'$bang' => $x['bang'],
|
||||
'$profile_uid' => $x['profile_uid'],
|
||||
'$preview' => t('Preview'),
|
||||
'$preview' => ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : ''),
|
||||
'$jotplugins' => $jotplugins,
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$cancel' => t('Cancel'),
|
||||
'$rand_num' => random_digits(12)
|
||||
|
||||
@@ -4031,10 +4031,13 @@ function posted_dates($uid,$wall) {
|
||||
function posted_date_widget($url,$uid,$wall) {
|
||||
$o = '';
|
||||
|
||||
if(! feature_enabled($uid,'archives'))
|
||||
return $o;
|
||||
|
||||
// For former Facebook folks that left because of "timeline"
|
||||
|
||||
if($wall && intval(get_pconfig($uid,'system','no_wall_archive_widget')))
|
||||
return $o;
|
||||
/* if($wall && intval(get_pconfig($uid,'system','no_wall_archive_widget')))
|
||||
return $o;*/
|
||||
|
||||
$ret = posted_dates($uid,$wall);
|
||||
if(! count($ret))
|
||||
|
||||
@@ -111,6 +111,7 @@ function nav(&$a) {
|
||||
if(local_user()) {
|
||||
|
||||
$nav['network'] = array('network', t('Network'), "", t('Conversations from your friends'));
|
||||
$nav['net_reset'] = array('network/0?f=&order=comment&nets=all', t('Network Reset'), "", t('Load Network page with no filters'));
|
||||
|
||||
$nav['home'] = array('profile/' . $a->user['nickname'], t('Home'), "", t('Your posts and conversations'));
|
||||
|
||||
@@ -135,7 +136,9 @@ function nav(&$a) {
|
||||
}
|
||||
|
||||
$nav['settings'] = array('settings', t('Settings'),"", t('Account settings'));
|
||||
$nav['profiles'] = array('profiles', t('Profiles'),"", t('Manage/edit profiles'));
|
||||
if(feature_enabled(local_user(),'multi_profiles'))
|
||||
$nav['profiles'] = array('profiles', t('Profiles'),"", t('Manage/Edit Profiles'));
|
||||
|
||||
$nav['contacts'] = array('contacts', t('Contacts'),"", t('Manage/edit friends and contacts'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user