]> git.mxchange.org Git - friendica.git/blob - include/features.php
forumlist: some little code unification
[friendica.git] / include / features.php
1 <?php
2
3 /*
4  * Features management
5  */
6
7
8 function feature_enabled($uid,$feature) {
9         //return true;
10
11         $x = get_pconfig($uid,'feature',$feature);
12         $arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
13         call_hooks('feature_enabled',$arr);
14         return($arr['enabled']);
15 }
16
17 function get_features() {
18
19         $arr = array(
20
21                 // General
22                 'general' => array(
23                         t('General Features'),
24                         //array('expire',         t('Content Expiration'),              t('Remove old posts/comments after a period of time')),
25                         array('multi_profiles', t('Multiple Profiles'),                 t('Ability to create multiple profiles')),
26                         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),
27                 ),
28
29                 // Post composition
30                 'composition' => array(
31                         t('Post Composition Features'),
32                         array('richtext',       t('Richtext Editor'),                   t('Enable richtext editor')),
33                         array('preview',        t('Post Preview'),                      t('Allow previewing posts and comments before publishing them')),
34                         array('aclautomention', t('Auto-mention Forums'),               t('Add/remove mention when a fourm page is selected/deselected in ACL window.')),
35                 ),
36
37                 // Network sidebar widgets
38                 'widgets' => array(
39                         t('Network Sidebar Widgets'),
40                         array('archives',       t('Search by Date'),                    t('Ability to select posts by date ranges')),
41                         array('forumlist',      t('List Forums'),                       t('Enable widget to display the forums your are connected with')),
42                         array('groups',         t('Group Filter'),                      t('Enable widget to display Network posts only from selected group')),
43                         array('networks',       t('Network Filter'),                    t('Enable widget to display Network posts only from selected network')),
44                         array('savedsearch',    t('Saved Searches'),                    t('Save search terms for re-use')),
45                 ),
46
47                 // Network tabs
48                 'net_tabs' => array(
49                         t('Network Tabs'),
50                         array('personal_tab',   t('Network Personal Tab'),              t('Enable tab to display only Network posts that you\'ve interacted on')),
51                         array('new_tab',        t('Network New Tab'),                   t('Enable tab to display only new Network posts (from the last 12 hours)')),
52                         array('link_tab',       t('Network Shared Links Tab'),          t('Enable tab to display only Network posts with links in them')),
53                 ),
54
55                 // Item tools
56                 'tools' => array(
57                         t('Post/Comment Tools'),
58                         array('multi_delete',   t('Multiple Deletion'),                 t('Select and delete multiple posts/comments at once')),
59                         array('edit_posts',     t('Edit Sent Posts'),                   t('Edit and correct posts and comments after sending')),
60                         array('commtag',        t('Tagging'),                           t('Ability to tag existing posts')),
61                         array('categories',     t('Post Categories'),                   t('Add categories to your posts')),
62                         array('filing',         t('Saved Folders'),                     t('Ability to file posts under folders')),
63                         array('dislike',        t('Dislike Posts'),                     t('Ability to dislike posts/comments')),
64                         array('star_posts',     t('Star Posts'),                        t('Ability to mark special posts with a star indicator')),
65                         array('ignore_posts',   t('Mute Post Notifications'),           t('Ability to mute notifications for a thread')),
66                 ),
67
68                 // Advanced Profile Settings
69                 'advanced_profile' => array(
70                         t('Advanced Profile Settings'),
71                         array('forumlist_profile', t('List Forums'),                    t('Show visitors public community forums at the Advanced Profile Page')),
72                 ),
73         );
74
75         call_hooks('get_features',$arr);
76         return $arr;
77 }