diff options
author | Friendika <info@friendika.com> | 2011-07-17 16:08:47 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-07-17 16:08:47 -0700 |
commit | 43110db749850e49d309ad8b3e72266bd373a2a8 (patch) | |
tree | 29e37a53fb18961eac1f6eca051bff093aded5cb /mod/contacts.php | |
parent | 944f03d3675779e32a6ed8bed28609ca59a66554 (diff) | |
download | volse-hubzilla-43110db749850e49d309ad8b3e72266bd373a2a8.tar.gz volse-hubzilla-43110db749850e49d309ad8b3e72266bd373a2a8.tar.bz2 volse-hubzilla-43110db749850e49d309ad8b3e72266bd373a2a8.zip |
begin invites, fb setup changes
Diffstat (limited to 'mod/contacts.php')
-rw-r--r-- | mod/contacts.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 7a97b53d2..388bf08e6 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -3,13 +3,26 @@ require_once('include/Contact.php'); function contacts_init(&$a) { + if(! local_user()) + return; + require_once('include/group.php'); if(! x($a->page,'aside')) $a->page['aside'] = ''; $a->page['aside'] .= group_side(); - if($a->config['register_policy'] != REGISTER_CLOSED) - $a->page['aside'] .= '<div class="side-link" id="side-invite-link" ><a href="invite" >' . t("Invite Friends") . '</a></div>'; + $inv = '<div class="side-link" id="side-invite-link" ><a href="invite" >' . t("Invite Friends") . '</a></div>'; + + if(get_config('system','invitations_only')) { + $x = get_pconfig(local_user(),'system','invites_remaining'); + if($x || is_site_admin()) { + $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">' + . sprintf( tt('%d invitation available','%d invitations available',$x), $x) + . '</div>' . $inv; + } + } + elseif($a->config['register_policy'] != REGISTER_CLOSED) + $a->page['aside'] .= $inv; $a->page['aside'] .= '<div class="side-link" id="side-match-link"><a href="match" >' |