This repository has been archived by the owner on Jul 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqa-admin-categories.php
47 lines (40 loc) · 1.62 KB
/
qa-admin-categories.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/*
Q2A Groups by JacksiroKe
https://github.com/JacksiroKe
*/
function group_sub_navigationx($request)
{
$navigation = array();
$navigation['home'] = array(
'label' => qa_lang('group_lang/group_home'),
'url' => qa_path_html('groups'),
'selected' => ($request == 'groups' ) ? 'selected' : '',
);
/*$navigation['browse'] = array(
'label' => qa_lang('group_lang/group_discover'),
'url' => qa_path_html('groups/discover'),
'selected' => ($request == 'groups/discover' ) ? 'selected' : '',
);*/
//if (qa_user_maximum_permit_error('bp_permit_post_p') != 'level') {
if (qa_is_logged_in()) {
$navigation['create'] = array(
'label' => qa_lang('group_lang/group_create'),
'url' => qa_path_html('groups/create'),
'selected' => ($request == 'groups/create' ) ? 'selected' : '',
);
}
if (qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN || !qa_user_maximum_permit_error('permit_moderate') ||
!qa_user_maximum_permit_error('permit_hide_show') || !qa_user_maximum_permit_error('permit_delete_hidden')
) {
$navigation['admin_cats'] = array(
'label' => qa_lang('group_lang/group_manage_cats'),
'url' => qa_path_html('groups/admin_cats'),
'selected' => ($request == 'groups/admin_cats' ) ? 'selected' : '',
);
}
return $navigation;
}
/*
Omit PHP closing tag to help avoid accidental output
*/