Merge pull request #8296 from annando/net-publish
Clarify the effect of "net-publish"
This commit is contained in:
commit
e80108404c
11 changed files with 21 additions and 34 deletions
|
@ -1098,18 +1098,20 @@ function settings_content(App $a)
|
|||
$profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />';
|
||||
} else {
|
||||
$profile_in_dir = Renderer::replaceMacros($opt_tpl, [
|
||||
'$field' => ['profile_in_directory', DI::l10n()->t('Publish your default profile in your local site directory?'), $profile['publish'], DI::l10n()->t('Your profile will be published in this node\'s <a href="%s">local directory</a>. Your profile details may be publicly visible depending on the system settings.', DI::baseUrl().'/directory')]
|
||||
'$field' => ['profile_in_directory', DI::l10n()->t('Publish your profile in your local site directory?'), $profile['publish'], DI::l10n()->t('Your profile will be published in this node\'s <a href="%s">local directory</a>. Your profile details may be publicly visible depending on the system settings.', DI::baseUrl().'/directory')]
|
||||
]);
|
||||
}
|
||||
|
||||
if (strlen(DI::config()->get('system', 'directory'))) {
|
||||
$profile_in_net_dir = Renderer::replaceMacros($opt_tpl, [
|
||||
'$field' => ['profile_in_netdirectory', DI::l10n()->t('Publish your default profile in the global social directory?'), $profile['net-publish'], DI::l10n()->t('Your profile will be published in the global friendica directories (e.g. <a href="%s">%s</a>). Your profile will be visible in public.', DI::config()->get('system', 'directory'), DI::config()->get('system', 'directory')) . " " . DI::l10n()->t("This setting also determines whether Friendica will inform search engines that your profile should be indexed or not. Third-party search engines may or may not respect this setting.")]
|
||||
]);
|
||||
$net_pub_desc = ' ' . DI::l10n()->t('Your profile will also be published in the global friendica directories (e.g. <a href="%s">%s</a>).', DI::config()->get('system', 'directory'), DI::config()->get('system', 'directory'));
|
||||
} else {
|
||||
$profile_in_net_dir = '';
|
||||
$net_pub_desc = '';
|
||||
}
|
||||
|
||||
$profile_in_net_dir = Renderer::replaceMacros($opt_tpl, [
|
||||
'$field' => ['profile_in_netdirectory', DI::l10n()->t('Allow your profile to be searchable globally?'), $profile['net-publish'], DI::l10n()->t("Activate this setting if you want others to easily find and follow you. Your profile will be searchable on remote systems. This setting also determines whether Friendica will inform search engines that your profile should be indexed or not.") . $net_pub_desc]
|
||||
]);
|
||||
|
||||
$hide_friends = Renderer::replaceMacros($opt_tpl, [
|
||||
'$field' => ['hide-friends', DI::l10n()->t('Hide your contact/friend list from viewers of your default profile?'), $profile['hide-friends'], DI::l10n()->t('Your contact list won\'t be shown in your default profile page. You can decide to show your contact list separately for each additional profile you create')],
|
||||
]);
|
||||
|
@ -1134,10 +1136,6 @@ function settings_content(App $a)
|
|||
'$field' => ['unkmail', DI::l10n()->t('Permit unknown people to send you private mail?'), $unkmail, DI::l10n()->t('Friendica network users may send you private messages even if they are not in your contact list.')],
|
||||
]);
|
||||
|
||||
if (!$profile['publish'] && !$profile['net-publish']) {
|
||||
info(DI::l10n()->t('Profile is <strong>not published</strong>.') . EOL);
|
||||
}
|
||||
|
||||
$tpl_addr = Renderer::getMarkupTemplate('settings/nick_set.tpl');
|
||||
|
||||
$prof_addr = Renderer::replaceMacros($tpl_addr,[
|
||||
|
|
|
@ -785,7 +785,7 @@ class Contact
|
|||
$fields['avatar'] = DI::baseUrl() . '/photo/profile/' .$uid . '.' . $file_suffix;
|
||||
$fields['forum'] = $user['page-flags'] == User::PAGE_FLAGS_COMMUNITY;
|
||||
$fields['prv'] = $user['page-flags'] == User::PAGE_FLAGS_PRVGROUP;
|
||||
$fields['unsearchable'] = $user['hidewall'] || !$profile['net-publish'];
|
||||
$fields['unsearchable'] = !$profile['net-publish'];
|
||||
|
||||
// it seems as if ported accounts can have wrong values, so we make sure that now everything is fine.
|
||||
$fields['url'] = DI::baseUrl() . '/profile/' . $user['nickname'];
|
||||
|
|
|
@ -1136,7 +1136,7 @@ class GContact
|
|||
'keywords' => $userdata['pub_keywords'],
|
||||
'birthday' => $userdata['dob'], 'photo' => $userdata['photo'],
|
||||
"notify" => $userdata['notify'], 'url' => $userdata['url'],
|
||||
"hide" => ($userdata['hidewall'] || !$userdata['net-publish']),
|
||||
"hide" => !$userdata['net-publish'],
|
||||
'nick' => $userdata['nickname'], 'addr' => $userdata['addr'],
|
||||
"connect" => $userdata['addr'], "server_url" => DI::baseUrl(),
|
||||
"generation" => 1, 'network' => Protocol::DFRN];
|
||||
|
|
|
@ -392,7 +392,7 @@ class Profile
|
|||
$diaspora = [
|
||||
'guid' => $profile['guid'],
|
||||
'podloc' => DI::baseUrl(),
|
||||
'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false'),
|
||||
'searchable' => ($profile['net-publish'] ? 'true' : 'false'),
|
||||
'nickname' => $profile['nickname'],
|
||||
'fullname' => $profile['name'],
|
||||
'firstname' => $firstname,
|
||||
|
|
|
@ -616,8 +616,7 @@ class User
|
|||
$verified = !empty($data['verified']);
|
||||
$language = !empty($data['language']) ? Strings::escapeTags(trim($data['language'])) : 'en';
|
||||
|
||||
$publish = !empty($data['profile_publish_reg']);
|
||||
$netpublish = $publish && DI::config()->get('system', 'directory');
|
||||
$netpublish = $publish = !empty($data['profile_publish_reg']);
|
||||
|
||||
if ($password1 != $confirm) {
|
||||
throw new Exception(DI::l10n()->t('Passwords do not match. Password unchanged.'));
|
||||
|
|
|
@ -75,7 +75,7 @@ class HoverCard extends BaseModule
|
|||
|
||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $baseUrl->getHostname() . ($baseUrl->getUrlPath() ? '/' . $baseUrl->getUrlPath() : ''));
|
||||
|
||||
$page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n";
|
||||
$page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . ($a->profile['net-publish'] ? 'true' : 'false') . '" />' . "\r\n";
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $baseUrl->get() . '/dfrn_poll/' . $nickname . '" />' . "\r\n";
|
||||
$page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . $baseUrl->get() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
||||
header('Link: <' . $baseUrl->get() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||
|
|
|
@ -69,7 +69,7 @@ class NoScrape extends BaseModule
|
|||
$json_info["dfrn-{$dfrn}"] = DI::baseUrl() . "/dfrn_{$dfrn}/{$which}";
|
||||
}
|
||||
|
||||
if (!$a->profile['net-publish'] || $a->profile['hidewall']) {
|
||||
if (!$a->profile['net-publish']) {
|
||||
$json_info['hide'] = true;
|
||||
System::jsonExit($json_info);
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ class Profile extends BaseProfile
|
|||
|
||||
$htmlhead .= '<meta name="dfrn-global-visibility" content="' . ($profile['net-publish'] ? 'true' : 'false') . '" />' . "\n";
|
||||
|
||||
if (!$profile['net-publish'] || $profile['hidewall']) {
|
||||
if (!$profile['net-publish']) {
|
||||
$htmlhead .= '<meta content="noindex, noarchive" name="robots" />' . "\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class Status extends BaseProfile
|
|||
|
||||
ProfileModel::load($a, $parameters['nickname']);
|
||||
|
||||
if (!$a->profile['net-publish'] || $a->profile['hidewall']) {
|
||||
if (!$a->profile['net-publish']) {
|
||||
DI::page()['htmlhead'] .= '<meta content="noindex, noarchive" name="robots" />' . "\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -639,27 +639,17 @@ class DFRN
|
|||
*/
|
||||
private static function addAuthor(DOMDocument $doc, array $owner, $authorelement, $public)
|
||||
{
|
||||
// Is the profile hidden or shouldn't be published in the net? Then add the "hide" element
|
||||
$r = q(
|
||||
"SELECT `id` FROM `profile` INNER JOIN `user` ON `user`.`uid` = `profile`.`uid`
|
||||
WHERE (`hidewall` OR NOT `net-publish`) AND `user`.`uid` = %d",
|
||||
intval($owner['uid'])
|
||||
);
|
||||
if (DBA::isResult($r)) {
|
||||
$hidewall = true;
|
||||
} else {
|
||||
$hidewall = false;
|
||||
}
|
||||
// Should the profile be "unsearchable" in the net? Then add the "hide" element
|
||||
$hide = DBA::exists('profile', ['uid' => $owner['uid'], 'net-publish' => false]);
|
||||
|
||||
$author = $doc->createElement($authorelement);
|
||||
|
||||
$namdate = DateTimeFormat::utc($owner['name-date'].'+00:00', DateTimeFormat::ATOM);
|
||||
$uridate = DateTimeFormat::utc($owner['uri-date'].'+00:00', DateTimeFormat::ATOM);
|
||||
$picdate = DateTimeFormat::utc($owner['avatar-date'].'+00:00', DateTimeFormat::ATOM);
|
||||
|
||||
$attributes = [];
|
||||
|
||||
if (!$public || !$hidewall) {
|
||||
if (!$public || !$hide) {
|
||||
$attributes = ["dfrn:updated" => $namdate];
|
||||
}
|
||||
|
||||
|
@ -670,7 +660,7 @@ class DFRN
|
|||
$attributes = ["rel" => "photo", "type" => "image/jpeg",
|
||||
"media:width" => 300, "media:height" => 300, "href" => $owner['photo']];
|
||||
|
||||
if (!$public || !$hidewall) {
|
||||
if (!$public || !$hide) {
|
||||
$attributes["dfrn:updated"] = $picdate;
|
||||
}
|
||||
|
||||
|
@ -679,7 +669,7 @@ class DFRN
|
|||
$attributes["rel"] = "avatar";
|
||||
XML::addElement($doc, $author, "link", "", $attributes);
|
||||
|
||||
if ($hidewall) {
|
||||
if ($hide) {
|
||||
XML::addElement($doc, $author, "dfrn:hide", "true");
|
||||
}
|
||||
|
||||
|
|
|
@ -4118,7 +4118,7 @@ class Diaspora
|
|||
$large = DI::baseUrl().'/photo/custom/300/'.$profile['uid'].'.jpg';
|
||||
$medium = DI::baseUrl().'/photo/custom/100/'.$profile['uid'].'.jpg';
|
||||
$small = DI::baseUrl().'/photo/custom/50/' .$profile['uid'].'.jpg';
|
||||
$searchable = (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false');
|
||||
$searchable = ($profile['net-publish'] ? 'true' : 'false');
|
||||
|
||||
$dob = null;
|
||||
$about = null;
|
||||
|
|
Loading…
Reference in a new issue