aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeroenpraat <jeroenpraat@xs4all.nl>2016-01-18 21:37:47 +0100
committerjeroenpraat <jeroenpraat@xs4all.nl>2016-01-18 21:37:47 +0100
commita036d88a4e6e6a83f9962f0f46094cfdac99d263 (patch)
tree14bbed6eb3256ac6ea6b8042ca983e255600c1b7
parentfc54f54b989570e2767a53c3c72875255b0dc95f (diff)
downloadvolse-hubzilla-a036d88a4e6e6a83f9962f0f46094cfdac99d263.tar.gz
volse-hubzilla-a036d88a4e6e6a83f9962f0f46094cfdac99d263.tar.bz2
volse-hubzilla-a036d88a4e6e6a83f9962f0f46094cfdac99d263.zip
Added a feature to hide rating buttons from a members channel and profile pages.
-rw-r--r--include/features.php1
-rw-r--r--include/identity.php6
2 files changed, 5 insertions, 2 deletions
diff --git a/include/features.php b/include/features.php
index ffa8bf8ca..b18a58ed4 100644
--- a/include/features.php
+++ b/include/features.php
@@ -49,6 +49,7 @@ function get_features($filtered = true) {
array('advanced_profiles', t('Advanced Profiles'), t('Additional profile sections and selections'),false,get_config('feature_lock','advanced_profiles')),
array('profile_export', t('Profile Import/Export'), t('Save and load profile details across sites/channels'),false,get_config('feature_lock','profile_export')),
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel'),false,get_config('feature_lock','webpages')),
+ array('hide_rating', t('Hide Rating'), t('Hide the rating buttons on your channel and profile pages. Note: People can still rate you somewhere else.'),false,get_config('feature_lock','hide_rating')),
array('private_notes', t('Private Notes'), t('Enables a tool to store notes and reminders'),false,get_config('feature_lock','private_notes')),
array('nav_channel_select', t('Navigation Channel Select'), t('Change channels directly from within the navigation dropdown menu'),false,get_config('feature_lock','nav_channel_select')),
array('photo_location', t('Photo Location'), t('If location data is available on uploaded photos, link this to a map.'),false,get_config('feature_lock','photo_location')),
diff --git a/include/identity.php b/include/identity.php
index 2a02d4093..32c4dd130 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1051,8 +1051,10 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
$tpl = get_markup_template('profile_vcard.tpl');
require_once('include/widgets.php');
- $z = widget_rating(array('target' => $profile['channel_hash']));
+ if(! feature_enabled($profile['uid'],'hide_rating'))
+ $z = widget_rating(array('target' => $profile['channel_hash']));
+
$o .= replace_macros($tpl, array(
'$profile' => $profile,
'$connect' => $connect,
@@ -1773,4 +1775,4 @@ function get_cover_photo($channel_id,$format = 'bbcode', $res = PHOTO_RES_COVER_
return $output;
-} \ No newline at end of file
+}