diaspora admin toggle, update install guide

This commit is contained in:
Friendika 2011-08-22 18:52:02 -07:00
parent 564ade0685
commit eb2ef6dec4
7 changed files with 36 additions and 18 deletions

View file

@ -15,20 +15,32 @@ hosting provider prior to installation.
Before you begin: Choose a domain name or subdomain name for your server. Before you begin: Choose a domain name or subdomain name for your server.
Put some thought into this - because changing it is currently not-supported. Put some thought into this - because changing it is currently not-supported.
Things will break, and some of your friends may have difficulty communicating Things will break, and some of your friends may have difficulty communicating
with you. We plan to address this limitation in a future release. with you. We plan to address this limitation in a future release. Also decide
if you wish to connect with members of the Diaspora network, as this will
impact the installation requirements.
Decide if you will use SSL and obtain an SSL cert. Communications with the
Diaspora network MAY require both SSL AND an SSL cert signed by a CA which is
recognised by the major browsers. Friendika will work with self-signed certs
but Diaspora communication may not. For best results, install your cert PRIOR
to installing Friendika and when visiting your site for the initial
installation in step 5, please use the https: link. (Use the http: or non-SSL
link if your cert is self-signed).
1. Requirements 1. Requirements
- Apache with mod-rewrite enabled and "Options All" so you can use a - Apache with mod-rewrite enabled and "Options All" so you can use a
local .htaccess file local .htaccess file
- PHP 5.2+. The later the better. You'll need 5.3 for encryption of key - PHP 5.2+. The later the better. PHP 5.3 is required for communications
exchange conversations with the Diaspora network and improved security.
- PHP *command line* access with register_argc_argv set to true in the - PHP *command line* access with register_argc_argv set to true in the
php.ini file php.ini file [or see 'poormancron' in section 8]
- curl, gd, mysql, mbstring, and openssl extensions
- curl, gd, mysql, mbstring, mcrypt, and openssl extensions
- some form of email server or email gateway such that PHP mail() works - some form of email server or email gateway such that PHP mail() works
- mcrypt (optional; used for end-to-end message encryption)
- Mysql 5.x - Mysql 5.x
@ -36,12 +48,8 @@ php.ini file
(Windows) [Note: other options are presented in Section 8 of this document] (Windows) [Note: other options are presented in Section 8 of this document]
- Installation into a top-level domain or sub-domain (without a - Installation into a top-level domain or sub-domain (without a
directory/path component in the URL) is preferred. Directory paths will directory/path component in the URL) is preferred. This is REQUIRED if
not be as convenient to use and have not been thoroughly tested. you wish to communicate with the Diaspora network.
[Dreamhost.com offers all of the necessary hosting features at a
reasonable price. If your hosting provider doesn't allow Unix shell access,
you might have trouble getting everything to work.]
2. Unpack the Friendika files into the root of your web server document area. 2. Unpack the Friendika files into the root of your web server document area.
@ -58,7 +66,9 @@ write or create files in your web directory, create an empty file called
.htconfig.php and make it writable by the web server. .htconfig.php and make it writable by the web server.
5. Visit your website with a web browser and follow the instructions. Please 5. Visit your website with a web browser and follow the instructions. Please
note any error messages and correct these before continuing. note any error messages and correct these before continuing. If you are using
SSL with a known signature authority (recommended), use the https: link to your
website. If you are using a self-signed cert or no cert, use the http: link.
6. *If* the automated installation fails for any reason, check the following: 6. *If* the automated installation fails for any reason, check the following:
@ -99,7 +109,9 @@ have troubles with this section please contact your hosting provider for
assistance. Friendika will not work correctly if you cannot perform this step. assistance. Friendika will not work correctly if you cannot perform this step.
Alternative: You may be able to use the 'poormancron' plugin to perform this Alternative: You may be able to use the 'poormancron' plugin to perform this
step if you are using a recent Friendika release. To do this, edit the file step if you are using a recent Friendika release. 'poormancron' may result in
perfomance and memory issues and is only suitable for small sites with one or
two users and a handful of contacts. To do this, edit the file
".htconfig.php" and look for a line describing your plugins. On a fresh ".htconfig.php" and look for a line describing your plugins. On a fresh
installation, it will look like installation, it will look like

View file

@ -151,6 +151,8 @@ function fb_get_friends($uid) {
logger('facebook: fb_get_friends: ' . $s, LOGGER_DATA); logger('facebook: fb_get_friends: ' . $s, LOGGER_DATA);
$j = json_decode($s); $j = json_decode($s);
logger('facebook: fb_get_friends: json: ' . print_r($j,true), LOGGER_DATA); logger('facebook: fb_get_friends: json: ' . print_r($j,true), LOGGER_DATA);
if(! $j->data)
return;
foreach($j->data as $person) { foreach($j->data as $person) {
$s = fetch_url('https://graph.facebook.com/' . $person->id . '?access_token=' . $access_token); $s = fetch_url('https://graph.facebook.com/' . $person->id . '?access_token=' . $access_token);
if($s) { if($s) {

View file

@ -7,7 +7,7 @@ require_once('include/text.php');
require_once("include/pgettext.php"); require_once("include/pgettext.php");
define ( 'FRIENDIKA_VERSION', '2.2.1079' ); define ( 'FRIENDIKA_VERSION', '2.2.1080' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1081 ); define ( 'DB_UPDATE_VERSION', 1081 );

View file

@ -170,7 +170,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
$sql_extra .= " AND `network` IN ( 'dfrn' ) "; $sql_extra .= " AND `network` IN ( 'dfrn' ) ";
} }
elseif($privatenet) { elseif($privatenet) {
$sql_extra .= " AND `network` IN ( 'dfrn', 'mail', 'face' ) "; $sql_extra .= " AND `network` IN ( 'dfrn', 'mail', 'face', 'dspr' ) ";
} }

View file

@ -508,7 +508,7 @@ function fetch_xrd_links($url) {
$xrd_timeout = intval(get_config('system','xrd_timeout')); $xrd_timeout = intval(get_config('system','xrd_timeout'));
$redirects = 0; $redirects = 0;
$xml = fetch_url($url,false,$redirects,(($xrd_timeout) ? $xrd_timeout : 30)); $xml = fetch_url($url,false,$redirects,(($xrd_timeout) ? $xrd_timeout : 20));
logger('fetch_xrd_links: ' . $xml, LOGGER_DATA); logger('fetch_xrd_links: ' . $xml, LOGGER_DATA);

View file

@ -197,6 +197,7 @@ function admin_page_site_post(&$a){
$timeout = ((x($_POST,'timeout')) ? intval(trim($_POST['timeout'])) : 60); $timeout = ((x($_POST,'timeout')) ? intval(trim($_POST['timeout'])) : 60);
$dfrn_only = ((x($_POST,'dfrn_only')) ? True : False); $dfrn_only = ((x($_POST,'dfrn_only')) ? True : False);
$ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False); $ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False);
$diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False);
set_config('config','sitename',$sitename); set_config('config','sitename',$sitename);
@ -241,6 +242,7 @@ function admin_page_site_post(&$a){
set_config('system','curl_timeout', $timeout); set_config('system','curl_timeout', $timeout);
set_config('system','dfrn_only', $dfrn_only); set_config('system','dfrn_only', $dfrn_only);
set_config('system','ostatus_disabled', $ostatus_disabled); set_config('system','ostatus_disabled', $ostatus_disabled);
set_config('system','diaspora_enabled', $diaspora_enabled);
info( t('Site settings updated.') . EOL); info( t('Site settings updated.') . EOL);
goaway($a->get_baseurl() . '/admin/site' ); goaway($a->get_baseurl() . '/admin/site' );
@ -325,6 +327,7 @@ function admin_page_site(&$a) {
'$no_utf' => array('no_utf', t("UTF-8 Regular expressions"), !get_config('system','no_utf'), "Use PHP UTF8 regular expressions"), '$no_utf' => array('no_utf', t("UTF-8 Regular expressions"), !get_config('system','no_utf'), "Use PHP UTF8 regular expressions"),
'$no_community_page' => array('no_community_page', t("Show Community Page"), !get_config('system','no_community_page'), "Display a Community page showing all recent public postings on this site."), '$no_community_page' => array('no_community_page', t("Show Community Page"), !get_config('system','no_community_page'), "Display a Community page showing all recent public postings on this site."),
'$ostatus_disabled' => array('ostatus_disabled', t("Enable OStatus support"), !get_config('system','ostatus_disable'), "Provide built-in OStatus \x28identi.ca, status.net, etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."), '$ostatus_disabled' => array('ostatus_disabled', t("Enable OStatus support"), !get_config('system','ostatus_disable'), "Provide built-in OStatus \x28identi.ca, status.net, etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."),
'$diaspora_enabled' => array('diaspora_enabled', t("Enable Diaspora support"), get_config('system','diaspora_enabled'), "Provide built-in Diaspora network compatibility."),
'$dfrn_only' => array('dfrn_only', t('Only allow Friendika contacts'), get_config('system','dfrn_only'), "All contacts must use Friendika protocols. All other built-in communication protocols disabled."), '$dfrn_only' => array('dfrn_only', t('Only allow Friendika contacts'), get_config('system','dfrn_only'), "All contacts must use Friendika protocols. All other built-in communication protocols disabled."),
'$verifyssl' => array('verifyssl', t("Verify SSL"), get_config('system','verifyssl'), "If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites."), '$verifyssl' => array('verifyssl', t("Verify SSL"), get_config('system','verifyssl'), "If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites."),
'$proxyuser' => array('proxyuser', t("Proxy user"), get_config('system','proxyuser'), ""), '$proxyuser' => array('proxyuser', t("Proxy user"), get_config('system','proxyuser'), ""),

View file

@ -31,6 +31,7 @@
{{ inc field_checkbox.tpl with $field=$force_publish }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$force_publish }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_community_page }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$no_community_page }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$ostatus_disabled }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$ostatus_disabled }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$diaspora_enabled }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$dfrn_only }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$dfrn_only }}{{ endinc }}
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }} {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}