3 * @file mod/nogroup.php
6 use Friendica\Database\DBM;
7 use Friendica\Model\Contact;
8 use Friendica\Model\Group;
10 require_once 'include/contact_selectors.php';
12 function nogroup_init(App $a)
18 require_once 'include/contact_widgets.php';
20 if (! x($a->page, 'aside')) {
21 $a->page['aside'] = '';
24 $a->page['aside'] .= Group::sidebarWidget('contacts', 'group', 'extended');
27 function nogroup_content(App $a)
30 notice(t('Permission denied.') . EOL);
34 $r = Contact::getUngroupedList(local_user());
35 if (DBM::is_result($r)) {
36 $a->set_pager_total($r[0]['total']);
38 $r = Contact::getUngroupedList(local_user(), $a->pager['start'], $a->pager['itemspage']);
39 if (DBM::is_result($r)) {
41 $contact_details = Contact::getDetailsByURL($rr['url'], local_user(), $rr);
44 'img_hover' => sprintf(t('Visit %s\'s profile [%s]'), $contact_details['name'], $rr['url']),
45 'edit_hover' => t('Edit contact'),
46 'photo_menu' => Contact::photoMenu($rr),
48 'alt_text' => $alt_text,
49 'dir_icon' => $dir_icon,
50 'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
51 'name' => $contact_details['name'],
52 'username' => $contact_details['name'],
53 'details' => $contact_details['location'],
54 'tags' => $contact_details['keywords'],
55 'about' => $contact_details['about'],
56 'sparkle' => $sparkle,
57 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
59 'network' => network_to_name($rr['network'], $url),
64 $tpl = get_markup_template("nogroup-template.tpl");
68 '$header' => t('Contacts who are not members of a group'),
69 '$contacts' => $contacts,
70 '$paginate' => paginate($a))