3 * @file mod/nogroup.php
6 use Friendica\Content\ContactSelector;
7 use Friendica\Core\L10n;
8 use Friendica\Database\DBM;
9 use Friendica\Model\Contact;
10 use Friendica\Model\Group;
12 function nogroup_init(App $a)
18 if (! x($a->page, 'aside')) {
19 $a->page['aside'] = '';
22 $a->page['aside'] .= Group::sidebarWidget('contacts', 'group', 'extended');
25 function nogroup_content(App $a)
28 notice(L10n::t('Permission denied.') . EOL);
32 $r = Contact::getUngroupedList(local_user());
33 if (DBM::is_result($r)) {
34 $a->set_pager_total($r[0]['total']);
36 $r = Contact::getUngroupedList(local_user(), $a->pager['start'], $a->pager['itemspage']);
37 if (DBM::is_result($r)) {
39 $contact_details = Contact::getDetailsByURL($rr['url'], local_user(), $rr);
42 'img_hover' => L10n::t('Visit %s\'s profile [%s]', $contact_details['name'], $rr['url']),
43 'edit_hover' => L10n::t('Edit contact'),
44 'photo_menu' => Contact::photoMenu($rr),
46 'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
47 'name' => $contact_details['name'],
48 'username' => $contact_details['name'],
49 'details' => $contact_details['location'],
50 'tags' => $contact_details['keywords'],
51 'about' => $contact_details['about'],
52 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
54 'network' => ContactSelector::networkToName($rr['network'], $rr['url']),
59 $tpl = get_markup_template("nogroup-template.tpl");
63 '$header' => L10n::t('Contacts who are not members of a group'),
64 '$contacts' => $contacts,
65 '$paginate' => paginate($a)]