aboutsummaryrefslogtreecommitdiffstats
path: root/mod/contacts.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-17 16:08:47 -0700
committerFriendika <info@friendika.com>2011-07-17 16:08:47 -0700
commit43110db749850e49d309ad8b3e72266bd373a2a8 (patch)
tree29e37a53fb18961eac1f6eca051bff093aded5cb /mod/contacts.php
parent944f03d3675779e32a6ed8bed28609ca59a66554 (diff)
downloadvolse-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.php17
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" >'