The undocumented part is that if this is not set, the global directory is completely unavailable to the application.
This allows a private community to be completely isolated from the global mistpark network.
- $a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit';
+ $a->config['system']['directory'] = 'http://dir.friendi.ca';
Developer Settings
---
Konfiguriere:
```
-$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit';
+$a->config['system']['directory'] = 'http://dir.friendi.ca';
```
<?php
-// If automatic system installation fails:
+// If automatic system installation fails:
// Copy or rename this file to .htconfig.php
// Why .htconfig.php? Because it contains sensitive information which could
-// give somebody complete control of your database. Apache's default
-// configuration denies access to and refuses to serve any file beginning
+// give somebody complete control of your database. Apache's default
+// configuration denies access to and refuses to serve any file beginning
// with .ht
// Then set the following for your MySQL installation
$a->config['sitename'] = "Friendica Social Network";
// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
-// Be certain to create your own personal account before setting
-// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
+// Be certain to create your own personal account before setting
+// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
// the registration page. REGISTER_APPROVE requires you set 'admin_email'
// to the email address of an already registered person who can authorise
-// and/or approve/deny the request.
+// and/or approve/deny the request.
// In order to perform system administration via the admin panel, admin_email
// must precisely match the email address of the person logged in.
$a->config['php_path'] = 'php';
-// You shouldn't need to change anything else.
-// Location of global directory submission page.
-
-$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit';
-$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search=';
-
// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts
$a->config['system']['huburl'] = '[internal]';
$a->config['system']['no_regfullname'] = true;
-// If set to true the priority settings of ostatus contacts are used
-$a->config['system']['ostatus_use_priority'] = false;
-
-// If enabled, all items are cached in the given directory
-$a->config['system']['itemcache'] = "";
-
-// If enabled, the lockpath is used for a lockfile to check if the poller is running
-$a->config['system']['lockpath'] = "";
-
//Deny public access to the local directory
//$a->config['system']['block_local_dir'] = false;
-// Global directory
+// Location of the global directory
$a->config['system']['directory'] = 'http://dir.friendi.ca';
if(is_null($a)) {
$a = new App;
}
-
+
if(is_null($db)) {
@include(".htconfig.php");
require_once("include/dba.php");
$a->set_baseurl(get_config('system','url'));
- $dir = get_config('system','directory_submit_url');
+ $dir = get_config('system','directory');
if(! strlen($dir))
return;
+ $dir .= "/submit";
+
$arr = array('url' => $argv[1]);
call_hooks('globaldir_update', $arr);
$gdirpath = 'directory';
if(strlen(get_config('system','singleuser'))) {
- $gdir = dirname(get_config('system','directory_submit_url'));
+ $gdir = get_config('system','directory');
if(strlen($gdir))
$gdirpath = $gdir;
}
return;
// $url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
-// if($url && strlen(get_config('system','directory_submit_url')))
+// if($url && strlen(get_config('system','directory')))
// proc_run('php',"include/directory.php","$url");
$recips = q("SELECT `id`,`name`,`network`,`pubkey`,`notify` FROM `contact` WHERE `network` = '%s'
$done[] = $a->get_baseurl() . '/poco';
- if(strlen(get_config('system','directory_submit_url'))) {
+ if(strlen(get_config('system','directory'))) {
$x = fetch_url(get_server()."/pubsites");
if($x) {
$j = json_decode($x);
$verified = ((x($arr,'verified')) ? intval($arr['verified']) : 0);
$publish = ((x($arr,'profile_publish_reg') && intval($arr['profile_publish_reg'])) ? 1 : 0);
- $netpublish = ((strlen(get_config('system','directory_submit_url'))) ? $publish : 0);
+ $netpublish = ((strlen(get_config('system','directory'))) ? $publish : 0);
if ($password1 != $confirm) {
$result['message'] .= t('Passwords do not match. Password unchanged.') . EOL;
$allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : '');
$block_public = ((x($_POST,'block_public')) ? True : False);
$force_publish = ((x($_POST,'publish_all')) ? True : False);
- $global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
+ $global_directory = ((x($_POST,'directory')) ? notags(trim($_POST['directory'])) : '');
$thread_allow = ((x($_POST,'thread_allow')) ? True : False);
$newuser_private = ((x($_POST,'newuser_private')) ? True : False);
$enotify_no_content = ((x($_POST,'enotify_no_content')) ? True : False);
set_config('system','allowed_email', $allowed_email);
set_config('system','block_public', $block_public);
set_config('system','publish_all', $force_publish);
- if ($global_directory==""){
- // don't know why, but del_config doesn't work...
- q("DELETE FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1",
- dbesc("system"),
- dbesc("directory_submit_url")
- );
- } else {
- set_config('system','directory_submit_url', $global_directory);
- }
+ set_config('system','directory', $global_directory);
set_config('system','thread_allow', $thread_allow);
set_config('system','newuser_private', $newuser_private);
set_config('system','enotify_no_content', $enotify_no_content);
/* Installed langs */
$lang_choices = array();
- $langs = glob('view/*/strings.php');
+ $langs = glob('view/*/strings.php'); /**/
if(is_array($langs) && count($langs)) {
if(! in_array('view/en/strings.php',$langs))
}
}
+ if (strlen(get_config('system','directory_submit_url')) AND
+ !strlen(get_config('system','directory'))) {
+ set_config('system','directory', dirname(get_config('system','directory_submit_url')));
+ del_config('system','directory_submit_url');
+ }
+
/* Installed themes */
$theme_choices = array();
$theme_choices_mobile = array();
'$allowed_email' => array('allowed_email', t("Allowed email domains"), get_config('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")),
'$block_public' => array('block_public', t("Block public"), get_config('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")),
'$force_publish' => array('publish_all', t("Force publish"), get_config('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")),
- '$global_directory' => array('directory_submit_url', t("Global directory update URL"), get_config('system','directory_submit_url'), t("URL to update the global directory. If this is not set, the global directory is completely unavailable to the application.")),
+ '$global_directory' => array('directory', t("Global directory URL"), get_config('system','directory'), t("URL to the global directory. If this is not set, the global directory is completely unavailable to the application.")),
'$thread_allow' => array('thread_allow', t("Allow threaded items"), get_config('system','thread_allow'), t("Allow infinite level threading for items on this site.")),
'$newuser_private' => array('newuser_private', t("Private posts by default for new users"), get_config('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")),
'$enotify_no_content' => array('enotify_no_content', t("Don't include post content in email notifications"), get_config('system','enotify_no_content'), t("Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")),
$tpl = get_markup_template('directory_header.tpl');
$globaldir = '';
- $gdirpath = dirname(get_config('system','directory_submit_url'));
+ $gdirpath = get_config('system','directory');
if(strlen($gdirpath)) {
$globaldir = '<ul><li><div id="global-directory-link"><a href="'
. zrl($gdirpath,true) . '">' . t('Global Directory') . '</a></div></li></ul>';
$p = (($a->pager['page'] != 1) ? '&p=' . $a->pager['page'] : '');
- if(strlen(get_config('system','directory_submit_url')))
+ if(strlen(get_config('system','directory')))
$x = fetch_url(get_server().'/lsearch?f=' . $p . '&search=' . urlencode($search));
$j = json_decode($x);
$conntxt = t('Connect');
}
+ $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
+
$o .= replace_macros($tpl,array(
'$url' => zrl($jj->url),
'$name' => $jj->name,
notice( t('You have no more invitations available') . EOL);
return '';
}
- }
+ }
- $dirloc = get_config('system','directory_submit_url');
+ $dirloc = get_config('system','directory');
if(strlen($dirloc)) {
if($a->config['register_policy'] == REGISTER_CLOSED)
- $linktxt = sprintf( t('Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.'), dirname($dirloc) . '/siteinfo');
+ $linktxt = sprintf( t('Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.'), $dirloc . '/siteinfo');
elseif($a->config['register_policy'] != REGISTER_CLOSED)
$linktxt = sprintf( t('To accept this invitation, please visit and register at %s or any other public Friendica website.'), $a->get_baseurl())
- . "\r\n" . "\r\n" . sprintf( t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks. See %s for a list of alternate Friendica sites you can join.'),dirname($dirloc) . '/siteinfo');
+ . "\r\n" . "\r\n" . sprintf( t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks. See %s for a list of alternate Friendica sites you can join.'),$dirloc . '/siteinfo');
}
else {
$o = t('Our apologies. This system is not currently configured to connect with other public sites or invite members.');
));
return $o;
-}
\ No newline at end of file
+}
<?php
include_once('include/text.php');
+require_once('include/socgraph.php');
+require_once('include/contact_widgets.php');
function match_content(&$a) {
if(! local_user())
return;
+ $a->page['aside'] .= follow_widget();
+ $a->page['aside'] .= findpeople_widget();
+
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
$o .= replace_macros(get_markup_template("section_title.tpl"),array(
intval(local_user())
);
if(! count($r))
- return;
+ return;
if(! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) {
notice( t('No keywords to match. Please add keywords to your default profile.') . EOL);
return;
if($a->pager['page'] != 1)
$params['p'] = $a->pager['page'];
- if(strlen(get_config('system','directory_submit_url')))
+ if(strlen(get_config('system','directory')))
$x = post_url(get_server().'/msearch', $params);
else
$x = post_url($a->get_baseurl() . '/msearch', $params);
if(count($j->results)) {
-
+
$tpl = get_markup_template('match.tpl');
foreach($j->results as $jj) {
- $match_nurl = normalise_link($jj->url);
- $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1",
- intval(local_user()),
- dbesc($match_nurl));
- if (!count($match)) {
-
- $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
- $o .= replace_macros($tpl,array(
- '$url' => zrl($jj->url),
- '$name' => $jj->name,
- '$photo' => proxy_url($jj->photo),
- '$inttxt' => ' ' . t('is interested in:'),
- '$conntxt' => t('Connect'),
- '$connlnk' => $connlnk,
- '$tags' => $jj->tags
- ));
- }
+ $match_nurl = normalise_link($jj->url);
+ $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1",
+ intval(local_user()),
+ dbesc($match_nurl));
+ if (!count($match)) {
+ $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
+ $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
+ $o .= replace_macros($tpl,array(
+ '$url' => zrl($jj->url),
+ '$name' => $jj->name,
+ '$photo' => proxy_url($jj->photo),
+ '$inttxt' => ' ' . t('is interested in:'),
+ '$conntxt' => t('Connect'),
+ '$connlnk' => $connlnk,
+ '$tags' => $jj->tags
+ ));
+ }
}
- }
- else {
+ } else {
info( t('No matches') . EOL);
- }
+ }
}
info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
// Update global directory in background
$url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
- if($url && strlen(get_config('system','directory_submit_url')))
+ if($url && strlen(get_config('system','directory')))
proc_run('php',"include/directory.php","$url");
require_once('include/profile_update.php');
// Update global directory in background
$url = $_SESSION['my_url'];
- if($url && strlen(get_config('system','directory_submit_url')))
+ if($url && strlen(get_config('system','directory')))
proc_run('php',"include/directory.php","$url");
goaway($a->get_baseurl() . '/profiles');
// Update global directory in background
$url = $_SESSION['my_url'];
- if($url && strlen(get_config('system','directory_submit_url')))
+ if($url && strlen(get_config('system','directory')))
proc_run('php',"include/directory.php","$url");
require_once('include/profile_update.php');
);
if(count($r) && $r[0]['net-publish']) {
$url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
- if($url && strlen(get_config('system','directory_submit_url')))
+ if($url && strlen(get_config('system','directory')))
proc_run('php',"include/directory.php","$url");
}
if(($old_visibility != $net_publish) || ($page_flags != $old_page_flags)) {
// Update global directory in background
$url = $_SESSION['my_url'];
- if($url && strlen(get_config('system','directory_submit_url')))
+ if($url && strlen(get_config('system','directory')))
proc_run('php',"include/directory.php","$url");
}
));
}
- if(strlen(get_config('system','directory_submit_url'))) {
+ if(strlen(get_config('system','directory'))) {
$profile_in_net_dir = replace_macros($opt_tpl,array(
'$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile['net-publish'], '', array(t('No'),t('Yes'))),
));
// If you are using a subdirectory of your domain you will need to put the
// relative path (from the root of your domain) here.
// For instance if your URL is 'http://example.com/directory/subdirectory',
-// set path to 'directory/subdirectory'.
+// set path to 'directory/subdirectory'.
$a->path = '';
-
+
// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles".
// It can be changed later and only applies to timestamps for anonymous viewers.
$a->config['sitename'] = "My Friend Network";
// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
-// Be certain to create your own personal account before setting
-// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
+// Be certain to create your own personal account before setting
+// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
// the registration page. REGISTER_APPROVE requires you set 'admin_email'
// to the email address of an already registered person who can authorise
// and/or approve/deny the request.
$a->config['php_path'] = '/usr/bin/php';
-// Location of global directory submission page.
-
-$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit';
-$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search=';
-
// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts
$a->config['system']['huburl'] = '[internal]';
-// Server-to-server private message encryption (RINO) is allowed by default.
+// Server-to-server private message encryption (RINO) is allowed by default.
// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
+// PHP mcrypt extension is installed on both systems
$a->config['system']['rino_encrypt'] = true;
// By default allow pseudonyms
$a->config['system']['no_regfullname'] = true;
+
+//Deny public access to the local directory
+//$a->config['system']['block_local_dir'] = false;
+
+// Location of the global directory
+$a->config['system']['directory'] = 'http://dir.friendi.ca';
// If you are using a subdirectory of your domain you will need to put the
// relative path (from the root of your domain) here.
// For instance if your URL is 'http://example.com/directory/subdirectory',
-// set path to 'directory/subdirectory'.
+// set path to 'directory/subdirectory'.
$a->path = '{{$urlpath}}';
$a->config['sitename'] = "My Friend Network";
// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
-// Be certain to create your own personal account before setting
-// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
+// Be certain to create your own personal account before setting
+// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
// the registration page. REGISTER_APPROVE requires you set 'admin_email'
// to the email address of an already registered person who can authorise
// and/or approve/deny the request.
$a->config['php_path'] = '{{$phpath}}';
-// Location of global directory submission page.
-
-$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit';
-$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search=';
-
// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts
$a->config['system']['huburl'] = '[internal]';
-// Server-to-server private message encryption (RINO) is allowed by default.
+// Server-to-server private message encryption (RINO) is allowed by default.
// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
+// PHP mcrypt extension is installed on both systems
$a->config['system']['rino_encrypt'] = true;
// By default allow pseudonyms
$a->config['system']['no_regfullname'] = true;
+
+//Deny public access to the local directory
+//$a->config['system']['block_local_dir'] = false;
+
+// Location of the global directory
+$a->config['system']['directory'] = 'http://dir.friendi.ca';