From 43110db749850e49d309ad8b3e72266bd373a2a8 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 17 Jul 2011 16:08:47 -0700 Subject: [PATCH] begin invites, fb setup changes --- addon/facebook/README | 2 ++ addon/facebook/facebook.php | 3 +++ boot.php | 2 +- doc/Installing-Connectors.md | 4 ++++ include/zotfns.php | 2 -- mod/contacts.php | 17 +++++++++++++-- mod/invite.php | 40 +++++++++++++++++++++++++++++++++--- 7 files changed, 62 insertions(+), 8 deletions(-) diff --git a/addon/facebook/README b/addon/facebook/README index 42ec01383..19c594886 100644 --- a/addon/facebook/README +++ b/addon/facebook/README @@ -15,6 +15,8 @@ Installing the Friendika/Facebook connector $a->config['facebook']['appid'] = 'xxxxxxxxxxx'; $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx'; Replace with the settings Facebook gives you. + d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set Site URL + to yoursubdomain.yourdomain.com. Set Site Domain to your yourdomain.com. 2. Enable the facebook plugin by including it in .htconfig.php - e.g. $a->config['system']['addon'] = 'plugin1,plugin2,facebook'; 3. Visit the Facebook Settings section of the "Settings->Plugin Settings" page. diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php index c54d5b5f0..73518afb2 100644 --- a/addon/facebook/facebook.php +++ b/addon/facebook/facebook.php @@ -23,6 +23,9 @@ * $a->config['facebook']['appid'] = 'xxxxxxxxxxx'; * $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx'; * Replace with the settings Facebook gives you. + * d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set + * Site URL to yoursubdomain.yourdomain.com. Set Site Domain to your + * yourdomain.com. * 2. Enable the facebook plugin by including it in .htconfig.php - e.g. * $a->config['system']['addon'] = 'plugin1,plugin2,facebook'; * 3. Visit the Facebook Settings section of the "Settings->Plugin Settings" page. diff --git a/boot.php b/boot.php index 6a622dbc0..af510a808 100644 --- a/boot.php +++ b/boot.php @@ -4,7 +4,7 @@ set_time_limit(0); ini_set('pcre.backtrack_limit', 250000); -define ( 'FRIENDIKA_VERSION', '2.2.1043' ); +define ( 'FRIENDIKA_VERSION', '2.2.1044' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DB_UPDATE_VERSION', 1075 ); diff --git a/doc/Installing-Connectors.md b/doc/Installing-Connectors.md index e43f17fe3..c8fc8e790 100644 --- a/doc/Installing-Connectors.md +++ b/doc/Installing-Connectors.md @@ -129,6 +129,10 @@ $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx'; Replace with the settings Facebook gives you. +d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set Site URL +to yoursubdomain.yourdomain.com. Set Site Domain to your yourdomain.com. + + Visit the Facebook Settings section of the "Settings->Plugin Settings" page. and click 'Install Facebook Connector'. diff --git a/include/zotfns.php b/include/zotfns.php index a95a064cd..1ec39aefc 100644 --- a/include/zotfns.php +++ b/include/zotfns.php @@ -1,7 +1,5 @@ $v) { 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'] .= ''; + $inv = ''; + + if(get_config('system','invitations_only')) { + $x = get_pconfig(local_user(),'system','invites_remaining'); + if($x || is_site_admin()) { + $a->page['aside'] .= '' . $inv; + } + } + elseif($a->config['register_policy'] != REGISTER_CLOSED) + $a->page['aside'] .= $inv; $a->page['aside'] .= '