From 94204d916025af4461acf01bb7e6ef6192ee4671 Mon Sep 17 00:00:00 2001
From: Zach Prezkuta <fermion@gmx.com>
Date: Thu, 22 Nov 2012 09:14:22 -0700
Subject: [PATCH 1/4] implement features

---
 boot.php                                |   4 +-
 include/contact_selectors.php           |   2 +
 include/contact_widgets.php             |  11 +++-
 include/conversation.php                |  18 ++++---
 include/items.php                       |   7 ++-
 include/nav.php                         |   5 +-
 mod/editpost.php                        |  11 ++--
 mod/item.php                            |   6 ++-
 mod/message.php                         |  13 +++--
 mod/network.php                         |  68 ++++++++++++++++++++----
 mod/profiles.php                        |   9 ++--
 mod/search.php                          |   3 ++
 mod/settings.php                        |  43 ++++++++++++++-
 object/Item.php                         |  21 ++++----
 view/jot.tpl                            |   2 +
 view/theme/diabook/jot.tpl              |   2 +
 view/theme/diabook/wall_thread.tpl      |   7 ++-
 view/theme/dispy/jot.tpl                |   2 +
 view/theme/dispy/wall_thread.tpl        |   8 ++-
 view/theme/frost-mobile/jot.tpl         |   2 +
 view/theme/frost-mobile/nav.tpl         |   6 +++
 view/theme/frost-mobile/style.css       |   7 +--
 view/theme/frost-mobile/wall_thread.tpl |   6 ++-
 view/theme/frost/images/net-reset.png   | Bin 0 -> 939 bytes
 view/theme/frost/jot.tpl                |   2 +
 view/theme/frost/nav.tpl                |   8 +++
 view/theme/frost/style.css              |   3 ++
 view/theme/frost/wall_thread.tpl        |   6 ++-
 view/theme/quattro/jot.tpl              |   5 +-
 view/theme/quattro/wall_thread.tpl      |   7 ++-
 view/theme/smoothly/jot.tpl             |   2 +
 view/theme/smoothly/wall_thread.tpl     |   6 ++-
 view/theme/testbubble/wall_thread.tpl   |   6 ++-
 view/theme/vier/wall_thread.tpl         |   6 ++-
 view/wall_thread.tpl                    |   6 ++-
 35 files changed, 262 insertions(+), 58 deletions(-)
 create mode 100644 view/theme/frost/images/net-reset.png

diff --git a/boot.php b/boot.php
index f69f6fe82..43e9399bc 100644
--- a/boot.php
+++ b/boot.php
@@ -9,6 +9,7 @@ require_once('include/pgettext.php');
 require_once('include/nav.php');
 require_once('include/cache.php');
 require_once('library/Mobile_Detect/Mobile_Detect.php');
+require_once('include/features.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_VERSION',      '3.0.1527' );
@@ -359,6 +360,7 @@ if(! class_exists('App')) {
 
 		public $category;
 
+
 		// Allow themes to control internal parameters
 		// by changing App values in theme.php
 
@@ -1231,7 +1233,7 @@ if(! function_exists('profile_sidebar')) {
 
 
 		// show edit profile to yourself
-		if ($profile['uid'] == local_user()) {
+		if ($profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
 			$profile['edit'] = array($a->get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
 		
 			$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
diff --git a/include/contact_selectors.php b/include/contact_selectors.php
index 4b3ca987a..7e2f81dff 100644
--- a/include/contact_selectors.php
+++ b/include/contact_selectors.php
@@ -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);
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index ea71b3b70..9401adcca 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -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
 	)); 
 
-};
\ No newline at end of file
+};
diff --git a/include/conversation.php b/include/conversation.php
index 1de77feb1..e4f3ec9ff 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -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)
diff --git a/include/items.php b/include/items.php
index 4ef26fbda..f22de3035 100755
--- a/include/items.php
+++ b/include/items.php
@@ -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))
diff --git a/include/nav.php b/include/nav.php
index e26cc8889..3c058e04f 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -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'));
 	}
 
diff --git a/mod/editpost.php b/mod/editpost.php
index 1dc6aea21..d6539e107 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -28,9 +28,12 @@ function editpost_content(&$a) {
 		return;
 	}
 
-	$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;
 
 
 	$o .= '<h2>' . t('Edit post') . '</h2>';
@@ -130,7 +133,7 @@ function editpost_content(&$a) {
 		'$title' => $itm[0]['title'],
 		'$placeholdertitle' => t('Set title'),
 		'$category' => file_tag_file_to_list($itm[0]['file'], 'category'),
-		'$placeholdercategory' => t('Categories (comma-separated list)'),
+		'$placeholdercategory' => (feature_enabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
 		'$emtitle' => t('Example: bob@example.com, mary@example.com'),
 		'$lockstate' => $lockstate,
 		'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),
diff --git a/mod/item.php b/mod/item.php
index 6dbe99dfd..c9cdc6027 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -309,7 +309,11 @@ function item_post(&$a) {
 	// First figure out if it's a status post that would've been
 	// created using tinymce. Otherwise leave it alone. 
 
-	$plaintext = (local_user() ? intval(get_pconfig(local_user(),'system','plaintext')) : 0);
+/*	$plaintext = (local_user() ? intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled($profile_uid,'richtext') : 0);
+	if((! $parent) && (! $api_source) && (! $plaintext)) {
+		$body = fix_mce_lf($body);
+	}*/
+	$plaintext = (local_user() ? !feature_enabled($profile_uid,'richtext') : 0);
 	if((! $parent) && (! $api_source) && (! $plaintext)) {
 		$body = fix_mce_lf($body);
 	}
diff --git a/mod/message.php b/mod/message.php
index 97c658632..744a3eb3f 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -46,7 +46,11 @@ function message_post(&$a) {
 
 	// Work around doubled linefeeds in Tinymce 3.5b2
 
-	$plaintext = intval(get_pconfig(local_user(),'system','plaintext'));
+/*	$plaintext = intval(get_pconfig(local_user(),'system','plaintext') && !feature_enabled(local_user(),'richtext'));
+	if(! $plaintext) {
+		$body = fix_mce_lf($body);
+	}*/
+	$plaintext = intval(!feature_enabled(local_user(),'richtext'));
 	if(! $plaintext) {
 		$body = fix_mce_lf($body);
 	}
@@ -229,9 +233,12 @@ function message_content(&$a) {
 		
 		$o .= $header;
 		
-		$plaintext = false;
+/*		$plaintext = false;
 		if(intval(get_pconfig(local_user(),'system','plaintext')))
-			$plaintext = true;
+			$plaintext = true;*/
+		$plaintext = true;
+		if( local_user() && feature_enabled(local_user(),'richtext') )
+			$plaintext = false;
 
 
 		$tpl = get_markup_template('msg-header.tpl');
diff --git a/mod/network.php b/mod/network.php
index bbdd0130d..2ab5b6de3 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -181,7 +181,7 @@ function network_init(&$a) {
 		$a->page['content'] .= '<h2>' . t('Search Results For:') . ' '  . $search . '</h2>';
 	}
 
-	$a->page['aside'] .= group_side('network/0','network',true,$group_id);
+	$a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network',true,$group_id) : '');
 	$a->page['aside'] .= posted_date_widget($a->get_baseurl() . '/network',local_user(),false);	
 	$a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
 	$a->page['aside'] .= saved_searches($search);
@@ -191,6 +191,9 @@ function network_init(&$a) {
 
 function saved_searches($search) {
 
+	if(! feature_enabled(local_user(),'savedsearch'))
+		return '';
+
 	$a = get_app();
 
 	$srchurl = '/network?f=' 
@@ -403,30 +406,30 @@ function network_content(&$a, $update = 0) {
 			'title' => t('Sort by Post Date'),
 		),
 
-		array(
+/*		array(
 			'label' => t('Personal'),
 			'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1',
 			'sel' => $conv_active,
 			'title' => t('Posts that mention or involve you'),
-		),
-		array(
+		),*/
+/*		array(
 			'label' => t('New'),
 			'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ($len_naked_cmd ? '/' : '') . 'new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
 			'sel' => $new_active,
 			'title' => t('Activity Stream - by date'),
-		),
-		array(
+		),*/
+/*		array(
 			'label' => t('Starred'),
 			'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
 			'sel'=>$starred_active,
 			'title' => t('Favourite Posts'),
-		),
-		array(
+		),*/
+/*		array(
 			'label' => t('Shared Links'),
 			'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1',
 			'sel'=>$bookmarked_active,
 			'title'=> t('Interesting Links'),
-		),	
+		),	*/
 //		array(
 //			'label' => t('Spam'),
 //			'url'=>$a->get_baseurl(true) . '/network?f=&spam=1'
@@ -436,6 +439,53 @@ function network_content(&$a, $update = 0) {
 
 	);
 	
+	if(feature_enabled(local_user(),'personal_tab')) {
+		$tabs[] = array(
+			'label' => t('Personal'),
+			'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1',
+			'sel' => $conv_active,
+			'title' => t('Posts that mention or involve you'),
+		);
+	}
+
+	if(feature_enabled(local_user(),'new_tab')) {
+		$tabs[] = array(
+			'label' => t('New'),
+			'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ($len_naked_cmd ? '/' : '') . 'new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
+			'sel' => $new_active,
+			'title' => t('Activity Stream - by date'),
+		);
+	}
+
+	if(feature_enabled(local_user(),'link_tab')) {
+		$tabs[] = array(
+			'label' => t('Shared Links'),
+			'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1',
+			'sel'=>$bookmarked_active,
+			'title'=> t('Interesting Links'),
+		);
+	}
+
+	if(feature_enabled(local_user(),'star_posts')) {
+		$tabs[] = array(
+			'label' => t('Starred'),
+			'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
+			'sel'=>$starred_active,
+			'title' => t('Favourite Posts'),
+		);
+	}
+
+	// Not yet implemented
+
+/*	if(feature_enabled(local_user(),'spam_filter'))  {
+		$tabs[] = array(
+			'label' => t('Spam'),
+			'url'=>$a->get_baseurl(true) . '/network?f=&spam=1',
+			'sel'=> $spam_active,
+			'title' => t('Posts flagged as SPAM'),
+		);
+	}*/
+
 	// save selected tab, but only if not in search or file mode
 	if(!x($_GET,'search') && !x($_GET,'file')) {
 		set_pconfig( local_user(), 'network.view','tab.selected',array($all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active) );
diff --git a/mod/profiles.php b/mod/profiles.php
index 013e8e820..e30c98218 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -554,9 +554,12 @@ function profiles_content(&$a) {
 		require_once('include/profile_selectors.php');
 
 
-		$editselect = 'textareas';
-		if(intval(get_pconfig(local_user(),'system','plaintext')))
-			$editselect = 'none';
+/*		$editselect = 'textareas';
+		if( intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext') )
+			$editselect = 'none';*/
+		$editselect = 'none';
+		if( feature_enabled(local_user(),'richtext') )
+			$editselect = 'textareas';
 
 		$a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
 			'$baseurl' => $a->get_baseurl(true),
diff --git a/mod/search.php b/mod/search.php
index ac848a0ce..d57275098 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -4,6 +4,9 @@ function search_saved_searches() {
 
 	$o = '';
 
+	if(! feature_enabled(local_user(),'savedsearch'))
+		return $o;
+
 	$r = q("select `id`,`term` from `search` WHERE `uid` = %d",
 		intval(local_user())
 	);
diff --git a/mod/settings.php b/mod/settings.php
index bd5e81e2e..1e464de18 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -31,6 +31,11 @@ function settings_init(&$a) {
 			'url' 	=> $a->get_baseurl(true).'/settings',
 			'selected'	=> (($a->argc == 1)?'active':''),
 		),	
+		array(
+			'label'	=> t('Additional features'),
+			'url' 	=> $a->get_baseurl(true).'/settings/features',
+			'selected'	=> (($a->argc > 1) && ($a->argv[1] === 'features') ? 'active' : ''),
+		),
 		array(
 			'label'	=> t('Display settings'),
 			'url' 	=> $a->get_baseurl(true).'/settings/display',
@@ -231,7 +236,18 @@ function settings_post(&$a) {
 		return;
 	}
 	
-	if(($a->argc > 1) && ($a->argv[1] == 'display')) {
+	if(($a->argc > 1) && ($a->argv[1] === 'features')) {
+		check_form_security_token_redirectOnErr('/settings/features', 'settings_features');
+		foreach($_POST as $k => $v) {
+			if(strpos($k,'feature_') === 0) {
+				set_pconfig(local_user(),'feature',substr($k,8),((intval($v)) ? 1 : 0));
+			}
+		}
+		info( t('Features updated') . EOL);
+		return;
+	}
+
+	if(($a->argc > 1) && ($a->argv[1] === 'display')) {
 		
 		check_form_security_token_redirectOnErr('/settings/display', 'settings_display');
 
@@ -612,6 +628,7 @@ function settings_content(&$a) {
 		return $o;
 		
 	}
+
 	if(($a->argc > 1) && ($a->argv[1] === 'addon')) {
 		$settings_addons = "";
 		
@@ -631,6 +648,30 @@ function settings_content(&$a) {
 		return $o;
 	}
 
+	if(($a->argc > 1) && ($a->argv[1] === 'features')) {
+		
+		$arr = array();
+		$features = get_features();
+		foreach($features as $fname => $fdata) {
+			$arr[$fname] = array();
+			$arr[$fname][0] = $fdata[0];
+			foreach(array_slice($fdata,1) as $f) {
+				$arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(get_pconfig(local_user(),'feature',$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On')));
+			}
+		}
+
+
+		$tpl = get_markup_template("settings_features.tpl");
+		$o .= replace_macros($tpl, array(
+			'$form_security_token' => get_form_security_token("settings_features"),
+			'$title'	=> t('Additional Features'),
+			'$features' => $arr,
+			'$submit'   => t('Submit'),
+			'$field_yesno'	=> 'field_yesno.tpl',
+		));
+		return $o;
+	}
+
 	if(($a->argc > 1) && ($a->argv[1] === 'connectors')) {
 
 		$settings_connectors = "";
diff --git a/object/Item.php b/object/Item.php
index 279929111..c513591b0 100644
--- a/object/Item.php
+++ b/object/Item.php
@@ -113,7 +113,7 @@ class Item extends BaseObject {
 
 		$drop = array(
 			'dropping' => $dropping,
-			'pagedrop' => $item['pagedrop'],
+			'pagedrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $item['pagedrop'] : ''),
 			'select' => t('Select'), 
 			'delete' => t('Delete'),
 		);
@@ -184,8 +184,10 @@ class Item extends BaseObject {
 					'classdo' => (($item['starred']) ? "hidden" : ""),
 					'classundo' => (($item['starred']) ? "" : "hidden"),
 					'starred' =>  t('starred'),
-					'tagger' => t("add tag"),
-					'classtagger' => "",
+				);
+				$tagger = array(
+					'add' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? t("add tag") : ''),
+					'class' => "",
 				);
 			}
 		} else {
@@ -195,7 +197,7 @@ class Item extends BaseObject {
 		if($conv->is_writable()) {
 			$buttons = array(
 				'like' => array( t("I like this \x28toggle\x29"), t("like")),
-				'dislike' => array( t("I don't like this \x28toggle\x29"), t("dislike")),
+				'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''),
 			);
 			if ($shareable) $buttons['share'] = array( t('Share this'), t('share'));
 		}
@@ -249,14 +251,15 @@ class Item extends BaseObject {
 			'owner_photo' => $this->get_owner_photo(),
 			'owner_name' => template_escape($this->get_owner_name()),
 			'plink' => get_plink($item),
-			'edpost' => $edpost,
+			'edpost'    => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
 			'isstarred' => $isstarred,
-			'star' => $star,
-			'filer' => $filer,
+			'star'      => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''),
+			'tagger'	=> $tagger,
+			'filer'     => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
 			'drop' => $drop,
 			'vote' => $buttons,
 			'like' => $like,
-			'dislike' => $dislike,
+			'dislike'   => $dislike,
 			'switchcomment' => t('Comment'),
 			'comment' => $this->get_comment_box($indent),
 			'previewing' => ($conv->is_preview() ? ' preview ' : ''),
@@ -570,7 +573,7 @@ class Item extends BaseObject {
 				'$edimg' => t('Image'),
 				'$edurl' => t('Link'),
 				'$edvideo' => t('Video'),
-				'$preview' => t('Preview'),
+				'$preview' => ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''),
 				'$indent' => $indent,
 				'$sourceapp' => t($a->sourcename),
 				'$ww' => (($conv->get_mode() === 'network') ? $ww : ''),
diff --git a/view/jot.tpl b/view/jot.tpl
index 0f2176681..61d727307 100644
--- a/view/jot.tpl
+++ b/view/jot.tpl
@@ -16,7 +16,9 @@
 		<input type="hidden" name="preview" id="jot-preview" value="0" />
 		<input type="hidden" name="post_id_random" value="$rand_num" />
 		<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
+		{{ if $placeholdercategory }}
 		<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
+		{{ endif }}
 		<div id="jot-text-wrap">
 		<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
 		<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
diff --git a/view/theme/diabook/jot.tpl b/view/theme/diabook/jot.tpl
index 1d94cb6d3..bd2cb30e8 100644
--- a/view/theme/diabook/jot.tpl
+++ b/view/theme/diabook/jot.tpl
@@ -14,7 +14,9 @@
 		<input type="hidden" name="post_id" value="$post_id" />
 		<input type="hidden" name="preview" id="jot-preview" value="0" />
 		<input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none">
+		{{ if $placeholdercategory }}
 		<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>		
+		{{ endif }}
 		<div id="character-counter" class="grey"></div>		
 		<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
 		<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
diff --git a/view/theme/diabook/wall_thread.tpl b/view/theme/diabook/wall_thread.tpl
index b15b829f2..85890a27b 100644
--- a/view/theme/diabook/wall_thread.tpl
+++ b/view/theme/diabook/wall_thread.tpl
@@ -98,7 +98,9 @@
 			
 			{{ if $item.vote }}
 				<a href="#" id="like-$item.id" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false">$item.vote.like.1</a>
+				{{ if $item.vote.dislike }}
 				<a href="#" id="dislike-$item.id" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+				{{ endif }}
 			{{ endif }}
 						
 			{{ if $item.vote.share }}
@@ -109,7 +111,10 @@
 			{{ if $item.star }}
 				<a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle">
 				<img src="images/star_dummy.png" class="icon star" alt="$item.star.do" /> </a>
-				<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>					  
+			{{ endif }}
+
+			{{ if $item.tagger }}
+				<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.tagger.add"></a>					  
 			{{ endif }}	
 			
 			{{ if $item.filer }}
diff --git a/view/theme/dispy/jot.tpl b/view/theme/dispy/jot.tpl
index 580904485..193872f18 100644
--- a/view/theme/dispy/jot.tpl
+++ b/view/theme/dispy/jot.tpl
@@ -12,7 +12,9 @@
 		<input type="hidden" name="post_id_random" value="$rand_num" />
 		<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none" /></div>
 		<div id="character-counter" class="grey jothidden"></div>
+		{{ if $placeholdercategory }}
 		<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
+		{{ endif }}
 		<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body">{{ if $content }}$content{{ else }}$share{{ endif }}
 		</textarea>
 
diff --git a/view/theme/dispy/wall_thread.tpl b/view/theme/dispy/wall_thread.tpl
index 44517fabc..3524c9568 100644
--- a/view/theme/dispy/wall_thread.tpl
+++ b/view/theme/dispy/wall_thread.tpl
@@ -49,13 +49,19 @@
 				{{ if $item.star }}
 				<li>
 					<a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
-					<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
+				</li>
+				{{ endif }}
+				{{ if $item.tagger }}
+				<li>
+					<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.tagger.add"></a>
 				</li>
 				{{ endif }}
 				{{ if $item.vote }}
 				<li class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
 					<a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
+					{{ if $item.vote.dislike }}
 					<a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+					{{ endif }}
 					{{ if $item.vote.share }}
 					<a href="#" id="share-$item.id"
 class="icon recycle wall-item-share-buttons"  title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
diff --git a/view/theme/frost-mobile/jot.tpl b/view/theme/frost-mobile/jot.tpl
index 7dd689378..d8dd44990 100644
--- a/view/theme/frost-mobile/jot.tpl
+++ b/view/theme/frost-mobile/jot.tpl
@@ -17,7 +17,9 @@
 		<input type="hidden" name="preview" id="jot-preview" value="0" />
 		<input type="hidden" name="post_id_random" value="$rand_num" />
 		<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
+		{{ if $placeholdercategory }}
 		<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
+		{{ endif }}
 		<div id="jot-text-wrap">
 		<!--<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />-->
 		<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
diff --git a/view/theme/frost-mobile/nav.tpl b/view/theme/frost-mobile/nav.tpl
index 38f78c5c7..8425640a7 100644
--- a/view/theme/frost-mobile/nav.tpl
+++ b/view/theme/frost-mobile/nav.tpl
@@ -117,6 +117,12 @@
 		<!--<span id="net-update" class="nav-ajax-left"></span>-->
 		{{ endif }}
 
+		{{ if $nav.network }}
+		<li>
+		<a class="nav-menu-icon network-reset-link nav-link" href="$nav.net_reset.0" title="$nav.net_reset.3">$nav.net_reset.1</a>
+		</li>
+		{{ endif }}
+
 		{{ if $nav.home }}
 		<li><a id="nav-home-link" class="$nav.home.2 $sel.home nav-load-page-link" href="$nav.home.0" title="$nav.home.3" >$nav.home.1</a></li>
 		<!--<span id="home-update" class="nav-ajax-left"></span>-->
diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css
index b38fdceb8..9cf97e0a7 100644
--- a/view/theme/frost-mobile/style.css
+++ b/view/theme/frost-mobile/style.css
@@ -278,6 +278,7 @@ nav .nav-link {
 }
 
 #network-menu-list {
+	width: 9em;
 	left: 3px;
 }
 
@@ -2750,7 +2751,7 @@ aside input[type='text'] {
 	margin-left: 100px;
 	margin-bottom: 20px;
 }
-.settings-submit, .profile-edit-submit-button {
+.settings-submit, .profile-edit-submit-button, .settings-features-submit {
 	padding: 0.25em 0.5em;
 	margin-bottom: 10px;
 	font-size: 18px;
@@ -3420,7 +3421,7 @@ aside input[type='text'] {
 	display: block;
 	margin-left: 20px;
 	color: #666666;
-	
+	clear: left;
 }
 
 
@@ -3457,7 +3458,7 @@ aside input[type='text'] {
 }
 .hidden { display: none!important; }
 
-.field.radio .field_help { clear: left; margin-left: 20px; }
+.field.radio .field_help { margin-left: 20px; }
 
 /**
  * ADMIN
diff --git a/view/theme/frost-mobile/wall_thread.tpl b/view/theme/frost-mobile/wall_thread.tpl
index dec5a7183..2b3b3d42d 100644
--- a/view/theme/frost-mobile/wall_thread.tpl
+++ b/view/theme/frost-mobile/wall_thread.tpl
@@ -67,7 +67,9 @@
 			{{ if $item.vote }}
 			<div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
 				<a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
+				{{ if $item.vote.dislike }}
 				<a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+				{{ endif }}
 				{{ if $item.vote.share }}<a href="#" class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
 				<img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
 			</div>
@@ -81,7 +83,9 @@
 			 
 			{{ if $item.star }}
 			<a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
-			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
+			{{ endif }}
+			{{ if $item.tagger }}
+			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.tagger.add"></a>
 			{{ endif }}
 			{{ if $item.filer }}
 			<a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.filer"></a>
diff --git a/view/theme/frost/images/net-reset.png b/view/theme/frost/images/net-reset.png
new file mode 100644
index 0000000000000000000000000000000000000000..8ea1afc5f34893506a3de8ccfea881fccd75cbbf
GIT binary patch
literal 939
zcmV;c162HpP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800006VoOIv0RI60
z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru+zS!~DkymUe#ig-12{=U
zK~z}7?Uu`q8$}d`zq)jFx5shghy;-U8kk%qB*;7fc>wYfk=SLK4R6FVAaPl;;3`-o
zVL@gQMiapd_Smu8-F3;r<xEe<o_Hig7R-@;m8<)>{&UWMs;c44&g}ng;&krk4f(Xd
z`wl_(j#jZFL_Q-8|JeQgQfvJ$2T&9#rGJ+Y5-K->=?EwR7d;Ysy_`y(!%uQ5y=U#=
z;530OHES(oZ@dlWCf)7@K!y-lg?U0(Qu6#V##{x|dQ7H!9n-x@QJ7=oX}U>TYysvZ
z;-!J~`vs)eD2nVPYB?W5N;TeN>aNo3834V}{{WE*X2ZuJgz7Yv3n7GXa4>}4E>rhD
z{eH5_cP>&u0t0ddQ+plK0aS`|_81642(b?7%TND$M#U2<vjsc?!tx5#l>s!v;USgW
z1%IB|>`DBCTmjXD5JI<*!~{#w!`KsIwFL8p5*Q8Hy!;5L+az(p_P9W@8j}GeDbQUm
zfhNO}#Eb<yJ1)Kxt*DpHmnGHq2^jGd+5L!e{1Y%~^?*vjs)k0YMJ8GSh=#9-nJKc&
zQ<jr>KFDM1jK>v8QUaZq1Hh)ST>eOwV*xau$>^7&vrVLblgfe8HMQ3$BXRx^?4Q8k
zNLn;?{Wqv>a9_nW76GUf+(H7kguI=3hB6<6-J`N!*0r4^i3UUlL6CIbqn5YOet=bf
zz|6%ejX+4qGAJjF(k6GI{yNTGi%>K&p9i4KEu8-y?5`*6Oa<yTinnm?Aut63Nzx|-
zi?u%-l~%eGFhClSHO8zl*T5y5>wx|36-R>u_syJKZ3BHkBgB9pK3p8ra|t}=g-&yA
z+F37tmuMaEKE;zao9P7m8Jq&S4gMFZY7ELnJ{K<w@d<<-Aa68{Y3yYak>mYSLf8j+
z2h0O->m1X&APbN;ARItQfC@N>61*t?Mr@XixLr0H=)`whz?4M&2=!;cx%F-c_bmhg
z>IzzqQR-TAdo8rD;t9CGEMgiliQ`4;`Wae&5At3N?v>XC_%9%AVbO$eqp=OCKz@4q
z4+amCF@EhYt1(J^hYRoExe(?3udSy+eh%D^ef3(byX;~*vom`w_8fmUQgJx+5WxTd
N002ovPDHLkV1gn0pjiL_

literal 0
HcmV?d00001

diff --git a/view/theme/frost/jot.tpl b/view/theme/frost/jot.tpl
index 9f7b71c53..48187b443 100644
--- a/view/theme/frost/jot.tpl
+++ b/view/theme/frost/jot.tpl
@@ -16,7 +16,9 @@
 		<input type="hidden" name="preview" id="jot-preview" value="0" />
 		<input type="hidden" name="post_id_random" value="$rand_num" />
 		<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
+		{{ if $placeholdercategory }}
 		<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
+		{{ endif }}
 		<div id="jot-text-wrap">
 		<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
 		<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
diff --git a/view/theme/frost/nav.tpl b/view/theme/frost/nav.tpl
index 1e14b1e72..e25f9a121 100644
--- a/view/theme/frost/nav.tpl
+++ b/view/theme/frost/nav.tpl
@@ -130,6 +130,14 @@
 	</ul>
 	</div>
 		
+	{{ if $nav.network }}
+	<div class="nav-button-container nav-menu-link" rel="#network-reset-button">
+	<a class="nav-menu-icon network-reset-link nav-link" href="$nav.net_reset.0" title="$nav.net_reset.3">
+	<img class="network-reset-link" src="$baseurl/view/theme/frost/images/net-reset.png">
+	</a>
+	</div>
+	{{ endif }}
+		
 	</span>
 	<!--<span id="nav-end"></span>-->
 	<span id="banner">$banner</span>
diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css
index 4878e2531..58c960d73 100644
--- a/view/theme/frost/style.css
+++ b/view/theme/frost/style.css
@@ -3204,6 +3204,9 @@ aside input[type='text'] {
 	float: left;
 	width: 200px;
 }
+.field.yesno label {
+	font-weight: 700;
+}
 
 .field input,
 .field textarea {
diff --git a/view/theme/frost/wall_thread.tpl b/view/theme/frost/wall_thread.tpl
index e82657583..b8e77d7fa 100644
--- a/view/theme/frost/wall_thread.tpl
+++ b/view/theme/frost/wall_thread.tpl
@@ -66,7 +66,9 @@
 			{{ if $item.vote }}
 			<div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
 				<a href="#" class="tool like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
+				{{ if $item.vote.dislike }}
 				<a href="#" class="tool dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+				{{ endif }}
 				{{ if $item.vote.share }}<a href="#" class="tool recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
 				<img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
 			</div>
@@ -80,7 +82,9 @@
 			 
 			{{ if $item.star }}
 			<a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item tool $item.isstarred" title="$item.star.toggle"></a>
-			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item tool tagged" title="$item.star.tagger"></a>
+			{{ endif }}
+			{{ if $item.tagger }}
+			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item tool tagged" title="$item.tagger.add"></a>
 			{{ endif }}
 			{{ if $item.filer }}
 			<a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.filer"></a>
diff --git a/view/theme/quattro/jot.tpl b/view/theme/quattro/jot.tpl
index 55fc322d7..55de92d08 100644
--- a/view/theme/quattro/jot.tpl
+++ b/view/theme/quattro/jot.tpl
@@ -1,7 +1,10 @@
 <form id="profile-jot-form" action="$action" method="post">
 	<div id="jot">
 		<div id="profile-jot-desc" class="jothidden">&nbsp;</div>
-		<input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" title="$placeholdertitle" value="$title" class="jothidden" style="display:none" /><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" title="$placeholdercategory" value="$category" class="jothidden" style="display:none" />
+		<input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" title="$placeholdertitle" value="$title" class="jothidden" style="display:none" />
+		{{ if $placeholdercategory }}
+		<input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" title="$placeholdercategory" value="$category" class="jothidden" style="display:none" />
+		{{ endif }}
 		<div id="character-counter" class="grey jothidden"></div>
 		
 
diff --git a/view/theme/quattro/wall_thread.tpl b/view/theme/quattro/wall_thread.tpl
index b39dda3a2..eee27776b 100644
--- a/view/theme/quattro/wall_thread.tpl
+++ b/view/theme/quattro/wall_thread.tpl
@@ -93,8 +93,9 @@
 			{{ if $item.star }}
 				<a href="#" id="star-$item.id" onclick="dostar($item.id); return false;"  class="$item.star.classdo"  title="$item.star.do">$item.star.do</a>
 				<a href="#" id="unstar-$item.id" onclick="dostar($item.id); return false;"  class="$item.star.classundo"  title="$item.star.undo">$item.star.undo</a>
-				<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="$item.star.classtagger" title="$item.star.tagger">$item.star.tagger</a>
-
+			{{ endif }}
+			{{ if $item.tagger }}
+				<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="$item.tagger.class" title="$item.tagger.add">$item.tagger.add</a>
 			{{ endif }}
 			{{ if $item.filer }}
                                 <a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.filer">$item.filer</a>
@@ -102,7 +103,9 @@
 			
 			{{ if $item.vote }}
 				<a href="#" id="like-$item.id" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false">$item.vote.like.1</a>
+				{{ if $item.vote.dislike }}
 				<a href="#" id="dislike-$item.id" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false">$item.vote.dislike.1</a>
+				{{ endif }}
 			{{ endif }}
 						
 			{{ if $item.vote.share }}
diff --git a/view/theme/smoothly/jot.tpl b/view/theme/smoothly/jot.tpl
index f990c95e1..12792fa0b 100644
--- a/view/theme/smoothly/jot.tpl
+++ b/view/theme/smoothly/jot.tpl
@@ -18,9 +18,11 @@
 		<div id="jot-title-wrap">
 			<input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none">
 		</div>
+		{{ if $placeholdercategory }}
 		<div id="jot-category-wrap">
 			<input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" />
 		</div>
+		{{ endif }}
 		<div id="jot-text-wrap">
                 	<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /><br>
                 	<textarea rows="5" cols="80" class="profile-jot-text" id="profile-jot-text" name="body" >
diff --git a/view/theme/smoothly/wall_thread.tpl b/view/theme/smoothly/wall_thread.tpl
index 3b4deaff9..e31f343e2 100644
--- a/view/theme/smoothly/wall_thread.tpl
+++ b/view/theme/smoothly/wall_thread.tpl
@@ -85,7 +85,9 @@
 			{{ if $item.vote }}
 			<div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
 				<a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
+				{{ if $item.vote.dislike }}
 				<a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+				{{ endif }}
 				{{ if $item.vote.share }}
 				<a href="#" class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>				{{ endif }}
 				<img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
@@ -100,7 +102,9 @@
 		 
 			{{ if $item.star }}
 			<a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
-			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
+			{{ endif }}
+			{{ if $item.tagger }}
+			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.tagger.add"></a>
 			{{ endif }}
 
 			{{ if $item.filer }}
diff --git a/view/theme/testbubble/wall_thread.tpl b/view/theme/testbubble/wall_thread.tpl
index f37f79bfc..634ae7f00 100644
--- a/view/theme/testbubble/wall_thread.tpl
+++ b/view/theme/testbubble/wall_thread.tpl
@@ -50,7 +50,7 @@
 			{{ if $item.vote }}
 			<div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
 				<a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
-				<a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+				{{ if $item.vote.dislike }}<a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>{{ endif }}
 				{{ if $item.vote.share }}<a href="#" class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
 				<img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
 			</div>
@@ -64,7 +64,9 @@
 			 
 			{{ if $item.star }}
 			<a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
-			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
+			{{ endif }}
+			{{ if $item.tagger }}
+			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.tagger.add"></a>
 			{{ endif }}
 			
 			<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
diff --git a/view/theme/vier/wall_thread.tpl b/view/theme/vier/wall_thread.tpl
index 19b612b08..84f164b8e 100644
--- a/view/theme/vier/wall_thread.tpl
+++ b/view/theme/vier/wall_thread.tpl
@@ -93,7 +93,9 @@
 			{{ endif }}{{ endif }}
 			{{ if $item.vote }}
 				<a href="#" id="like-$item.id" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"><i class="icon-thumbs-up icon-large"></i></a>
+				{{ if $item.vote.dislike }}
 				<a href="#" id="dislike-$item.id" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"><i class="icon-thumbs-down icon-large"></i></a>
+				{{ endif }}
 			{{ endif }}
 			{{ if $item.vote.share }}
 				<a href="#" id="share-$item.id" title="$item.vote.share.0" onclick="jotShare($item.id); return false"><i class="icon-share icon-large"></i></a>
@@ -101,7 +103,9 @@
 			{{ if $item.star }}
 				<a href="#" id="star-$item.id" onclick="dostar($item.id); return false;"  class="$item.star.classdo"  title="$item.star.do"><i class="icon-star icon-large"></i></a>
 				<a href="#" id="unstar-$item.id" onclick="dostar($item.id); return false;"  class="$item.star.classundo"  title="$item.star.undo"><i class="icon-star-empty icon-large"></i></a>
-				<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="$item.star.classtagger" title="$item.star.tagger"><i class="icon-tags icon-large"></i></a>
+			{{ endif }}
+			{{ if $item.tagger }}
+				<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="$item.tagger.class" title="$item.tagger.add"><i class="icon-tags icon-large"></i></a>
 			{{ endif }}
 			{{ if $item.filer }}
                                 <a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.filer"><i class="icon-folder-close icon-large"></i></a>
diff --git a/view/wall_thread.tpl b/view/wall_thread.tpl
index e891d571c..bcb74ec70 100644
--- a/view/wall_thread.tpl
+++ b/view/wall_thread.tpl
@@ -64,7 +64,7 @@
 			{{ if $item.vote }}
 			<div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
 				<a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
-				<a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+				{{ if $item.vote.dislike }}<a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>{{ endif }}
 				{{ if $item.vote.share }}<a href="#" class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
 				<img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
 			</div>
@@ -78,7 +78,9 @@
 			 
 			{{ if $item.star }}
 			<a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
-			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
+			{{ endif }}
+			{{ if $item.tagger }}
+			<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.tagger.add"></a>
 			{{ endif }}
 			{{ if $item.filer }}
 			<a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.filer"></a>

From 04f5506318793a117feb1e09d427c6ed98911679 Mon Sep 17 00:00:00 2001
From: Zach Prezkuta <fermion@gmx.com>
Date: Thu, 22 Nov 2012 09:20:03 -0700
Subject: [PATCH 2/4] forgot some slightly important files

---
 include/features.php       | 68 ++++++++++++++++++++++++++++++++++++++
 view/settings_features.tpl | 20 +++++++++++
 2 files changed, 88 insertions(+)
 create mode 100644 include/features.php
 create mode 100644 view/settings_features.tpl

diff --git a/include/features.php b/include/features.php
new file mode 100644
index 000000000..6c4518526
--- /dev/null
+++ b/include/features.php
@@ -0,0 +1,68 @@
+<?php
+
+/*
+ * Features management
+ */
+
+
+function feature_enabled($uid,$feature) {
+	//return true;
+
+	$x = get_pconfig($uid,'feature',$feature);
+	$arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
+	call_hooks('feature_enabled',$arr);
+	return($arr['enabled']);
+}
+
+function get_features() {
+
+	$arr = array(
+
+		// General
+		'general' => array(
+			'General Features',
+			//array('expire',         t('Content Expiration'),		t('Remove old posts/comments after a period of time')),
+			array('multi_profiles', t('Multiple Profiles'),			t('Ability to create multiple profiles')),
+		),
+
+		// Post composition
+		'composition' => array(
+			'Post Composition Features',
+			array('richtext',       t('Richtext Editor'),			t('Enable richtext editor')),
+			array('preview',        t('Post Preview'),				t('Allow previewing posts and comments before publishing them')),
+		),
+
+		// Network sidebar widgets
+		'widgets' => array(
+			'Network Sidebar Widgets',
+			array('archives',       t('Search by Date'),			t('Ability to select posts by date ranges')),
+			array('groups',    		t('Group Filter'),				t('Enable widget to display Network posts only from selected group')),
+			array('networks',  		t('Network Filter'),			t('Enable widget to display Network posts only from selected network')),
+			array('savedsearch',    t('Saved Searches'),			t('Save search terms for re-use')),
+		),
+
+		// Network tabs
+		'net_tabs' => array(
+			'Network Tabs',
+			array('personal_tab',   t('Network Personal Tab'),		t('Enable tab to display only Network posts that you\'ve interacted on')),
+			array('new_tab',   		t('Network New Tab'),			t('Enable tab to display only new Network posts (from the last 12 hours)')),
+			array('link_tab',   	t('Network Shared Links Tab'),	t('Enable tab to display only Network posts with links in them')),
+		),
+
+		// Item tools
+		'tools' => array(
+			'Post/Comment Tools',
+			array('multi_delete',   t('Multiple Deletion'),			t('Select and delete multiple posts/comments at once')),
+			array('edit_posts',     t('Edit Sent Posts'),			t('Edit and correct posts and comments after sending')),
+			array('commtag',        t('Tagging'),					t('Ability to tag existing posts')),
+			array('categories',     t('Post Categories'),			t('Add categories to your posts')),
+			array('filing',         t('Saved Folders'),				t('Ability to file posts under folders')),
+			array('dislike',        t('Dislike Posts'),				t('Ability to dislike posts/comments')),
+			array('boring',         t('Mark Boring Posts'),			t('Ability to mark posts/comments boring')),
+			array('star_posts',     t('Star Posts'),				t('Ability to mark special posts with a star indicator')),
+		),
+	);
+
+	call_hooks('get_features',$arr);
+	return $arr;
+}
diff --git a/view/settings_features.tpl b/view/settings_features.tpl
new file mode 100644
index 000000000..4065d8fc7
--- /dev/null
+++ b/view/settings_features.tpl
@@ -0,0 +1,20 @@
+<h1>$title</h1>
+
+
+<form action="settings/features" method="post" autocomplete="off">
+<input type='hidden' name='form_security_token' value='$form_security_token'>
+
+{{ for $features as $f }}
+<h3 class="settings-heading">$f.0</h3>
+
+{{ for $f.1 as $fcat }}
+	{{ inc $field_yesno with $field=$fcat }}{{endinc}}
+{{ endfor }}
+{{ endfor }}
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-features-submit" value="$submit" />
+</div>
+
+</form>
+

From a536a4e6572334f95a7a12ee2ae182293748a164 Mon Sep 17 00:00:00 2001
From: Zach Prezkuta <fermion@gmx.com>
Date: Thu, 22 Nov 2012 09:21:21 -0700
Subject: [PATCH 3/4] local stuff leaked

---
 include/features.php | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/features.php b/include/features.php
index 6c4518526..9decef49c 100644
--- a/include/features.php
+++ b/include/features.php
@@ -58,7 +58,6 @@ function get_features() {
 			array('categories',     t('Post Categories'),			t('Add categories to your posts')),
 			array('filing',         t('Saved Folders'),				t('Ability to file posts under folders')),
 			array('dislike',        t('Dislike Posts'),				t('Ability to dislike posts/comments')),
-			array('boring',         t('Mark Boring Posts'),			t('Ability to mark posts/comments boring')),
 			array('star_posts',     t('Star Posts'),				t('Ability to mark special posts with a star indicator')),
 		),
 	);

From beec28cc6298eb91ef512e582ae44e21ee55174c Mon Sep 17 00:00:00 2001
From: Zach Prezkuta <fermion@gmx.com>
Date: Thu, 22 Nov 2012 09:34:50 -0700
Subject: [PATCH 4/4] found a bug already

---
 object/Item.php | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/object/Item.php b/object/Item.php
index c513591b0..9cc9fe15a 100644
--- a/object/Item.php
+++ b/object/Item.php
@@ -185,10 +185,13 @@ class Item extends BaseObject {
 					'classundo' => (($item['starred']) ? "" : "hidden"),
 					'starred' =>  t('starred'),
 				);
-				$tagger = array(
-					'add' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? t("add tag") : ''),
-					'class' => "",
-				);
+				$tagger = '';
+				if(feature_enabled($conv->get_profile_owner(),'commtag')) {
+					$tagger = array(
+						'add' => t("add tag"),
+						'class' => "",
+					);
+				}
 			}
 		} else {
 			$indent = 'comment';