mirror of
https://github.com/friendica/friendica
synced 2024-10-07 16:11:56 +02:00
Remove multi profiles feature
- Remove mod/profperm - Remove additional feature - Remove profile visibility on contact page - Remove profile list templates
This commit is contained in:
parent
d1be68b754
commit
f6f4cbab9d
|
@ -655,7 +655,6 @@ Returns the [Profile](help/API-Entities#Profile) data of all profiles or a singl
|
|||
|
||||
On success: Array of:
|
||||
|
||||
* `multi_profiles`: true if user has activated multi_profiles
|
||||
* `global_dir`: URL of the global directory set in server settings
|
||||
* `friendica_owner`: user data of the authenticated user
|
||||
* `profiles`: array of the profile data
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
Profiles
|
||||
========
|
||||
|
||||
* [Home](help)
|
||||
|
||||
Friendica has unlimited profiles.
|
||||
You may use different profiles to present different aspects of yourself to different audiences.
|
||||
|
||||
Default / public profile
|
||||
---
|
||||
You always have a profile known as your "default" or "public" profile.
|
||||
This profile is always available to the general public and usually cannot be hidden.
|
||||
You may, and probably should restrict the personal information you make available on your public profile.
|
||||
|
||||
That said, if you want other friends to be able to find you, it helps to have the following information in your public profile:
|
||||
|
||||
* Your real name
|
||||
* A photo of **you**
|
||||
* Your location, preferably at least the country.
|
||||
|
||||
In addition, if you'd like to meet people that share some general interests with you, add some "Public Keywords" to your profile.
|
||||
Such as "music, linux, photography" or whatever.
|
||||
You can add as many keywords as you like.
|
||||
|
||||
Your default or public profile is also shown to contacts on other networks, since they do not have the ability to view your private profiles.
|
||||
Only members of the Friendica network can see alternate/ private profiles.
|
||||
|
||||
Alternate/ private profiles
|
||||
---
|
||||
To create an alternate profile, select "Profiles" from the menu of your Friendica site.
|
||||
You may edit an existing profile, change the profile photo, or create a new profile.
|
||||
You may also "clone" your existing profile if you only wish to change a few items but don't wish to enter all the information again.
|
||||
|
||||
To assign a profile to specific persons, select the person from your "Contacts" page and click the pencil "Edit" icon.
|
||||
You will find a dropdown box listing the various profiles available.
|
||||
If this box is not selectable, the person is not in a supported network and cannot be assigned a specific profile.
|
||||
|
||||
Once a profile has been selected, when the person views your profile from one of the "magic profile links" on their site, they will see the private profile you have assigned.
|
||||
If they are not logged into their site or view your profile from elsewhere, they will see your public profile.
|
||||
|
||||
A magic profile link is indicated by a special cursor when hovering over a contact's name or photo.
|
||||
Currently this cursor is a hand next to a small padlock.
|
||||
These magic cursors indicate that by following the link, you are able to access special areas of the other person's pages which are only available to friends and may not be available to the general public.
|
||||
|
||||
You may also discover that (assuming you have the proper permissions) you may be able to post directly on the other person's profile (often called a "wall-to-wall" post).
|
||||
You may also be able to comment directly on posts from while visiting the other person's profile page.
|
||||
|
||||
There are two settings which allow you to publish your profile to a directory and ensure that it can be found by others.
|
||||
You can change these through settings on the "Settings" page.
|
||||
One setting allows you to publish your profile in the site directory of this Friendica server.
|
||||
Another option (this may have been disabled by the site admin) allows you to publish your profile in a [Global Directory](Making-Friends.md#the-directories).
|
||||
|
||||
If you do not wish to be visible to any of these directories, do not published your profile.
|
||||
|
||||
Although you may have multiple profiles, you only have one profile photo.
|
||||
This is intentional; it avoids confusion by potentially seeing different profile pictures of a contact depending on what website you visit or conversation you participate in.
|
||||
You can always can use the free text information boxes within a profile such as "Tell us about yourself" and link other photos for yourself.
|
||||
|
||||
Keywords and Directory Search
|
||||
---
|
||||
On the site Directory page, you may search for people with published profiles who are on this site.
|
||||
The search is typically for your nickname or part of your full name.
|
||||
However this search will also match against other profile fields - such as gender, location, "about", work, and education.
|
||||
You may also include "Keywords" in your default profile - which may be used to search for common interests with other members.
|
||||
You have two sets of keywords available - public and private.
|
||||
Private keywords are *not* visible on your profile, but will bring up your profile when matched in a search of the site directory.
|
||||
Public keywords are used in the friend suggestion tool and although they aren't readily visible, they may be seen by viewing the HTML of your profile page.
|
||||
|
||||
Directory searches are also able to use "boolean" logic so that you can search for "+lesbian +Florida" and find those who's sexual preference (or keywords) contain the world "lesbian" and that live in Florida.
|
||||
See the section on "Topical Tags" on the [Tags-and-Mentions](help/Tags-and-Mentions) page for more information on performing boolean searches.
|
||||
|
||||
On your Contacts page is a link to "Find People with Shared Interests" (unless your site administrator has disabled the global directory).
|
||||
This will combine both your public and private keywords, and find people in the global directory who have matching and/or similar keywords.
|
||||
Private keywords are not identified or stored on the global directory.
|
||||
The more keywords you provide, the more relevant the search results that are returned.
|
||||
These are sorted by relevance.
|
||||
You may discover that you are the first person on the list - because you are very likely the most relevant match for your keywords in the directory.
|
|
@ -109,8 +109,6 @@ Ein ['Tipp für neue Mitglieder'](newmember)-Link zeigt sich in den ersten beide
|
|||
|
||||
## Schau Dir ebenfalls folgende Seiten an
|
||||
|
||||
* [Profile](help/Profiles)
|
||||
|
||||
* [Gruppen und Privatssphäre](help/Groups-and-Privacy)
|
||||
|
||||
* [Account löschen](help/Remove-Account)
|
||||
|
|
|
@ -9,7 +9,6 @@ Friendica - Dokumentation und Ressourcen
|
|||
* [Beiträge erstellen](help/Text_editor)
|
||||
* [Referenz der BBCode Elemente](help/BBCode)
|
||||
* [Beiträge kommentieren, einordnen und löschen](help/Text_comment)
|
||||
* [Profile](help/Profiles)
|
||||
* [Referenz der Accesskeys](help/Accesskeys)
|
||||
* [Veranstaltungen](help/events)
|
||||
* Du und andere Nutzer
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
Profile
|
||||
========
|
||||
|
||||
* [Zur Startseite der Hilfe](help)
|
||||
|
||||
Mit Friendica kann eine unbegrenzte Anzahl an Profilen angelegt werden.
|
||||
Du kannst verschiedene Profile nutzen, um verschiedenen Gruppen verschiedene Seiten von dir zu zeigen.
|
||||
|
||||
Du hast immer ein Profil, das als dein "Standard"- (default) oder "öffentliches" (public) Profil angelegt ist.
|
||||
Dieses Profil ist immer für die Öffentlichkeit zugänglich und kann nicht versteckt werden (hier mag es einige wenige Ausnahmen auf privaten oder getrennten Seiten geben).
|
||||
Du kannst und solltest die Informationen, die du in deinem öffentlichen Profil veröffentlichst, begrenzen.
|
||||
|
||||
Das bedeutet, dass du folgende Informationen in dein öffentlichen Profil eintragen solltest, wenn du willst, dass Freunde dich finden können ...
|
||||
|
||||
* Dein richtiger Name
|
||||
* Ein Foto von **dir**
|
||||
* Dein geographischer Standort; zumindest das Land, in dem du lebst.
|
||||
|
||||
Ohne diese Basisinformationen kannst du hier sehr einsam sein.
|
||||
Die meisten Leute, auch deine besten Freunde, werden nicht versuchen, einen Account mit Spitznamen und ohne Foto zu verbinden.
|
||||
|
||||
Wenn du außerdem Leute mit gleichen Interessen treffen willst, dann nimm dir etwas Zeit und trage einige Stichworte ein.
|
||||
Zum Beispiel etwas wie "Musik, Linux, Photographie" oder andere Dinge.
|
||||
Du kannst so viele Stichworte eintragen, wie du willst.
|
||||
|
||||
Dein "Standard-" oder "öffentliches" Profil wird außerdem Kontakten in anderen Netzwerken gezeigt, auch wenn sie nicht die Möglichkeit haben, die privaten Profile einzusehen.
|
||||
Nur Mitglieder des Friendica-Netzwerks können alternative oder private Profile sehen.
|
||||
|
||||
Um ein alternatives Profil zu erstellen, gehe auf "Profil verwalten/editieren".
|
||||
Du kannst entweder ein bestehendes Profil bearbeiten, das Foto ändern, oder ein neues Profil erstellen.
|
||||
Du kannst ebenfalls einen Klon eines bestehenden Profils erstellen, falls du nur einige wenige Einstellungen ändern, aber nicht alle Daten noch mal eingeben willst.
|
||||
|
||||
Um bestimmten Personen ein Profil zuzuweisen, wähle die Person über "Kontakte" und klicke auf das Bearbeiten-Symbol (Stift).
|
||||
Du wirst ein Auswahlmenü mit verschiedenen vorhandenen Profilen angezeigt bekommen.
|
||||
Wenn diese Auswahl nicht angezeigt wird, dann ist die Person in einem nicht unterstützten Netzwerk und kann dadurch auch kein Profil zugewiesen bekommen.
|
||||
|
||||
Wenn eine befreundete Person auf den "magischen Profillink" klickt, sieht sie das private Profil, das du dieser Person zugewiesen hast.
|
||||
Wenn sie nicht eingeloggt ist oder das Profil von woanders angeschaut wird, wird nur das öffentliche Profil angezeigt.
|
||||
|
||||
Ein "magischer Profillink" erscheint, wenn man mit der Maus über den Kontaktnamen oder das Foto geht.
|
||||
Der Cursor wird zur Hand und auf dem Bild erscheint ein Pfeil, der nach unten zeigt.
|
||||
Dieser "magische Cursor" zeigt an, dass du ein spezielles Profil angezeigt bekommst, das nur für Freunde, aber nicht für die Öffentlichkeit sichtbar ist.
|
||||
|
||||
Du wirst außerdem möglicherweise entdecken (vorausgesetzt, du hast die nötigen Zugriffsrechte), dass du direkt auf die Seite einer anderen Person schreiben kannst (oft wird diese Beitragsart "wall-to-wall" genannt).
|
||||
Ebenso kannst du die Möglichkeit haben, direkt Beiträge zu kommentieren, während du die Seite der anderen Person besuchst.
|
||||
|
||||
Es gibt zwei Einstellungen, welche erlauben, dein Profil ins Verzeichnis einzutragen, so dass du von anderen Personen gefunden werden kannst.
|
||||
Du kannst diese Einstellungen auf deiner "Einstellungen"-Seite ändern.
|
||||
Die eine Einstellung erlaubt dir, dein Profil im Verzeichnis dieses Servers zu veröffentlichen.
|
||||
Die zweite Option erlaubt es dir, dich in das globale Friendica-Verzeichnis einzutragen.
|
||||
Dies ist ein riesiges Verzeichnis, dass alle Personen von vielen Friendica-Installationen weltweit umfasst.
|
||||
|
||||
Wenn du für andere nicht sichtbar sein willst, dann kannst du dein Profil einfach unveröffentlicht lassen.
|
||||
|
||||
Außerdem hast du möglicherweise mehrere Profile, aber nur ein Profilfoto. Dies ist beabsichtigt.
|
||||
In frühen Tests haben wir mit verschiedenen Fotos für jedes Profil experimentiert und herausgefunden, dass es sehr verwirrend für die Nutzer ist.
|
||||
Sie sehen möglicherweise je nach Profil, Seite oder Unterhaltung verschiedene Fotos und merken, dass es unterschiedliche Profile gibt, die sie nicht einsehen können.
|
||||
|
||||
(Du kannst aber die Rich-Text-Infoboxen in deinem Profil nutzen und dort weitere Bilder in das Feld "Erzähle uns ein bisschen von dir …" einfügen.)
|
||||
|
||||
|
||||
**Schlüsselwörter und Verzeichnissuche**
|
||||
|
||||
Auf der Verzeichnisseite willst du vielleicht nach Personen deines Servers suchen, die ihre Profile veröffentlicht haben.
|
||||
Die Suche richtet sich normalerweise nach deinem Spitznamen oder Teilen deines richtigen Namens.
|
||||
Darüber hinaus wird dieses Feld auch andere Felder deines Profils wie Geschlecht, Ort, "über mich", Arbeit und Bildung finden.
|
||||
Du kannst zudem auch "Schlüsselwörter" in dein Standardprofil eintragen, so dass dich andere Personen über deine Interessen finden können.
|
||||
Du hast zwei Schlüsselwortarten zur Auswahl - öffentlich und privat. Private Schlüsselwörter werden *nicht* jedem angezeigt.
|
||||
Du kannst diese Schlüsselwörter nutzen, um andere Personen zu finden, die ebenfalls in einer bestimmten Gruppe sind oder z.B. das Fischen mögen, ohne dass es jeder in einem öffentlichen Profil sieht.
|
||||
Öffentliche Schlüsselwörter werden auf der "Kontaktvorschläge"-Seite genutzt.
|
||||
Auch wenn die Schlüsselwörter hier nicht direkt angezeigt werden, kann es trotzdem sein, dass diese im HTML-Code der Seite gesehen werden könnten.
|
||||
|
||||
In der Verzeichnis-Suche kannst du ebenfalls die "booleasche"-Logik zu nutzen. Mit "+lesbisch +Florida" kannst du Leute finden, deren sexuelle Einstellung (oder andere Schlüsselwörter) das Wort "lesbisch" enthält und die in Florida leben.
|
||||
Schau dir den Bereich über "Thematische Tags" auf der "[Tags und Erwähnungen-Seite](help/Tags-and-Mentions) für weitere Informationen, um booleansche Suchen durchzuführen.
|
||||
|
||||
Auf deiner Kontaktseite ist der Link "Ähnliche Interessen", um damit andere Leute zu finden (falls dein Seitenadministrator das globale Verzeichnis nicht ausgeschaltet hat).
|
||||
Hierfür werden die Schlüsselwörter aus deinen öffentlichen und privaten Profilen genutzt, um Personen im globalen Verzeichnis zu finden, die gleiche oder ähnliche Schlüsselwörter haben (deine privaten Schlüsselwörter werden nicht in das globale Verzeichnis übertragen oder gespeichert).
|
||||
Je mehr Schlüsselwörter du einträgst, umso genauer ist die Suche. Das Suchergebnis ist nach Relevanz sortiert.
|
||||
Gegebenenfalls stehst du ganz oben auf der Liste - schließlich bist du die Person, die am besten zu deinen Schlüsselwörtern passt.
|
171
mod/profperm.php
171
mod/profperm.php
|
@ -1,171 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file mod/profperm.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Content\Text\HTML;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Profile;
|
||||
|
||||
function profperm_init(App $a)
|
||||
{
|
||||
if (!local_user()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$which = $a->user['nickname'];
|
||||
$profile = $a->argv[1];
|
||||
|
||||
Profile::load($a, $which, $profile);
|
||||
}
|
||||
|
||||
|
||||
function profperm_content(App $a) {
|
||||
|
||||
if (!local_user()) {
|
||||
notice(DI::l10n()->t('Permission denied') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ($a->argc < 2) {
|
||||
notice(DI::l10n()->t('Invalid profile identifier.') . EOL );
|
||||
return;
|
||||
}
|
||||
|
||||
$o = '';
|
||||
|
||||
// Switch to text mod interface if we have more than 'n' contacts or group members
|
||||
|
||||
$switchtotext = DI::pConfig()->get(local_user(),'system','groupedit_image_limit');
|
||||
if (is_null($switchtotext)) {
|
||||
$switchtotext = DI::config()->get('system','groupedit_image_limit', 400);
|
||||
}
|
||||
|
||||
if (($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) {
|
||||
$r = q("SELECT `id` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `self` = 0
|
||||
AND `network` = '%s' AND `id` = %d AND `uid` = %d LIMIT 1",
|
||||
DBA::escape(Protocol::DFRN),
|
||||
intval($a->argv[2]),
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
$change = intval($a->argv[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (($a->argc > 1) && (intval($a->argv[1]))) {
|
||||
$r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d AND `is-default` = 0 LIMIT 1",
|
||||
intval($a->argv[1]),
|
||||
intval(local_user())
|
||||
);
|
||||
if (!DBA::isResult($r)) {
|
||||
notice(DI::l10n()->t('Invalid profile identifier.') . EOL );
|
||||
return;
|
||||
}
|
||||
$profile = $r[0];
|
||||
|
||||
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `profile-id` = %d",
|
||||
intval(local_user()),
|
||||
intval($a->argv[1])
|
||||
);
|
||||
|
||||
$ingroup = [];
|
||||
if (DBA::isResult($r))
|
||||
foreach($r as $member)
|
||||
$ingroup[] = $member['id'];
|
||||
|
||||
$members = $r;
|
||||
|
||||
if (!empty($change)) {
|
||||
if (in_array($change,$ingroup)) {
|
||||
q("UPDATE `contact` SET `profile-id` = 0 WHERE `id` = %d AND `uid` = %d",
|
||||
intval($change),
|
||||
intval(local_user())
|
||||
);
|
||||
}
|
||||
else {
|
||||
q("UPDATE `contact` SET `profile-id` = %d WHERE `id` = %d AND `uid` = %d",
|
||||
intval($a->argv[1]),
|
||||
intval($change),
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `profile-id` = %d",
|
||||
intval(local_user()),
|
||||
intval($a->argv[1])
|
||||
);
|
||||
|
||||
$members = $r;
|
||||
|
||||
$ingroup = [];
|
||||
if (DBA::isResult($r))
|
||||
foreach($r as $member)
|
||||
$ingroup[] = $member['id'];
|
||||
}
|
||||
|
||||
$o .= '<h2>' . DI::l10n()->t('Profile Visibility Editor') . '</h2>';
|
||||
|
||||
$o .= '<h3>' . DI::l10n()->t('Profile') . ' \'' . $profile['profile-name'] . '\'</h3>';
|
||||
|
||||
$o .= '<div id="prof-edit-desc">' . DI::l10n()->t('Click on a contact to add or remove.') . '</div>';
|
||||
|
||||
}
|
||||
|
||||
$o .= '<div id="prof-update-wrapper">';
|
||||
if (!empty($change))
|
||||
$o = '';
|
||||
|
||||
$o .= '<div id="prof-members-title">';
|
||||
$o .= '<h3>' . DI::l10n()->t('Visible To') . '</h3>';
|
||||
$o .= '</div>';
|
||||
$o .= '<div id="prof-members">';
|
||||
|
||||
$textmode = (($switchtotext && (count($members) > $switchtotext)) ? true : false);
|
||||
|
||||
foreach($members as $member) {
|
||||
if ($member['url']) {
|
||||
$member['click'] = 'profChangeMember(' . $profile['id'] . ',' . $member['id'] . '); return true;';
|
||||
$o .= HTML::micropro($member,true,'mpprof', $textmode);
|
||||
}
|
||||
}
|
||||
$o .= '</div><div id="prof-members-end"></div>';
|
||||
$o .= '<hr id="prof-separator" />';
|
||||
|
||||
$o .= '<div id="prof-all-contcts-title">';
|
||||
$o .= '<h3>' . DI::l10n()->t("All Contacts \x28with secure profile access\x29") . '</h3>';
|
||||
$o .= '</div>';
|
||||
$o .= '<div id="prof-all-contacts">';
|
||||
|
||||
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 and `pending` = 0 and `self` = 0
|
||||
AND `network` = '%s' ORDER BY `name` ASC",
|
||||
intval(local_user()),
|
||||
DBA::escape(Protocol::DFRN)
|
||||
);
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
$textmode = (($switchtotext && (count($r) > $switchtotext)) ? true : false);
|
||||
foreach($r as $member) {
|
||||
if (!in_array($member['id'],$ingroup)) {
|
||||
$member['click'] = 'profChangeMember(' . $profile['id'] . ',' . $member['id'] . '); return true;';
|
||||
$o .= HTML::micropro($member,true,'mpprof',$textmode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$o .= '</div><div id="prof-all-contacts-end"></div>';
|
||||
|
||||
if (!empty($change)) {
|
||||
echo $o;
|
||||
exit();
|
||||
}
|
||||
$o .= '</div>';
|
||||
return $o;
|
||||
|
||||
}
|
|
@ -16,33 +16,6 @@ use Friendica\Util\Strings;
|
|||
*/
|
||||
class ContactSelector
|
||||
{
|
||||
/**
|
||||
* @param string $current current
|
||||
* @param string $foreign_net network
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function profileAssign($current, $foreign_net)
|
||||
{
|
||||
$o = '';
|
||||
|
||||
$disabled = (($foreign_net) ? ' disabled="true" ' : '');
|
||||
|
||||
$o .= "<select id=\"contact-profile-selector\" class=\"form-control\" $disabled name=\"profile-assign\" >\r\n";
|
||||
|
||||
$s = DBA::select('profile', ['id', 'profile-name', 'is-default'], ['uid' => $_SESSION['uid']]);
|
||||
$r = DBA::toArray($s);
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
foreach ($r as $rr) {
|
||||
$selected = (($rr['id'] == $current || ($current == 0 && $rr['is-default'] == 1)) ? " selected=\"selected\" " : "");
|
||||
$o .= "<option value=\"{$rr['id']}\" $selected >{$rr['profile-name']}</option>\r\n";
|
||||
}
|
||||
}
|
||||
$o .= "</select>\r\n";
|
||||
return $o;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $current current
|
||||
* @param boolean $disabled optional, default false
|
||||
|
|
|
@ -79,7 +79,6 @@ class Feature
|
|||
'general' => [
|
||||
DI::l10n()->t('General Features'),
|
||||
//array('expire', DI::l10n()->t('Content Expiration'), DI::l10n()->t('Remove old posts/comments after a period of time')),
|
||||
['multi_profiles', DI::l10n()->t('Multiple Profiles'), DI::l10n()->t('Ability to create multiple profiles'), false, DI::config()->get('feature_lock', 'multi_profiles', false)],
|
||||
['photo_location', DI::l10n()->t('Photo Location'), DI::l10n()->t("Photo metadata is normally stripped. This extracts the location \x28if present\x29 prior to stripping metadata and links it to a map."), false, DI::config()->get('feature_lock', 'photo_location', false)],
|
||||
['export_calendar', DI::l10n()->t('Export Public Calendar'), DI::l10n()->t('Ability for visitors to download the public calendar'), false, DI::config()->get('feature_lock', 'export_calendar', false)],
|
||||
['trending_tags', DI::l10n()->t('Trending Tags'), DI::l10n()->t('Show a community page widget with a list of the most popular tags in recent public posts.'), false, DI::config()->get('feature_lock', 'trending_tags', false)],
|
||||
|
|
|
@ -258,10 +258,6 @@ class Nav
|
|||
|
||||
$nav['settings'] = ['settings', DI::l10n()->t('Settings'), '', DI::l10n()->t('Account settings')];
|
||||
|
||||
if (Feature::isEnabled(local_user(), 'multi_profiles')) {
|
||||
$nav['profiles'] = ['profiles', DI::l10n()->t('Profiles'), '', DI::l10n()->t('Manage/Edit Profiles')];
|
||||
}
|
||||
|
||||
$nav['contacts'] = ['contact', DI::l10n()->t('Contacts'), '', DI::l10n()->t('Manage/edit friends and contacts')];
|
||||
}
|
||||
|
||||
|
|
|
@ -240,44 +240,20 @@ class Profile
|
|||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function getByNickname($nickname, $uid = 0, $profile_id = 0)
|
||||
public static function getByNickname($nickname, $uid = 0)
|
||||
{
|
||||
if (!empty(Session::getRemoteContactID($uid))) {
|
||||
$contact = DBA::selectFirst('contact', ['profile-id'], ['id' => Session::getRemoteContactID($uid)]);
|
||||
if (DBA::isResult($contact)) {
|
||||
$profile_id = $contact['profile-id'];
|
||||
}
|
||||
}
|
||||
|
||||
$profile = null;
|
||||
|
||||
if ($profile_id) {
|
||||
$profile = DBA::fetchFirst(
|
||||
"SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` AS `contact_photo`,
|
||||
`contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`,
|
||||
`profile`.*,
|
||||
`contact`.`avatar-date` AS picdate, `contact`.`addr`, `contact`.`url`, `user`.*
|
||||
FROM `profile`
|
||||
INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` AND `contact`.`self`
|
||||
INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
|
||||
WHERE `user`.`nickname` = ? AND `profile`.`id` = ? LIMIT 1",
|
||||
$nickname,
|
||||
intval($profile_id)
|
||||
);
|
||||
}
|
||||
if (!DBA::isResult($profile)) {
|
||||
$profile = DBA::fetchFirst(
|
||||
"SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` as `contact_photo`,
|
||||
`contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`,
|
||||
`profile`.*,
|
||||
`contact`.`avatar-date` AS picdate, `contact`.`addr`, `contact`.`url`, `user`.*
|
||||
FROM `profile`
|
||||
INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid` AND `contact`.`self`
|
||||
INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
|
||||
WHERE `user`.`nickname` = ? AND `profile`.`is-default` LIMIT 1",
|
||||
$nickname
|
||||
);
|
||||
}
|
||||
$profile = DBA::fetchFirst(
|
||||
"SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` AS `contact_photo`,
|
||||
`contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`,
|
||||
`profile`.*,
|
||||
`contact`.`avatar-date` AS picdate, `contact`.`addr`, `contact`.`url`, `user`.*
|
||||
FROM `profile`
|
||||
INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` AND `contact`.`self`
|
||||
INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
|
||||
WHERE `user`.`nickname` = ? AND `profile`.`uid` = ? LIMIT 1",
|
||||
$nickname,
|
||||
intval($uid)
|
||||
);
|
||||
|
||||
return $profile;
|
||||
}
|
||||
|
|
|
@ -100,14 +100,6 @@ class Contact extends BaseModule
|
|||
|
||||
Hook::callAll('contact_edit_post', $_POST);
|
||||
|
||||
$profile_id = intval($_POST['profile-assign'] ?? 0);
|
||||
if ($profile_id) {
|
||||
if (!DBA::exists('profile', ['id' => $profile_id, 'uid' => local_user()])) {
|
||||
notice(DI::l10n()->t('Could not locate selected profile.') . EOL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$hidden = !empty($_POST['hidden']);
|
||||
|
||||
$notify = !empty($_POST['notify']);
|
||||
|
@ -124,7 +116,6 @@ class Contact extends BaseModule
|
|||
$info = Strings::escapeHtml(trim($_POST['info'] ?? ''));
|
||||
|
||||
$r = DBA::update('contact', [
|
||||
'profile-id' => $profile_id,
|
||||
'priority' => $priority,
|
||||
'info' => $info,
|
||||
'hidden' => $hidden,
|
||||
|
@ -553,20 +544,13 @@ class Contact extends BaseModule
|
|||
$poll_interval = ContactSelector::pollInterval($contact['priority'], !$poll_enabled);
|
||||
}
|
||||
|
||||
$profile_select = null;
|
||||
if ($contact['network'] == Protocol::DFRN) {
|
||||
$profile_select = ContactSelector::profileAssign($contact['profile-id'], $contact['network'] !== Protocol::DFRN);
|
||||
}
|
||||
|
||||
// Load contactact related actions like hide, suggest, delete and others
|
||||
$contact_actions = self::getContactActions($contact);
|
||||
|
||||
if ($contact['uid'] != 0) {
|
||||
$lbl_vis1 = DI::l10n()->t('Profile Visibility');
|
||||
$lbl_info1 = DI::l10n()->t('Contact Information / Notes');
|
||||
$contact_settings_label = DI::l10n()->t('Contact Settings');
|
||||
} else {
|
||||
$lbl_vis1 = null;
|
||||
$lbl_info1 = null;
|
||||
$contact_settings_label = null;
|
||||
}
|
||||
|
@ -576,8 +560,6 @@ class Contact extends BaseModule
|
|||
'$header' => DI::l10n()->t('Contact'),
|
||||
'$tab_str' => $tab_str,
|
||||
'$submit' => DI::l10n()->t('Submit'),
|
||||
'$lbl_vis1' => $lbl_vis1,
|
||||
'$lbl_vis2' => DI::l10n()->t('Please choose the profile you would like to display to %s when viewing your profile securely.', $contact['name']),
|
||||
'$lbl_info1' => $lbl_info1,
|
||||
'$lbl_info2' => DI::l10n()->t('Their personal note'),
|
||||
'$reason' => trim(Strings::escapeTags($contact['reason'])),
|
||||
|
@ -598,7 +580,6 @@ class Contact extends BaseModule
|
|||
'$updpub' => DI::l10n()->t('Update public posts'),
|
||||
'$last_update' => $last_update,
|
||||
'$udnow' => DI::l10n()->t('Update now'),
|
||||
'$profile_select' => $profile_select,
|
||||
'$contact_id' => $contact['id'],
|
||||
'$block_text' => ($contact['blocked'] ? DI::l10n()->t('Unblock') : DI::l10n()->t('Block')),
|
||||
'$ignore_text' => ($contact['readonly'] ? DI::l10n()->t('Unignore') : DI::l10n()->t('Ignore')),
|
||||
|
|
|
@ -84,15 +84,6 @@
|
|||
</div>
|
||||
<div id="contact-info-end"></div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile_select}}
|
||||
<div id="contact-edit-profile-select-text">
|
||||
<h4>{{$lbl_vis1}}</h4>
|
||||
<p>{{$lbl_vis2}}</p>
|
||||
</div>
|
||||
{{$profile_select nofilter}}
|
||||
<div id="contact-edit-profile-select-end"></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<input class="contact-edit-submit" type="submit" name="submit" value="{{$submit}}" />
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
<div class="profile-listing" >
|
||||
<div class="profile-listing-photo-wrapper" >
|
||||
<a href="profiles/{{$id}}" class="profile-listing-edit-link"><img class="profile-listing-photo" id="profile-listing-photo-{{$id}}" src="{{$photo}}" alt="{{$alt}}" /></a>
|
||||
</div>
|
||||
<div class="profile-listing-photo-end"></div>
|
||||
<div class="profile-listing-name" id="profile-listing-name-{{$id}}">
|
||||
<a href="profiles/{{$id}}" class="profile-listing-edit-link" >{{$profile_name}}</a>
|
||||
</div>
|
||||
<div class="profile-listing-visible">{{$visible nofilter}}</div>
|
||||
</div>
|
||||
<div class="profile-listing-end"></div>
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
<h1>{{$header}}</h1>
|
||||
|
||||
<p id="profile-listing-desc" class="button" >
|
||||
<a href="profile_photo" >{{$chg_photo}}</a>
|
||||
</p>
|
||||
|
||||
<div id="profile-listing-new-link-wrapper" class="button" >
|
||||
<a href="{{$cr_new_link}}" id="profile-listing-new-link" title="{{$cr_new}}" >{{$cr_new}}</a>
|
||||
</div>
|
||||
|
||||
<div id="profile-listing-profiles">
|
||||
{{$profiles nofilter}}
|
||||
</div>
|
|
@ -172,35 +172,6 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $lbl_vis1}}
|
||||
<div class="panel">
|
||||
<div class="section-subtitle-wrapper" role="tab" id="contact-edit-profile-select">
|
||||
<h4>
|
||||
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#contact-edit-tools" href="#contact-edit-profile-select-collapse" aria-expanded="false" aria-controls="contact-edit-profile-select-collapse">
|
||||
{{$lbl_vis1}}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="contact-edit-profile-select-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="contact-edit-profile-select">
|
||||
<div class="section-content-tools-wrapper">
|
||||
{{if $profile_select}}
|
||||
<div id="contact-edit-profile-select-text">
|
||||
<p>{{$lbl_vis2}}</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{$profile_select nofilter}}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{{/if}}
|
||||
|
||||
<div class="form-group pull-right settings-submit-wrapper" >
|
||||
<button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
</form>{{* End of the form *}}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
<div class="profile-listing-row" >
|
||||
<div class="profile-listing-cell" >
|
||||
<a href="profiles/{{$id}}" class="profile-listing-edit-link"><img class="profile-listing-photo" id="profile-listing-photo-{{$id}}" src="{{$photo}}" alt="{{$alt}}" /></a>
|
||||
</div>
|
||||
<div class="profile-listing-photo-end"></div>
|
||||
<div class="profile-listing-cell" id="profile-listing-name-{{$id}}">
|
||||
<a href="profiles/{{$id}}" class="profile-listing-edit-link" >{{$profile_name}}</a>
|
||||
</div>
|
||||
<div class="profile-listing-cell">
|
||||
{{$visible nofilter}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-listing-end"></div>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
<div class="generic-page-wrapper">
|
||||
<div class="section-title-wrapper pull-left">
|
||||
<h2>{{$header}}</h2>
|
||||
</div>
|
||||
<div id="profile-listing-new-link-wrapper" class="pull-right" >
|
||||
<a href="{{$cr_new_link}}" id="profile-listing-new-link" class="page-action faded-icon" title="{{$cr_new}}" data-toggle="tooltip">
|
||||
<i class="fa fa-plus"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="section-content-wrapper">
|
||||
<div id="profile-listing-profiles" class="profile-listing-table">
|
||||
{{$profiles nofilter}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -85,15 +85,6 @@
|
|||
</div>
|
||||
<div id="contact-info-end"></div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile_select}}
|
||||
<div id="contact-edit-profile-select-text">
|
||||
<h4>{{$lbl_vis1}}</h4>
|
||||
<p>{{$lbl_vis2}}</p>
|
||||
</div>
|
||||
{{$profile_select nofilter}}
|
||||
<div id="contact-edit-profile-select-end"></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<input class="contact-edit-submit" type="submit" name="submit" value="{{$submit}}" />
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in a new issue