4 * @file include/features.php *
5 * @brief Features management
9 * @brief check if feature is enabled
13 function feature_enabled($uid,$feature) {
16 $x = get_pconfig($uid,'feature',$feature);
18 $x = get_config('feature',$feature);
20 $x = get_feature_default($feature);
22 $arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
23 call_hooks('feature_enabled',$arr);
24 return($arr['enabled']);
28 * @brief check if feature is enabled or disabled by default
30 * @param string $feature
33 function get_feature_default($feature) {
36 foreach($cat as $feat) {
37 if(is_array($feat) && $feat[0] === $feature)
45 * @ brief get a list of all available features
46 * The array includes the setting group, the setting name,
47 * explainations for the setting and if it's enabled or disabled
52 function get_features() {
58 t('General Features'),
59 //array('expire', t('Content Expiration'), t('Remove old posts/comments after a period of time')),
60 array('multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles'),false),
61 array('photo_location', t('Photo Location'), t('Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'),false),
65 'composition' => array(
66 t('Post Composition Features'),
67 array('richtext', t('Richtext Editor'), t('Enable richtext editor'),false),
68 array('preview', t('Post Preview'), t('Allow previewing posts and comments before publishing them'),false),
69 array('aclautomention', t('Auto-mention Forums'), t('Add/remove mention when a fourm page is selected/deselected in ACL window.'),false),
72 // Network sidebar widgets
74 t('Network Sidebar Widgets'),
75 array('archives', t('Search by Date'), t('Ability to select posts by date ranges'),false),
76 array('forumlist_widget', t('List Forums'), t('Enable widget to display the forums your are connected with'),true),
77 array('groups', t('Group Filter'), t('Enable widget to display Network posts only from selected group'),false),
78 array('networks', t('Network Filter'), t('Enable widget to display Network posts only from selected network'),false),
79 array('savedsearch', t('Saved Searches'), t('Save search terms for re-use'),false),
85 array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on'),false),
86 array('new_tab', t('Network New Tab'), t('Enable tab to display only new Network posts (from the last 12 hours)'),false),
87 array('link_tab', t('Network Shared Links Tab'), t('Enable tab to display only Network posts with links in them'),false),
92 t('Post/Comment Tools'),
93 array('multi_delete', t('Multiple Deletion'), t('Select and delete multiple posts/comments at once'),false),
94 array('edit_posts', t('Edit Sent Posts'), t('Edit and correct posts and comments after sending'),false),
95 array('commtag', t('Tagging'), t('Ability to tag existing posts'),false),
96 array('categories', t('Post Categories'), t('Add categories to your posts'),false),
97 array('filing', t('Saved Folders'), t('Ability to file posts under folders'),false),
98 array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments')),
99 array('star_posts', t('Star Posts'), t('Ability to mark special posts with a star indicator'),false),
100 array('ignore_posts', t('Mute Post Notifications'), t('Ability to mute notifications for a thread'),false),
103 // Advanced Profile Settings
104 'advanced_profile' => array(
105 t('Advanced Profile Settings'),
106 array('forumlist_profile', t('List Forums'), t('Show visitors public community forums at the Advanced Profile Page'),false),
110 call_hooks('get_features',$arr);