define ( 'ACTIVITY_OBJ_GROUP', NAMESPACE_ACTIVITY_SCHEMA . 'group' );
define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_DFRN . '/tagterm' );
define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_DFRN . '/profile' );
+define ( 'ACTIVITY_OBJ_QUESTION', 'http://activityschema.org/object/question' );
/**
* item weight for query ordering
public $identities;
public $is_mobile;
public $is_tablet;
+ public $is_friendica_app;
public $performance = array();
public $nav_sel;
// array of instanced template engines ('name'=>'instance')
public $template_engine_instance = array();
- // Used for reducing load to the ostatus completion
- public $last_ostatus_conversation_url;
-
private $ldelim = array(
'internal' => '',
'smarty3' => '{{'
$this->is_mobile = $mobile_detect->isMobile();
$this->is_tablet = $mobile_detect->isTablet();
+ // Friendica-Client
+ $this->is_friendica_app = ($_SERVER['HTTP_USER_AGENT'] == "Apache-HttpClient/UNAVAILABLE (java 1.4)");
+
/**
* register template engines
*/
return(FRIENDICA_PLATFORM." '".FRIENDICA_CODENAME."' ".FRIENDICA_VERSION."-".DB_UPDATE_VERSION."; ".$this->get_baseurl());
}
+ function is_friendica_app() {
+ return($this->is_friendica_app);
+ }
+
}
}
$skip = 0;
foreach($r as &$rr) {
- if($rr['adjust'])
- $md = datetime_convert('UTC',$a->timezone,$rr['start'],'Y/m');
- else
- $md = datetime_convert('UTC','UTC',$rr['start'],'Y/m');
- $md .= "/#link-".$rr['id'];
+ $title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8'));
+
+ if(strlen($title) > 35)
+ $title = substr($title,0,32) . '... ';
- $title = substr(strip_tags(bbcode($rr['desc'])),0,32) . '... ';
- if(! $title)
- $title = t('[No description]');
+ $description = substr(strip_tags(bbcode($rr['desc'])),0,32) . '... ';
+ if(! $description)
+ $description = t('[No description]');
$strt = datetime_convert('UTC',$rr['convert'] ? $a->timezone : 'UTC',$rr['start']);
}
$today = ((substr($strt,0,10) === datetime_convert('UTC',$a->timezone,'now','Y-m-d')) ? true : false);
-
- $rr['link'] = $md;
+
$rr['title'] = $title;
+ $rr['description'] = $desciption;
$rr['date'] = day_translate(datetime_convert('UTC', $rr['adjust'] ? $a->timezone : 'UTC', $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');
$rr['startime'] = $strt;
$rr['today'] = $today;
**Registrierung**
-Nicht alle Friendica-Knoten bieten die Möglichkeit einer Registrierung.
-Wenn eine Registrierung möglich ist, wird ein "Registrieren"-Link unter dem Login-Feld auf der Startseite angezeigt, der zur Registrierungsseite führt.
-Die Stärke unseres Netzwerks liegt darin, dass die verschiedenen Knoten komplett kompatibel zueinander sind.
+Nicht alle Friendica-Knoten bieten die Möglichkeit zur Registrierung.
+Wenn die Registrierung möglich ist, wird ein "Registrieren"-Link unter dem Login-Feld auf der Startseite angezeigt, der zur Registrierungsseite führt.
+Die Stärke unseres Netzwerks ist, dass die verschiedenen Knoten komplett kompatibel zueinander sind.
Wenn der Knoten, den Du besuchst, keine Registrierung anbietet, oder wenn Du glaubst, dass Dir eine andere Seite möglicherweise besser gefällt, dann kannst Du hier eine <a href="http://dir.friendica.com/siteinfo">Liste von öffentlichen Servern (Knoten)</a> finden und den Knoten heraus suchen, der am Besten zu Deinen Anforderungen passt.
-Wenn Du Deinen eigenen Server aufsetzen willst, kannst Du das ebenfalls machen. Besuche <a href="http://friendica.com/download">die Friendica-Webseite</a>, um den Code mit den Installationsanleitungen herunterzuladen.
+Wenn Du Deinen eigenen Server aufsetzen willst, kannst Du das ebenfalls machen.
+Besuche <a href="http://friendica.com/download">die Friendica-Webseite</a>, um den Code mit den Installationsanleitungen herunterzuladen.
Es ist ein einfacher Installationsprozess, den jeder mit ein wenig Erfahrungen im Webseiten-Hosting oder mit grundlegenden Linux-Erfahrungen einfach handhaben kann.
*OpenID*
Das erste Feld auf der Registrierungsseite ist für eine OpenID-Adresse.
-Wenn Du keine OpenID-Adresse hast oder diese nicht verwenden möchtest, dann lasse das Feld frei.
+Wenn Du keine OpenID-Adresse hast oder nicht wünschst, diese zu nutzen, dann lasse das Feld frei.
Wenn Du einen OpenID-Account hast und diesen nutzen willst, gib die Adresse in das Feld ein und klicke auf "Registrieren".
Friendica wird versuchen, so viele Informationen wie möglich von Deinem OpenID-Provider zu übernehmen, um diese in Dein Profil auf dieser Seite einzutragen.
*Dein vollständiger Name*
Bitte trage Deinen vollständigen Namen **so ein, wie Du ihn im System anzeigen lassen willst**.
-Viele Leute nutzen ihren richtigen Namen hierfür, allerdings besteht für Dich dazu keine Verpflichtung.
+Viele Leute nutzen ihren richtigen Namen hierfür, allerdings besteht für dich keine Pflicht, das auch so zu machen.
*Email-Adresse*
Bitte trage eine richtige Email-Adresse ein.
Deine Email-Adresse wird **niemals** veröffentlicht.
-Wir benötigen diese, um Dir Account-Informationen und die Login-Daten zuzuschicken.
+Wir benötigen diese, um Dir Account-Informationen und die Login-Daten zu schicken.
Du erhältst zudem von Zeit zu Zeit Benachrichtigungen über eingegangene Nachrichten oder Punkte, die Deine Aufmerksamkeit benötigen.
-Du hast aber auch die Möglichkeit, diese Nachrichten in Deinen Account-Einstellungen komplett abzuschalten.
+Du hast aber auch die Möglichkeit, diese Nachrichten in Deinen Account-Einstellungen komplett abzuschalten.
-Bei der Wahl der Email-Adresse bist Du völlig frei, sie sollte aber funktionieren, und Du musst Zugriff auf sie haben.
-Ohne diese Adresse kannst Du weder Dein Initialpasswort erhalten, noch Dein Passwort zurücksetzen.
+Du musst nicht Deine Haupt-Email-Adresse sein, jedoch wird eine funktionierende Adresse benötigt.
+Ohne dieses kannst Du weder Dein Initialpasswort erhalten, noch Dein Passwort zurücksetzen.
Dies ist die einzige persönliche Information, die korrekt sein muss.
*Spitzname/Nickname*
-Der Spitzname wird benötigt, um eine Webadresse für Deine persönlichen Seiten zu erstellen.
+Der Spitzname wird benötigt, um eine Webadresse für viele Deiner persönlichen Seiten zu erstellen.
Auch wird dieser wie eine Email-Adresse genutzt, wenn eine Verbindung zu anderen Personen hergestellt werden soll.
-Durch die Art, wie der Spitzname genutzt wird, ergeben sich bestimmte Einschränkungen: Er darf nur US-ASCII-Textzeichen und Ziffern enthalten und er muss zudem mit einem Buchstaben beginnen.
-Außerdem muss er einzigartig im System sein.
-Dieser Spitzname wird an vielen Stellen genutzt, um Deinen Account zu identifizieren, und kann daher **später nicht mehr geändert werden**.
+Durch die Art, wie der Spitzname genutzt wird, gibt es bestimmte Einschränkungen. Er darf nur US-ASCII-Textzeichen und Nummern enthalten und er muss zudem mit einem Buchstaben beginnen.
+Er muss außerdem einzigartig im System sein.
+Dieser Spitzname wird an vielen Stellen genutzt, um Deinen Account zu identifizieren, und kann daher später nicht mehr geändert werden.
*Verzeichnis-Eintrag*
-Das Registrierungsformular erlaubt es Dir, direkt zu bestimmen, ob Du in dem einem Telefonbuch vergleichbaren Onlineverzeichnis aufgelistet werden sollst oder nicht.
-Wir bitten dich, "Ja" zu wählen, so dass Dich andere Leute (Freunde, Familie etc.) finden können.
-Wenn Du "Nein" wählst, wirst Du gewissermaßen unsichtbar sein und nur wenige Möglichkeiten zur Interaktion haben.
-Was auch immer Du wählst kann jederzeit nach dem Login in Deinen Account-Einstellungen geändert werden.
+Das Registrierungsformular erlaubt es dir, direkt auszuwählen, ob Du im Onlineverzeichnis aufgelistet wirst oder nicht.
+Das ist wie ein Telefonbuch und Du kannst entscheiden, nicht aufgeführt zu werden.
+Wir bitten dich, "Ja" zu wählen, so dass dich andere Leute (Freunde, Familie etc.) finden können.
+Wenn Du "Nein" wählst, wirst Du hauptsächlich unsichtbar sein und nur wenige Möglichkeiten zur Interaktion haben.
+Was auch immer Du wählst, kann jederzeit nach dem Login in Deinen Account-Einstellungen geändert werden.
*Registrierung*
Spezielle Tags\r
-------\r
\r
-Wenn du über BBCode Tags in einer Nachricht schreiben möchtest, kannst du [noparse], [nobb] oder [pre] verwenden um den BBCode Tags vor der Evaluierung zu schützen:
+Wenn Du über BBCode Tags in einer Nachricht schreiben möchtest, kannst Du [noparse], [nobb] oder [pre] verwenden um den BBCode Tags vor der Evaluierung zu schützen:
\r
<pre>[noparse][b]fett[/b][/noparse]</pre> : [b]fett[/b]\r
\r
##IRC Plugin
-Sobald das Plugin aktiviert ist, kannst Du den Chat unter [DeineSeite.de/irc](../irc) finden.
+Sobald das Plugin aktiviert ist, kannst Du den Chat unter [deineSeite.de/irc](../irc) finden.
Beachte aber, dass dieser Chat auch ohne Anmeldung auf Deiner Seite zugänglich ist und somit auch Fremde diesen Chat mitnutzen können.
Wenn Du dem Link folgst, dann kommst Du zum Anmeldefenster des IR-Chats.
Wähle nun einen Spitznamen (Nickname) und wähle einen Raum aus, in dem Du chatten willst.
Hier kannst Du jeden Namen eingeben.
Es kann also auch #tollerChatdessenNamenurichkenne sein.
-Gib als nächstes noch die Captchas ein, um zu zeigen, dass es sich bei Dir um einen Menschen handelt und klicke dann auf "Connect".
+Gib als nächstes noch die Captchas ein, um zu zeigen, dass es sich bei Dir um einen Menschen handelt und klicke auf "Connect".
Im nächsten Fenster siehst Du zunächst viel Text beim Verbindungsaufbau, der allerdings für Dich nicht weiter von Bedeutung ist.
Anschließend öffnet sich das Chat-Fenster.
**1. Grundsätzliches**
-Als erstes musst Du die aktuellste Version herunterladen:
+Als erstes musst Du die aktuellste Version herunterladen:
Per Git:
<p style="font-family: courier; background-color: #CCCCCC; margin-left:25px; width: 450px;">
Nach dem Upload gehts in den Friendica Adminbereich und dort zu den Plugins.
Aktiviere das Jappixmini Addon und gehe anschließend über die Plugins Seitenleiste (dort wo auch die Twitter-, Impressums-, StatusNet-, usw. Einstellungen gemacht werden) zu den Jappix Grundeinstellungen.
-Setze hier den Haken zur Aktivierung des BOSH Proxys.
+Setze hier den Haken zur Aktivierung des BOSH Proxys.
Weiter gehts in den Einstellungen Deines Friendica Accounts.
-**2. Einstellungen**
+2. Einstellungen
Gehe bitte zu den Plugin-Einstellungen in Deinen Konto-Einstellungen (Account Settings).
-Scrollen ein Stück hinunter bis zu den Jappix Mini addon settings.
+Scrolle ein Stück hinunter bis zu den Jappix Mini Addon settings.
Aktiviere hier zuerst das Addon.
Trage nun Deinen Jabber/XMPP Namen ein, ebenfalls die entsprechende Domain bzw. den Server (ohne http, also zb einfach so: jappix.com).
-Bei „Jabber BOSH Host“ kannst Du erstmal “https://bind.jappix.com/ “ eintragen.
+Um das JavaScript Applet zum Chatten im Browser verwenden zu können, benötigst du einen BOSH Proxy.
+Entweder betreibst du deinen eigenen (s. Dokumentation deines XMPP Servers) oder du verwendest einen öffentlichen BOSH Proxy.
+Beachte aber, dass der Betreiber dieses Proxies den kompletten Datenverkehr über den Proxy mitlesen kann.
Siehe dazu auch die „Configuration Help“ weiter unten.
Gebe danach noch Dein Passwort an, und damit ist eigentlich schon fast alles geschafft.
Die weiteren Einstellmöglichkeiten bleiben Dir überlassen, sind also optional.
Jetzt noch auf „senden“ klicken und fertig.
Deine Chatbox sollte jetzt irgendwo unten rechts im Browserfenster „kleben“.
-Falls Du manuell Kontakte hinzufügen möchtest, einfach den „Add Contact“ Knopf nutzen.
+Falls Du manuell Kontakte hinzufügen möchtest, einfach den „Add Contact“-Knopf nutzen.
Viel Spass beim Chatten!
* [Zur Startseite der Hilfe](help)
-Konnektoren erlauben es dir, dich mit anderen sozialen Netzwerken zu verbinden.
+Konnektoren erlauben es Dir, Dich mit anderen sozialen Netzwerken zu verbinden.
Konnektoren werden nur bei bestehenden Facebook-, Twitter und StatusNet-Accounts benötigt.
-Außerdem gibt es einen Konnektor, um deinen Email-Posteingang zu nutzen.
+Außerdem gibt es einen Konnektor, um Deinen Email-Posteingang zu nutzen.
+Wenn Du keinen eigenen Knoten betreibst und wissen willst, ob der server Deiner Wahl diese Konnektoren installiert hat, kannst Du Dich darüber auf der Seite '<domain_des_friendica-servers>/friendica' informieren.
-Wenn die folgenden Netzwerk-Konnektoren auf deinem System installiert sind, kannst du mit den folgenden Links die Einstellungsseiten besuchen und für deinen Account konfigurieren:
+Sind die Netzwerk-Konnektoren auf Deinem System installiert sind, kannst Du mit den folgenden Links die Einstellungsseiten besuchen und für Deinen Account konfigurieren:
* [Facebook](/settings/connectors)
* [Twitter](/settings/connectors)
**Friendica**
-Du kannst dich verbinden, indem du deine Identitäts-Adresse auf der "Verbinden"-Seite des Friendica-Nutzers eingibst.
-Ebenso kannst du deren Identitäts-Adresse in der "Verbinden"-Box auf deiner ["Kontakt"-Seite](contacts) eingeben.
+Du kannst Dich verbinden, indem Du die Adresse Deiner Identität (<dein_nick>@<dein_friendica-host>) auf der "Verbinden"-Seite des Friendica-Nutzers eingibst.
+Ebenso kannst Du deren Identitäts-Adresse in der "Verbinden"-Box auf Deiner ["Kontakt"-Seite](contacts) eingeben.
**Diaspora**
-Füge die Diaspore-Identitäts-Adresse (z.B. name@diasporapod.com) auf deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein.
+Füge die Diaspora-Identitäts-Adresse (z.B. name@diasporapod.com)auf Deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein.
**Identi.ca/StatusNet/GNU-Social**
Diese Netzwerke werden als "federated social web" bzw. "OStatus"-Kontakte bezeichnet.
Bitte beachte, dass es **keine** Einstellungen zur Privatssphäre im OStatus-Netzwerk gibt.
-**Jede** Nachricht, die an eines dieser OStatus-Mitglieder verschickt wird, ist für jeden auf der Welt sichtbar; alle Privatssphäreneinstellungen verlieren ihre Wirkung. Diese Nachrichten erscheinen ebenfalls in öffentlichen Suchergebnissen.
+**Jede** Nachricht, die an eines dieser OStatus-Mitglieder verschickt wird, ist für jeden auf der Welt sichtbar; alle Privatssphäreneinstellungen verlieren ihre Wirkung.
+Diese Nachrichten erscheinen ebenfalls in öffentlichen Suchergebnissen.
-Da die OStatus-Kommunikation keine Authentifizierung benutzt, können OStatus-Nutzer *keine* Nachrichten empfangen, wenn du in deinen Privatssphäreneinstellungen "Profil und Nachrichten vor Unbekannten verbergen" wählst.
+Da die OStatus-Kommunikation keine Authentifizierung benutzt, können OStatus-Nutzer *keine* Nachrichten empfangen, wenn Du in Deinen Privatssphäreneinstellungen "Profil und Nachrichten vor Unbekannten verbergen" wählst.
-Um dich mit einem OStatus-Mitglied zu verbinden, trage deren Identitäts-Adresse auf deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein.
+Um Dich mit einem OStatus-Mitglied zu verbinden, trage deren Profil-URL oder Identitäts-Adresse auf Deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein.
-Der StatusNet-Konnektor kann genutzt werden, wenn du Beiträge schreiben willst, die auf einer OStatus-Seite über einen existierenden OStatus-Account erscheinen sollen.
+Der StatusNet-Konnektor kann genutzt werden, wenn Du Beiträge schreiben willst, die auf einer OStatus-Seite über einen existierenden OStatus-Account erscheinen sollen.
-Das ist nicht notwendig, wenn du OStatus-Mitgliedern von Friendica aus folgst und diese dir auch folgen, indem sie auf deiner Kontaktseite ihre eigene Identitäts-Adresse eingeben.
+Das ist nicht notwendig, wenn Du OStatus-Mitgliedern von Friendica aus folgst und diese Dir auch folgen, indem sie auf Deiner Kontaktseite ihre eigene Identitäts-Adresse eingeben.
**Blogger, Wordpress, RSS feeds, andere Webseiten**
-Trage die URL auf deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein.
+Trage die URL auf Deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein.
Du hast keine Möglichkeit, diesen Kontakten zu antworten.
-Das erlaubt dir, dich mit Millionen von Seiten im Internet zu _verbinden_.
+Das erlaubt Dir, Dich mit Millionen von Seiten im Internet zu _verbinden_.
Alles, was dafür nötig ist, ist dass die Seite einen Feed im RSS- oder Atom Syndication-Format nutzt und welches einen Autoren und ein Bild zur Seite liefert.
**Twitter**
-Um einem Twitter-Nutzer zu folgen, muss der Twitter-Connektor installiert sein.
-Trage die URL der Hauptseite des Twitter-Accounts auf deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein.
+Um einem Twitter-Nutzer zu folgen, trage die URL der Hauptseite des Twitter-Accounts auf Deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein.
+Um zu antworten, musst Du den Twitter-Konnektor installieren und über Deinen eigenen Status-Editor antworten.
+Beginne Deine Nachricht mit @twitternutzer, ersetze das aber durch den richtigen Twitter-Namen.
**Email**
-Konfiguriere den Email-Konnektor auf deiner [Einstellungsseite](settings).
-Wenn du das gemacht hast, kannst du auf deiner ["Kontakte"-Seite](contacts) die Email-Adresse in das Feld "Neuen Kontakt hinzufügen" eintragen.
-Diese Email-Adresse muss jedoch bereits mit einer Nachricht in deinem Email-Posteingang auf dem Server liegen.
-Du hast die Möglichkeit, Email-Kontakte in deine privaten Unterhaltungen einzubeziehen.
+Konfiguriere den Email-Konnektor auf Deiner [Einstellungsseite](settings).
+Wenn Du das gemacht hast, kannst Du auf Deiner ["Kontakte"-Seite](contacts) die Email-Adresse in das Feld "Neuen Kontakt hinzufügen" eintragen.
+Diese Email-Adresse muss jedoch bereits mit einer Nachricht in Deinem Email-Posteingang auf dem Server liegen.
+Du hast die Möglichkeit, Email-Kontakte in Deine privaten Unterhaltungen einzubeziehen.
**Facebook**
-Der Facebook-Konnektor ist ein Plugin/Addon, dass es dir erlaubt, von Friendica aus mit Freunden auf Facebook zu interagieren.
-Wenn er aktiviert ist, wird deine Facebook-Freundesliste importiert und du wirst Facebook-Beiträge sehen und kommentieren können.
+Der Facebook-Konnektor ist ein Plugin/Addon, dass es Dir erlaubt, von Friendica aus mit Freunden auf Facebook zu interagieren.
+Wenn er aktiviert ist, wird Deine Facebook-Freundesliste importiert und Du wirst Facebook-Beiträge sehen und kommentieren können.
Facebook-Freunde können außerdem zu privaten Gesprächen hinzugefügt werden.
-Du hast nicht die Möglichkeit, einzelne Facebook-Accounts hinzuzufügen, sondern nur deine gesamte Freundesliste, die aktualisiert wird, wenn neue Freunde hinzugefügt werden.
+Du hast nicht die Möglichkeit, einzelne Facebook-Accounts hinzuzufügen, sondern nur Deine gesamte Freundesliste, die aktualisiert wird, wenn neue Freunde hinzugefügt werden.
-Wenn das Facebook-Plugin/Addon installiert ist, kannst du diesen auf deiner Einstellungsseite unter ["Facebook Connector Settings"](/settings/connectors) einstellen.
+Wenn das Facebook-Plugin/Addon installiert ist, kannst Du diesen auf Deiner Einstellungsseite unter ["Facebook Connector Settings"](/settings/connectors) einstellen.
Dieser Eintrag erscheint nur, wenn das Plugin/Addon installiert ist.
Folge den Vorgaben, um den Facebook-Konnektor zu installieren oder löschen.
-Du kannst ebenfalls auswählen, ob deine öffentlichen Posts auch standardmäßig bei Facebook veröffentlicht werden sollen.
-Du kannst diese Einstellung jederzeit im aktuellen Beitrag beeinflussen, indem du auf das "Schloss"-Icon unter dem Beitragseditor gehst.
+Du kannst ebenfalls auswählen, ob Deine öffentlichen Posts auch standardmäßig bei Facebook veröffentlicht werden sollen.
+Du kannst diese Einstellung jederzeit im aktuellen Beitrag beeinflussen, indem Du auf das "Schloss"-Icon unter dem Beitragseditor gehst.
Diese Einstellung hat keine Auswirkung auf private Unterhaltungen.
Diese werden immer an Facebook-Freunde mit den entsprechenden Genehmigungen geschickt.
-(Beachte: Aktuell können Facebook-Kontakte keine privaten Fotos sehen. Das wird zukünftig gelöst. Facebook-Kontakte können aber trotzdem öffentliche Fotos sehen, die du hochgeladen hast.)
+(Beachte: Aktuell können Facebook-Kontakte keine privaten Fotos sehen.
+Das wird zukünftig gelöst.
+Facebook-Kontakte können aber trotzdem öffentliche Fotos sehen, die Du hochgeladen hast.)
* [Zur Startseite der Hilfe](help)
-Hier erfährst du, wie du bei uns mitmachen kannst
+Hier erfährst Du, wie Du bei uns mitmachen kannst:
-Zunächst erstelle dir ein funktionierendes Git-Paket auf deinem System, auf dem du die Entwicklung durchführst.
+Zunächst erstelle Dir per 'git clone https://github.com/friendica/friendica.git' ein funktionierendes Git-Paket auf Deinem System, auf dem Du die Entwicklung durchführst, und einen eigenen Github-Account.
-Erstelle deinen eigenen Github-Account.
+Erstelle Deine eigene Kopie (fork) der Ursprungsdaten auf Github, an der Du dann entspannt arbeiten kannst.
+Deine Arbeiten sollten mit einem neuen Arbeitszweig (branch) beginnen, den du vom develop Zweig des Repositories beginnst.
+Die Anleitung unter [http://help.github.com/fork-a-repo/](http://help.github.com/fork-a-repo/) erklärt Dir genau, wie Du das tun musst.
-Du hast die Möglichkeit, die Friendica-Daten direkt über Github von der folgenden Seite laden: [https://github.com/friendica/friendica.git](https://github.com/friendica/friendica.git)
-
-Befolge die Anleitung unter diesem Link [http://help.github.com/fork-a-repo/](http://help.github.com/fork-a-repo/), um deine eigene Kopie (fork) der Ursprungsdaten auf Github zu erstellen und bearbeiten.
-
-Gehe nun zu deiner Github-Seite und erstelle eine "Pull request", wenn du soweit bist, dein Projekt wieder in das Hauptprojekt einzugliedern.
+Gehe dann nach getaner Arbeit zu Deiner Github-Seite und erstelle eine "Pull request", um Deine Änderungen in das Hauptprojekt einzugliedern (merge).
**Wichtig**
-Bitte hole dir alle Änderungen aus dem Projektverzeichnis und führe sie mit deiner Arbeit zusammen, **bevor** du deine "pull request" stellt.
-Wir behalten es uns vor, Patches abzulehnen, die eine große Anzahl an Fehlern hervorrufen.
+Bitte hole Dir alle Änderungen aus dem Projektverzeichnis und führe sie mit Deiner Arbeit zusammen, **bevor** Du Deine "pull request" erstellst. Wir behalten es uns vor, Patches abzulehnen, die eine große Anzahl an Fehlern hervorrufen.
Dies gilt vor allem für Übersetzungen, da wir hier möglicherweise nicht alle feinen Unterschiede in konfliktären Versionen erkennen können.
-Außerdem: **teste deine Änderungen!** Vergiss nicht, dass eine simple Fehlerlösung einen anderen Fehler auslösen kann.
-Lass deine Änderungen von einem erfahrenen Friendica-Entwickler gegenprüfen.
+Außerdem: **teste Deine Änderungen!** Vergiss nicht, dass eine simple Fehlerlösung einen anderen Fehler auslösen kann.
+Lass Deine Änderungen von einem erfahrenen Friendica-Entwickler gegenprüfen.
+
+Eine ausführliche Anleitung zu Git findest Du unter <a href="https://git-scm.com/book/de/v1" target="_blank">https://git-scm.com/book/de/v1</a>.
**Warum erhalte ich Warnungen über fehlende Zertifikate?**
-Manchmal erhältst du eine Browser-Warnung über fehlende Zertifikate. Diese Warnungen können drei Gründe haben:
+Manchmal erhältst Du eine Browser-Warnung über fehlende Zertifikate.
+Diese Warnungen können drei Gründe haben:
-1. der Server, mit dem du verbunden bist, nutzt kein SSL;
+1. der Server, mit dem Du verbunden bist, nutzt kein SSL;
2. der Server hat ein selbst-signiertes Zertifikat (nicht empfohlen)
*(SSL (Secure Socket Layer) ist eine Technologie, die Daten auf ihrem Weg zwischen zwei Computern verschlüsselt.)*
-Wenn du noch kein SSL-Zertifikat hast, dann gibt es drei Wege, eines zu erhalten: kauf dir eines, hole dir ein kostenloses (z.B. bei StartSSL) oder kreiere dein eigenes (nicht empfohlen).
-[Weitere Informationen über die Einrichtung von SSL und warum es schlecht ist, selbst-signierte Zertifikate zu nutzen, findest du hier.](help/SSL)
+Wenn Du noch kein SSL-Zertifikat hast, dann gibt es drei Wege, eines zu erhalten: kauf Dir eines, hole Dir ein kostenloses (z.B. bei StartSSL, WoSign, hoffentlich bald auch letsencrypt) oder kreiere Dein eigenes (nicht empfohlen).
+[Weitere Informationen über die Einrichtung von SSL und warum es schlecht ist, selbst-signierte Zertifikate zu nutzen, findest Du hier.](help/SSL)
-Sei dir bewusst, dass Browser-Warnungen über Sicherheitslücken etwas sind, wodurch neue Nutzer schnell das Vertrauen in das gesamte Friendica-Projekt verlieren können.
+Sei Dir bewusst, dass Browser-Warnungen über Sicherheitslücken etwas sind, wodurch neue Nutzer schnell das Vertrauen in das gesamte Friendica-Projekt verlieren können.
+Aus diesem Grund wird Friendica Red nur SSL-Zertifikate eines anerkannten Anbieters (CA, certificate authority) akzeptieren und nicht zu Seiten verbinden, die kein SSL nutzen.
Unabhängig von den negativen Aspekten von SSL handelt es sich hierbei um eine notwendige Lösung, solange keine etablierte Alternative existiert.
Abgesehen davon kann es ohne SSL auch Probleme mit der Verbindung zu Diaspora geben, da einige Diaspora-Pods eine zertifizierte Verbindung benötigen.
-Wenn du Friendica nur für eine bestimmte Gruppe von Leuten auf einem einzelnen Server nutzt, bei dem keine Verbindung zum restlichen Netzwerk besteht, dann benötigst du kein SSL.
-Ebenso benötigst du SSL nicht, wenn du ausschließlich öffentliche Beiträge auf deiner Seite veröffentlichst bzw. empfängst.
+Wenn Du Friendica nur für eine bestimmte Gruppe von Leuten auf einem einzelnen Server nutzt, bei dem keine Verbindung zum restlichen Netzwerk besteht, dann benötigst Du kein SSL.
+Ebenso benötigst Du SSL nicht, wenn Du ausschließlich öffentliche Beiträge auf Deiner Seite veröffentlichst bzw. empfängst.
-Wenn du zum jetzigen Zeitpunkt noch keinen Server aufgesetzt hast, ist es sinnvoll, die verschiedenen Anbieter in Bezug auf SSL zu vergleichen.
-Einige erlauben die Nutzung von freien Zertifikaten oder lassen dich ihre eigenen Zertifikate mitnutzen.
+Wenn Du zum jetzigen Zeitpunkt noch keinen Server aufgesetzt hast, ist es sinnvoll, die verschiedenen Anbieter in Bezug auf SSL zu vergleichen.
+Einige erlauben die Nutzung von freien Zertifikaten oder lassen Dich ihre eigenen Zertifikate mitnutzen.
Andere erlauben nur kostenpflichtige Zertifikate als eigenes Angebot bzw. von anderen Anbietern.
<a name="upload"></a>
**Wie kann ich Bilder, Dateien, Links, Video und Audio in Beiträge einfügen?**
Bilder können direkt im [Beitragseditor](help/Text_editor) vom Computer hochgeladen werden.
-Eine Übersicht aller Bilder, die auf deinem Server liegen, findest du unter <i>deineSeite.de/photos/profilname</i>.
-Dort kannst du auch direkt Bilder hochladen und festlegen, ob deine Kontakte eine Nachricht über das neue Bild bekommen.
+Eine Übersicht aller Bilder, die auf Deinem Server liegen, findest Du unter <i>deineSeite.de/photos/profilname</i>.
+Dort kannst Du auch direkt Bilder hochladen und festlegen, ob Deine Kontakte eine Nachricht über das neue Bild bekommen.
-Alle Arten von Dateien können grundsätzlich als Anhang in Friendica hochgeladen werden. Dafür verwendest du das Büroklammersymbol im Editor.
+Alle Arten von Dateien können grundsätzlich als Anhang in Friendica hochgeladen werden.
+Dafür verwendest Du das Büroklammersymbol im Editor.
Sie sind dann direkt an den Beitrag geknüpft, können von den Betrachtern heruntergeladen werden, aber werden nicht als Vorschau angezeigt.
Deshalb eignet sich diese Methode vor allem für Office-Dateien oder gepackte Dateien wie ZIPs, aber weniger für Multimediadateien.
Wer hingegen Dateien über Dropbox, über eine auf dem eigenen Server installierte Owncloud oder über einen anderen [Filehoster](http://en.wikipedia.org/wiki/Comparison_of_file_hosting_services) einfügen will, verwendet den Link-Button.
-Wenn du mit dem Link-Button (Ketten-Symbol) URLs zu anderen Seiten einfügst, versucht Friendica eine kurze Zusammenfassung als Vorschau abzurufen.
+Wenn Du mit dem Link-Button (Ketten-Symbol) URLs zu anderen Seiten einfügst, versucht Friendica eine kurze Zusammenfassung als Vorschau abzurufen.
Manchmal klappts das nicht ... dann verlinke den Beitrag einfach per [url=http://example.com]<i>freigewählter Name</i>[/url] im Editor.
Video- und Audiodateien können zwar in Beiträge eingebunden werden, allerdings geht das nicht über einen direkten Upload im Editor wie bei Fotos.
Du hast zwei Möglichkeiten:
-1. Du kannst bei dem Video- oder Audiobutton die URL von einem Hoster eingeben (Youtube, Vimeo, Soundcloud und alle anderen mit oembed/opengraph-Unterstützung). Bei Videos zeigt Friendica dann ein Vorschaubild in deinem Beitrag an, nach einem Klick öffnet sich ein eingebetter Player. Bei Soundcloud wird der Player direkt eingebunden.
-2. Wenn du Zugang zu einem eigenen Server hast, kannst deine Multimediadatei per FTP dort hochladen und beim Video-/Audiobutton diese URL angeben. Dann wird das Video oder die Audiodatei direkt mit einem Player in deinem Beitrag angezeigt.
-Friendica verwendet zur Einbettung HTML5. Das bedeutet, dass je nach Browser und Betriebssystem andere Formate unterstützt werden, darunter WebM, MP4, MP3 und Ogg. Eine Tabelle findest du bei Wikipedia ([Video](http://en.wikipedia.org/wiki/HTML5_video), [Audio](http://en.wikipedia.org/wiki/HTML5_audio)).
+1. Du kannst bei dem Video- oder Audiobutton die URL von einem Hoster eingeben (Youtube, Vimeo, Soundcloud und alle anderen mit oembed/opengraph-Unterstützung). Bei Videos zeigt Friendica dann ein Vorschaubild in Deinem Beitrag an, nach einem Klick öffnet sich ein eingebetter Player. Bei Soundcloud wird der Player direkt eingebunden.
+2. Wenn Du Zugang zu einem eigenen Server hast, kannst Deine Multimediadatei per FTP dort hochladen und beim Video-/Audiobutton diese URL angeben. Dann wird das Video oder die Audiodatei direkt mit einem Player in Deinem Beitrag angezeigt.
+Friendica verwendet zur Einbettung HTML5. Das bedeutet, dass je nach Browser und Betriebssystem andere Formate unterstützt werden, darunter WebM, MP4, MP3 und Ogg. Eine Tabelle findest Du bei Wikipedia ([Video](http://en.wikipedia.org/wiki/HTML5_video), [Audio](http://en.wikipedia.org/wiki/HTML5_audio)).
Zum Konvertieren von Videos in das lizenfreie Videoformat WebM gibt es unter Windows das kostenlose Programm [Xmedia-Recode](http://www.xmedia-recode.de/).
**Ist es möglich, bei mehreren Profilen verschiedene Avatare (Nutzerbilder) zu haben?**
Ja.
-Auf deiner ["Profile verwalten/editieren"-Seite](../profiles) wählst du zunächst das gewünschte Profil aus.
-Anschließend siehst du eine Seite mit allen Infos zu diesem Profil.
-Klicke nun oben auf den Link "Profilbild ändern" und lade im nächsten Fenster ein Bild von deinem PC hoch.
-Um deine privaten Daten zu schützen, wird in Beiträgen nur das Bild aus deinem öffentlichen Profil angezeigt.
+Auf Deiner ["Profile verwalten/editieren"-Seite](../profiles) wählst Du zunächst das gewünschte Profil aus.
+Anschließend siehst Du eine Seite mit allen Infos zu diesem Profil.
+Klicke nun oben auf den Link "Profilbild ändern" und lade im nächsten Fenster ein Bild von Deinem PC hoch.
+Um Deine privaten Daten zu schützen, wird in Beiträgen nur das Bild aus Deinem öffentlichen Profil angezeigt.
<a name="contacts"></a>
Wir verhindern direkte Kommunikation mit blockierten Kontakten.
Sie gehören nicht zu den Empfängern beim Versand von Beiträgen und deren Beiträge werden auch nicht importiert.
-Trotzdem werden deren Unterhaltungen mit deinen Freunden trotzdem in deinem Stream sichtbar sein.
-Wenn du einen Kontakt komplett löschst, können sie dir eine neue Freundschaftsanfrage schicken.
+Trotzdem werden deren Unterhaltungen mit Deinen Freunden in Deinem Stream sichtbar sein.
+Wenn Du einen Kontakt komplett löschst, können sie Dir eine neue Freundschaftsanfrage schicken.
Blockierte Kontakte können das nicht machen.
-Sie können nicht mit dir direkt kommunizieren, nur über Freunde.
+Sie können nicht mit Dir direkt kommunizieren, nur über Freunde.
-Ignorierte Kontakte können weiterhin Beiträge von dir erhalten.
-Deren Beiträge werden allerdings nicht importiert.
-Wie bei blockierten Beiträgen siehst du auch hier weiterhin die Kommentare dieser Person zu anderen Beiträgen deiner Freunde.
+Ignorierte Kontakte können weiterhin Beiträge von Dir erhalten.
+Deren Beiträge werden allerdings nicht importiert. W
+ie bei blockierten Beiträgen siehst Du auch hier weiterhin die Kommentare dieser Person zu anderen Beiträgen Deiner Freunde.
-Ein Plugin namens "blockem" kann installiert werden, um alle Beiträge einer bestimmten Person in deinem Stream zu verstecken bzw. zu verkürzen. Dabei werden auch Kommentare dieser Person in Beiträgen deiner Freunde blockiert.
+[Ein Plugin namens "blockem" kann installiert werden, um alle Beiträge einer bestimmten Person in Deinem Stream zu verstecken bzw. zu verkürzen.
+Dabei werden auch Kommentare dieser Person in Beiträgen Deiner Freunde blockiert.]
-Ein archivierter Kontakt bedeutet, dass Kommunikation nicht möglich ist und auch nicht versucht wird (das ist z.B. sinnvoll, wenn eine Person zu einer neuen Seite gewechselt ist und das alte Profil gelöscht hat).
+Ein archivierter Kontakt bedeutet, dass Kommunikation nicht möglich ist und auch nicht versucht wird (das ist z.B. sinnvoll, wenn eine Person zu einem neuen Server gewechselt ist und das alte Profil gelöscht hat).
Anders als beim Blockieren werden existierende Beiträge, die vor der Archivierung erstellt wurden, weiterhin angezeigt.
Ein versteckter Kontakt wird in keiner "Freundeliste" erscheinen (außer für dich).
-Trotzdem wird ein versteckter Kontakt trotzdem normal in Unterhaltungen angezeigt, was jedoch für andere Kontakte ein Hinweis sein kann, dass diese Person als versteckter Kontakt in deiner Liste ist.
+Trotzdem wird ein versteckter Kontakt normal in Unterhaltungen angezeigt - was für andere Kontakte ein Hinweis sein kann, dass diese Person als versteckter Kontakt in Deiner Liste ist.
<a name="removed"></a>
**Was passiert, wenn ein Account gelöscht ist? Ist dieser richtig gelöscht?**
-Wenn du deinen Account löschst, wird sofort der gesamte Inhalt auf deinem Server gelöscht und ein Löschbefehl an alle deine Kontakte verschickt.
-Dadurch wirst du ebenfalls aus dem globalen Verzeichnis gelöscht.
-Dieses Vorgehen setzt voraus, dass dein Profil für 24 Stunden weiterhin "teilweise" verfügbar sein wird, um eine Verbindung zu allen deinen Kontakten ermöglicht.
-Wir können also dein Profil blockieren und es so erscheinen lassen, als wären alle Daten sofort gelöscht, allerdings warten wir 24 Stunden (bzw. bis alle deine Kontakte informiert wurden), bevor wir die Daten auch physikalisch löschen.
+Wenn Du Deinen Account löschst, wird sofort der gesamte Inhalt auf Deinem Server gelöscht und ein Löschbefehl an alle Deine Kontakte verschickt.
+Dadurch wirst Du ebenfalls aus dem globalen Verzeichnis gelöscht.
+Dieses Vorgehen setzt voraus, dass Dein Profil für 24 Stunden weiterhin "teilweise" verfügbar sein wird, um eine Verbindung zu allen Deinen Kontakten ermöglicht.
+Wir können also Dein Profil blockieren und es so erscheinen lassen, als wären alle Daten sofort gelöscht, allerdings warten wir 24 Stunden (bzw. bis alle Deine Kontakte informiert wurden), bevor wir die Daten auch physikalisch löschen.
<a name="hashtag"></a>
2.) Die Verbreitung von Spam wäre vereinfacht (tag-Spam ist z.B. bei identi.ca ein schwerwiegendes Problem)
-3.) Der wichtigste Grund der gegen diese Technik spricht ist, dass sie eine natürliche Ausrichtung auf größere Seiten mit mehr getaggten Inhalten zur Folge hat. Dies kann z.B. aufkommen, wenn dein Netzwerk tags anstelle von anderen Kommunikationsmitteln wie Gruppen oder Foren nutzt.
+3.) Der wichtigste Grund der gegen diese Technik spricht ist, dass sie eine natürliche Ausrichtung auf größere Seiten mit mehr getaggten Inhalten zur Folge hat. Dies kann z.B. aufkommen, wenn Dein Netzwerk tags anstelle von anderen Kommunikationsmitteln wie Gruppen oder Foren nutzt.
Stattdessen bieten wir andere Mechanismen, um globale Unterhaltungen zu erreichen, dabei aber eine angemesse Basis für kleine und große Seiten zu bieten.
Hierzu gehören Foren, Gruppen und geteilte tags.
**Wie kann ich einen RSS-Feed meiner Netzwerkseite (Stream) erstellen?**
-Wenn du die Beiträge deines Accounts mit RSS teilen willst, dann kannst du einen der folgenden Links nutzen:
+Wenn Du die Beiträge Deines Accounts mit RSS teilen willst, dann kannst Du einen der folgenden Links nutzen:
-RSS-Feed deiner Beiträge
+RSS-Feed Deiner Beiträge
deineSeite.de/**dfrn_poll/profilname
https://helpers.pyxis.uberspace.de/dfrn_poll/helpers
-RSS-Feed aller Unterhaltungen auf deiner Seite
+RSS-Feed aller Unterhaltungen auf Deiner Seite
deineSeite.de/dfrn_poll/profilname/converse
**Wo finde ich Hilfe?**
-Wenn du Probleme mit deiner Friendica-Seite hast, dann kannst du die Community in der [Friendica-Support-Gruppe](https://helpers.pyxis.uberspace.de/profile/helpers) oder im [deutschen Friendica-Support-Forum](http://toktan.org/profile/wiki) fragen oder dir das [deutsche Wiki](http://wiki.toktan.org/doku.php) anschauen.
-Wenn du deinen Account nicht nutzen kannst, kannst du entweder einen [Testaccount](http://friendica.com/node/31) bzw. einen Account auf einer öffentlichen Seite ([Liste](http://dir.friendica.com/siteinfo)) nutzen, oder du wählst die Librelist-mailing-Liste.
-Wenn du die Mailing-Liste nutzen willst, schicke eine Mail an friendica AT librelist PUNKT com.
+Wenn Du Probleme mit Deiner Friendica-Seite hast, dann kannst Du die Community in der [Friendica-Support-Gruppe](https://helpers.pyxis.uberspace.de/profile/helpers) oder im [deutschen Friendica-Support-Forum](http://toktan.org/profile/wiki) fragen oder Dir das [deutsche Wiki](http://wiki.toktan.org/doku.php) anschauen.
+Wenn Du Deinen Account nicht nutzen kannst, kannst Du entweder einen [Testaccount](http://friendica.com/node/31) bzw. einen Account auf einer öffentlichen Seite ([Liste](http://dir.friendica.com/siteinfo)) nutzen, oder Du wählst die Librelist-mailing-Liste.
+Wenn Du die Mailing-Liste nutzen willst, schicke eine Mail an friendica AT librelist PUNKT com.
-Wenn du ein Theme-Entwickler bist, wirst du in diesem Forum Hilfe finden: [Friendica Theme Developers](https://friendica.eu/profile/ftdevs).
-Desweiteren gibt es ein Forum, das sich UI/UX Problemen widmet [UX Watchdogs](https://fc.oscp.info/profile/ux-watchdogs).
+Wenn Du ein Theme-Entwickler bist, wirst Du in diesem Forum Hilfe finden: [Friendica Theme Developers](https://friendica.eu/profile/ftdevs).
Admin
--------
Ja, das ist möglich.
Es ist allerdings nicht möglich, eine Datenbank durch zwei Domains zu nutzen.
-Solange du deine .htconfig.php allerdings so einrichtest, dass das System nicht versucht, eine Installation durchzuführen, kannst du die richtige Config-Datei in include/$hostname/.htconfig.php hinterlegen.
+Solange Du Deine .htconfig.php allerdings so einrichtest, dass das System nicht versucht, eine Installation durchzuführen, kannst Du die richtige Config-Datei in include/$hostname/.htconfig.php hinterlegen.
Alle Cache-Aspekte und der Zugriffsschutz können pro Instanz konfiguriert werden.
<a name="sources"></a>
**Wo kann ich den Quellcode von Friendica, Addons und Themes finden?**
Du kannst den Friendica-Quellcode [hier](https://github.com/friendica/friendica) finden.
-Dort findest du immer die aktuellste stabile Version von Friendica.
+Dort findest Du immer die aktuellste stabile Version von Friendica.
+Der Quellcode von Friendica Red ist [hier](https://github.com/friendica/red) zu finden.
-Addons findest du auf [dieser Seite](https://github.com/friendica/friendica-addons).
+Addons findest Du auf [dieser Seite](https://github.com/friendica/friendica-addons).
-Wenn du neue Themen suchst, findest du sie auf [Friendica-Themes.com](http://friendica-themes.com/)
+Wenn Du neue Themen suchst, findest Du sie auf [Friendica-Themes.com](http://friendica-themes.com/).
* [Zur Startseite der Hilfe](help)
-Friendica lässt dich auch Foren und/oder Prominenten-Seiten erstellen.
+In Friendica kannst Du auch Foren und/oder Prominenten-Seiten erstellen.
-Jede Seite in Friendica hat einen einzigartigen Spitznamen.
-Das gilt für alle Seiten, unabhängig davon, ob es sich um normale Profile oder Forenseite handelt.
+Jede Seite in Friendica hat einen einmaligen Spitznamen.
+Das gilt für alle Seiten, unabhängig davon, ob es sich um normale Profile oder Forenseiten handelt.
-Das Erste, was du machen musst, um ein neues Forum zu kreieren ist, einen neuen Account zu erstellen.
+Das Erste, was Du machen musst, um ein neues Forum zu kreieren, ist einen neuen Account zu erstellen.
Bitte beachte, dass der Seitenadministrator die Registrierung neuer Accounts sperren oder an Bedingungen knüpfen kann.
-Wenn du einen zweiten Account in einem System erstellst und die gleiche Email-Adresse oder den gleichen OpenID-Account nutzt, kannst du dich zukünftig nur noch mit deinem Spitznamen anmelden.
+Wenn Du einen zweiten Account in einem System erstellst und die gleiche Email-Adresse oder den gleichen OpenID-Account nutzt, kannst Du Dich zukünftig nur noch mit Deinem Spitznamen anmelden.
Gehe im neuen Account auf die "Einstellungs"-Seite und dort am Ende der Seite auf "Erweiterte Konto-/Seitentyp-Einstellungen".
-Normalerweise nutzt du "Normales Konto" für einen normalen, persönlichen Account.
-Das ist die Standardeinstellung. Gruppenseiten bieten die Möglichkeit, Leute als Freund/Fan ohne Kontaktbestätigung zuzulassen.
+Normalerweise nutzt Du "Normales Konto" für einen normalen, persönlichen Account.
+Das ist die Standardeinstellung.
+Gruppenseiten bieten die Möglichkeit, Leute als Freund/Fan ohne Kontaktbestätigung zuzulassen.
-Die Auswahl der Einstellung, die du wählst, hängt davon ab, wie du mit anderen Leuten auf deiner Seite interagieren willst.
+Die Auswahl der Einstellung, die Du wählst, hängt davon ab, wie Du mit anderen Leuten auf Deiner Seite interagieren willst.
Die "Marktschreier"-Einstellung (Soapbox) lässt den Seitenbesitzer die gesamte Kommunikation kontrollieren.
-Alles was du schreibst, geht an alle Seitennutzer, aber es gibt keine Möglichkeit, zu interagieren.
+Alles was Du schreibst, geht an alle Seitennutzer, aber es gibt keine Möglichkeit, zu interagieren.
Diese Seite wird normalerweise für Ankündigungen oder die Kommunikation von Gemeinschaften genutzt.
Die normalste Einstellung ist das "Forum-/Promi-Konto".
Diese erstellt eine Gruppenseite, in der alle Mitglieder frei miteinander interagieren können.
-Der "Automatische Freunde Seite"-Account ist typischerweise für persönliche Profile, bei denen du alle Freundschaftsanfragen automatisch bestätigen willst.
+Der "Automatische Freunde Seite"-Account ist typischerweise für persönliche Profile, bei denen Du alle Freundschaftsanfragen automatisch bestätigen willst.
**Multiple Foren verwalten**
-Wir schlagen vor, dass du ein Gruppenforum mit der gleichen Email-Adresse und dem gleichen Passwort wie bei deinem normalen Account nutzt.
-Wenn du das machst, findest du einen neuen "Verwalten"-Link im Hauptmenü, das dir hilft, einfach zwischen den Identitäten zu wechseln.
-Du musst das nicht machen, die Alternative ist allerdings, dich immer wieder aus- und wieder einzuloggen.
-Und das kann umständlich sein, wenn du mehrere verschiedene Foren/Identitäten verwaltest.
+Wir schlagen vor, dass Du ein Gruppenforum mit der gleichen Email-Adresse und dem gleichen Passwort wie bei Deinem normalen Account nutzt.
+Wenn Du das machst, findest Du einen neuen "Verwalten"-Link in der Menüleiste, über den Du einfach zwischen den Identitäten wechseln kannst.
+Du musst das nicht machen, die Alternative ist allerdings, Dich immer wieder aus- und wieder einzuloggen.
+Und das kann umständlich sein, wenn Du mehrere verschiedene Foren/Identitäten verwaltest.
-Du kannst ebenso jemanden wählen, der dein Forum verwaltet.
-Mach das, indem du die [Delegierungs-Setup-Seite](delegate) besuchst.
-Dort wird dir eine Liste an "Potentiellen Bevollmächtigen" angezeigt.
-Die Auswahl einer oder mehrerer Personen gibt diesen die Möglichkeit, dein Forum zu verwalten.
-Sie können Kontakte, Profile und alle Inhalte deines Accounts/deiner Seite bearbeiten.
+Du kannst ebenso jemanden wählen, der Dein Forum verwaltet.
+Mach das, indem Du die [Delegations-Setup-Seite](/delegate) besuchst.
+Dort wird Dir eine Liste an "Potentiellen Bevollmächtigen" angezeigt.
+Die Auswahl einer oder mehrerer Personen gibt diesen die Möglichkeit, Dein Forum zu verwalten.
+Sie können Kontakte, Profile und alle Inhalte Deines Accounts/deiner Seite bearbeiten.
Bitte nutze diese Einstellung mit Vorsicht.
-Delegierte haben jedoch keine Möglichkeit, grundlegende Account-Einstellungen wie das Passwort oder den Seitentypen zu ändern bzw. den Account zu löschen.
+Delegierte haben allerdings keine Möglichkeit, grundlegende Account-Einstellungen wie das Passwort oder den Seitentypen zu ändern bzw. den Account zu löschen.
**Beiträge auf Community-Foren**
-Wenn du Mitglied eines Community-Forums bist, kannst du das Forum in einem Beitrag hinzufügen/erwähnen, wenn du den @-Tag nutzt.
-Zum Beispiel würde @Fahrrad deinen Beitrag neben den sonst ausgewählten Nutzern an alle Nutzer schicken, die in der Gruppe "Fahrrad" sind.
-Wenn dein Beitrag privat ist, musst du diese Gruppe explizit in den Zugriffsrechten des Beitrags auswählen **und** sie mit dem @-Tag erwähnen (was den Beitrag auf die Gruppenmitglieder erweitert).
+Wenn Du Mitglied eines Community-Forums bist, kannst Du das Forum in einem Beitrag hinzufügen/erwähnen, wenn Du den @-Tag nutzt.
+Zum Beispiel würde @Fahrrad Deinen Beitrag neben den sonst ausgewählten Nutzern an alle Nutzer schicken, die in der Gruppe "Fahrrad" sind.
+Wenn Dein Beitrag privat ist, musst Du diese Gruppe explizit in den Zugriffsrechten des Beitrags auswählen **und** sie mit dem @-Tag erwähnen (was den Beitrag auf die Gruppenmitglieder erweitert).
Du kannst außerdem via "Wall zu Wall" einen Beitrag auf der Community-Seite bzw. in dem Community-Forum erstellen.
-Kommentare, die du an ein Community-Forum schickst, werden an den Originalbeitrag weitergeleitet.
-Das Forum mit dem @-Tag zu erwähnen, leitet den Beitrag nicht weiter, da die Verteilung des Beitrages komplett vom Original-Beitragsschreiber kontrolliert wird.
+Kommentare, die Du an ein Community-Forum schickst, werden dem Originalbeitrag hinzugefügt.
+Ein weiteres Forum mit dem @-Tag zu erwähnen, leitet den Beitrag nicht an dieses weiter, da die Verteilung der Kommentare komplett vom Originalbeitrag bestimmt wird.
- <a href="http://helpers.pyxis.uberspace.de/profile/helpers">Friendica Support</a> - Probleme? Dann ist das der Platz, um zu fragen!
-<!--- <a href="https://letstalk.pyxis.uberspace.de/profile/letstalk">Let's Talk</a> eine Gruppe, um Leute und Gruppen mit gleichen Interessen zu finden
-
-- <a href="http://newzot.hydra.uberspace.de/profile/newzot">Local Friendica</a> eine Seite für lokale Friendica-Gruppen</a> -->
-
-
**Dokumentation**
- <a href="help/Connectors">Zu weiteren Netzwerken verbinden</a>
* [Zur Startseite der Hilfe](help)
Hier siehst Du das globale Verzeichnis.
-Wenn Du Dich mal verirrt hast, kannst Du <a href = "help/Quick-Start-groupsandpages">diesen Link klicken</a> und wieder hierher kommen.
+Wenn Du Dich mal verirrt hast, kannst Du diesen Link klicken und wieder hierher kommen.
-Auf dieser Seite findest Du eine Zusammenstellung von Gruppen, Foren und Promi-Seiten. Gruppen sind keine realen Personen.
+Auf dieser Seite findest Du eine Zusammenstellung von Gruppen, Foren und Promi-Seiten.
+Gruppen sind keine realen Personen.
Sich mit diesen zu verbinden ist, als wenn man jemanden auf Facebook "liked" ("gefällt mir") oder wenn man sich in einem Forum anmeldet.
-Es gibt keinen Anlass zur Unsicherheit, ob Du Dich einfach so mit einer Gruppe verbinden kannst oder nicht, da es sich nicht um Personen handelt.
+Du musst nicht unsicher sein, ob Du jemandem zu nahe trittst, wenn Du Dich so ohne weiteres mit einer Gruppe verbindest; es handelt sich eben nicht um reale Personen.
Wenn Du Dich mit einer Gruppe verbindest, erscheinen alle Nachrichten der Gruppe in Deinem "Netzwerk"-Tab.
Du kannst diese Beiträge kommentieren oder selbst in der Gruppe schreiben, ohne eines der Gruppenmitglieder persönlich hinzuzufügen.
Erste Schritte...
-=================
+==========
* [Zur Startseite der Hilfe](help)
Sobald dies geschehen ist, schaust Du auf die Netzwerkseite Deines Profils.
Klicke auf den Reiter "Pinnwand".
+
Hier sieht es ein wenig wie auf (D)einer Facebook-Seite aus.
Du findest hier alle Deine Statusmeldungen und Nachrichten Deiner Freunde, die direkt auf Deine "Pinnwand" ("Wall") geschrieben haben.
Um Deinen Status einzutragen, klicke einfach auf die Box oben, in der "Teilen" steht.
Außerdem kannst Du hier eintragen, wo Du gerade bist.
Wenn Du Deinen Beitrag ("Post") geschrieben hast, kannst Du auf das "Schloss"-Symbol klicken und festlegen, wer Deinen Beitrag sehen kann.
-Wenn Du dieses Symbol nicht anklickst, ist Dein Beitrag öffentlich.
+Wenn Du dieses Symbol nicht anklickst, ist Dein Beitrag öffentlich, bzw. es werden deine Grundeinstellungen verwendet, wenn diese nicht öffentlich sind.
+
Ein öffentlicher Beitrag ist sichbar für
<ul>
<li>Besucher Deines Profils</li>
* [Zur Startseite der Hilfe](help)
-Hier siehst Du die Kontaktvorschläge.
-Wenn Du Dich mal verirrt hast, kannst Du <a href="help/Quick-Start-makenewfriends">diesen Link klicken</a> und wieder hierher kommen.
+Hier siehst Du die Kontaktvorschläge.
+Wenn Du Dich mal verirrt hast, kannst Du diesen Link klicken und wieder hierher kommen.
-Diese Seite funktioniert in etwa wie die Kontaktvorschläge in Facebook.
+Diese Seite funktioniert in etwa wie die Seite für Kontaktvorschläge in Facebook.
Jeder auf dieser Liste hat zugestimmt, als Kontaktvorschlag zu erscheinen.
-Das bedeutet, das sie Anfragen meist nicht ablehnen, da sie neue Leute kennenlernen wollen.
+Das bedeutet, das sie Anfragen meist nicht ablehnen, da sie neue Leute kennenlernen wollen.
-Siehst Du jemanden, der Dir interessant erscheint? Klicke auf den "Verbinden"-Knopf beim Foto.
+Siehst Du jemanden, der Dir interessant erscheint?
+Klicke auf den "Verbinden"-Knopf beim Foto.
Als nächstes kommst Du zur Seite "Freundschafts-/Kontaktanfrage".
Fülle das Formular wie vorgegeben aus und trage optional eine kleine Notiz ein.
Nun musst Du nur noch auf die Bestätigung warten.
-Beachte dabei, dass es sich um reale Personen handelt und es somit etwas dauern kann.
+Beachte dabei, dass es sich um reale Personen handelt und es somit etwas dauern kann.
Jetzt, nachdem Du jemanden hinzugefügt hast, weißt Du vielleicht nicht mehr, wie Du zurückkommst.
Klicke einfach auf den Link oben auf dieser Seite und Du gelangst zur Seite mit den Kontaktvorschlägen zurück, um weitere Personen hinzuzufügen.
-Du willst nicht einfach Personen hinzufügen, die Du nicht kennst? Kein Problem - an dieser Stelle kommen wir zu den <a href="help/Quick-Start-groupsandpages">Gruppen und Seiten</a>.
+Du willst nicht einfach Personen hinzufügen, die du nicht kennst?
+Kein Problem - an dieser Stelle kommen wir zu den <a href="help/Quick-Start-groupsandpages">Gruppen und Seiten</a>.
<iframe src="suggest" width="950" height="600"></iframe>
* [Zur Startseite der Hilfe](help)
Dies ist Dein "Netzwerk"-Tab.
-Wenn Du Dich mal verirrt hast, kannst Du <a href="help/Quick-Start-network">diesen Link klicken</a>, um wieder hierher zu kommen.
+Wenn Du Dich mal verirrt hast, kannst Du diesen Link klicken, um wieder hierher zu kommen.
Diese Seite ist ein wenig wie die News-Seite in Facebook oder der Stream in Diaspora.
Hier findest Du alle Beiträge Deiner Kontakte, Gruppen und Feeds, die Du eingetragen hast.
-Wenn Du neu bist, siehst Du hier noch nichts, falls Du an Deinem Status im letzten Schritt noch nichts geändert haben solltest.
+Wenn Du neu bist, siehst Du hier noch nichts, falls Du an Deinem Status im letzten Schritt noch nichts geändert haben solltest.
Wenn Du bereits ein paar Freunde gefunden hast, so findest Du hier ihre Beiträge.
-Du kannst ihre Beiträge von hier aus kommentieren, mitteilen, dass Du den Beitrag magst oder ablehnst (Daumen hoch, Daumen runter) oder die Profile durch einen Klick auf deren Namen besuchen und dort auf deren "Pinnwand" ("Wall") Nachrichten schreiben.
+Du kannst ihre Beiträge von hier aus kommentieren, mitteilen, dass Du den Beitrag magst oder ablehnst (Daumen hoch, Daumen runter) oder die Profile durch einen Klick auf deren Namen besuchen und dort auf deren "Pinnwand" ("Wall") Nachrichten schreiben.
Nun wollen wir diese Seite mit Inhalt füllen.
-Der erste Schritt ist es, Leute <a href="help/Quick-Start-makingnewfriends">zu Deinem Account hinzuzufügen</a>.
+Der erste Schritt ist es, <a href="help/Quick-Start-makingnewfriends">Leute zu Deinem Account hinzuzufügen</a>.
<iframe src="network" width="950" height="600"></iframe>
define ( 'PROBE_NORMAL', 0);
define ( 'PROBE_DIASPORA', 1);
-function probe_url($url, $mode = PROBE_NORMAL) {
+function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
require_once('include/email.php');
$result = array();
$vcard['fn'] = trim(unxmlify($author->get_email()));
if(strpos($vcard['fn'],'@') !== false)
$vcard['fn'] = substr($vcard['fn'],0,strpos($vcard['fn'],'@'));
+
$email = unxmlify($author->get_email());
if(! $profile && $author->get_link())
$profile = trim(unxmlify($author->get_link()));
$vcard['photo'] = $elems['link'][0]['attribs']['']['href'];
}
}
+ // Fetch fullname via poco:displayName
+ $pocotags = $feed->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author');
+ if ($pocotags) {
+ $elems = $pocotags[0]['child']['http://portablecontacts.net/spec/1.0'];
+ if (isset($elems["displayName"]))
+ $vcard['fn'] = $elems["displayName"][0]["data"];
+ if (isset($elems["preferredUsername"]))
+ $vcard['nick'] = $elems["preferredUsername"][0]["data"];
+ }
}
else {
$item = $feed->get_item(0);
$vcard['fn'] = $url;
if (($notify != "") AND ($poll != "")) {
- $baseurl = matching($notify, $poll);
+ $baseurl = matching(normalise_link($notify), normalise_link($poll));
- $baseurl2 = matching($baseurl, $profile);
+ $baseurl2 = matching($baseurl, normalise_link($profile));
if ($baseurl2 != "")
$baseurl = $baseurl2;
}
if (($baseurl == "") AND ($notify != ""))
- $baseurl = matching($profile, $notify);
+ $baseurl = matching(normalise_link($profile), normalise_link($notify));
if (($baseurl == "") AND ($poll != ""))
- $baseurl = matching($profile, $poll);
+ $baseurl = matching(normalise_link($profile), normalise_link($poll));
$baseurl = rtrim($baseurl, "/");
logger('probe_url: ' . print_r($result,true), LOGGER_DEBUG);
- // Trying if it maybe a diaspora account
- if (($result['network'] == NETWORK_FEED) OR ($result['addr'] == "")) {
- require_once('include/bbcode.php');
- $address = GetProfileUsername($url, "", true);
- $result2 = probe_url($address, $mode);
- if ($result2['network'] != "")
- $result = $result2;
+ if ($level == 1) {
+ // Trying if it maybe a diaspora account
+ if (($result['network'] == NETWORK_FEED) OR ($result['addr'] == "")) {
+ require_once('include/bbcode.php');
+ $address = GetProfileUsername($url, "", true);
+ $result2 = probe_url($address, $mode, ++$level);
+ if ($result2['network'] != "")
+ $result = $result2;
+ }
+
+ // Maybe it's some non standard GNU Social installation (Single user, subfolder or no uri rewrite)
+ if (($result['network'] == NETWORK_FEED) AND ($result['baseurl'] != "") AND ($result['nick'] != "")) {
+ $addr = $result['nick'].'@'.str_replace("http://", "", $result['baseurl']);
+ $result2 = probe_url($addr, $mode, ++$level);
+ if (($result2['network'] != "") AND ($result2['network'] != NETWORK_FEED))
+ $result = $result2;
+ }
}
Cache::set("probe_url:".$mode.":".$url,serialize($result));
$search = $_REQUEST['query'];
}
+ logger("Searching for ".$search." - type ".$type, LOGGER_DEBUG);
if ($search!=""){
$sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";
$r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, forum FROM `contact`
WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 AND `notify` != ''
+ AND NOT (`network` IN ('%s', '%s'))
$sql_extra2
ORDER BY `name` ASC ",
- intval(local_user())
+ intval(local_user()),
+ dbesc(NETWORK_OSTATUS), dbesc(NETWORK_STATUSNET)
);
}
elseif($type == 'm') {
unset($status["user"]["uid"]);
unset($status["user"]["self"]);
- // 'geo' => array('type' => 'Point',
- // 'coordinates' => array((float) $notice->lat,
- // (float) $notice->lon));
+ if ($item["coord"] != "") {
+ $coords = explode(' ',$item["coord"]);
+ if (count($coords) == 2) {
+ $status["geo"] = array('type' => 'Point',
+ 'coordinates' => array((float) $coords[0],
+ (float) $coords[1]));
+ }
+ }
$ret[] = $status;
};
} else
$Text = bbcode($Text, $preserve_nl, false, 4);
+ // mask some special HTML chars from conversation to markdown
+ $Text = str_replace(array('<','>','&'),array('&_lt_;','&_gt_;','&_amp_;'),$Text);
+
// If a link is followed by a quote then there should be a newline before it
// Maybe we should make this newline at every time before a quote.
$Text = str_replace(array("</a><blockquote>"), array("</a><br><blockquote>"), $Text);
// Now convert HTML to Markdown
$Text = new HTML_To_Markdown($Text);
+ // unmask the special chars back to HTML
+ $Text = str_replace(array('&_lt_;','&_gt_;','&_amp_;'),array('<','>','&'),$Text);
+
$a->save_timestamp($stamp1, "parser");
// Libertree has a problem with escaped hashtags.
return t('less than a second ago');
}
+ /*
$time_append = '';
if ($etime >= 86400) {
$time_append = ' ('.$localtime.')';
}
+ */
$a = array( 12 * 30 * 24 * 60 * 60 => array( t('year'), t('years')),
30 * 24 * 60 * 60 => array( t('month'), t('months')),
// translators - e.g. 22 hours ago, 1 minute ago
if(! $format)
$format = t('%1$d %2$s ago');
- return sprintf( $format,$r, (($r == 1) ? $str[0] : $str[1])).$time_append;
+ return sprintf( $format,$r, (($r == 1) ? $str[0] : $str[1]));
}
}
}}
if($params['type'] == NOTIFY_CONFIRM) {
if ($params['verb'] == ACTIVITY_FRIEND ){ // mutual connection
$subject = sprintf( t('[Friendica:Notify] Connection accepted'));
- $preamble = sprintf( t('\'%1$s\' has acepted your connection request at %2$s'), $params['source_name'], $sitename);
+ $preamble = sprintf( t('\'%1$s\' has accepted your connection request at %2$s'), $params['source_name'], $sitename);
$epreamble = sprintf( t('%2$s has accepted your [url=%1$s]connection request[/url].'),
$itemlink,
'[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]');
$itemlink = $params['link'];
} else { // ACTIVITY_FOLLOW
$subject = sprintf( t('[Friendica:Notify] Connection accepted'));
- $preamble = sprintf( t('\'%1$s\' has acepted your connection request at %2$s'), $params['source_name'], $sitename);
+ $preamble = sprintf( t('\'%1$s\' has accepted your connection request at %2$s'), $params['source_name'], $sitename);
$epreamble = sprintf( t('%2$s has accepted your [url=%1$s]connection request[/url].'),
$itemlink,
'[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]');
require_once('include/files.php');
require_once('include/text.php');
require_once('include/email.php');
-//require_once('include/ostatus_conversation.php');
require_once('include/threads.php');
require_once('include/socgraph.php');
require_once('include/plaintext.php');
// default permissions - anonymous user
- $sql_extra = " AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' ";
+ $sql_extra = " AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' ";
$r = q("SELECT `contact`.*, `user`.`uid` AS `user_uid`, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags`
FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
// Include answers to status.net posts in pubsub feeds
if($forpubsub) {
- $sql_post_table = "INNER JOIN `thread` ON `thread`.`iid` = `item`.`parent` ";
- $visibility = sprintf("AND (`item`.`parent` = `item`.`id`) OR (`item`.`network` = '%s' AND `thread`.`network`='%s')",
- dbesc(NETWORK_DFRN), dbesc(NETWORK_OSTATUS));
+ $sql_post_table = "INNER JOIN `thread` ON `thread`.`iid` = `item`.`parent`
+ LEFT JOIN `item` AS `thritem` ON `thritem`.`uri`=`item`.`thr-parent` AND `thritem`.`uid`=`item`.`uid`";
+ $visibility = sprintf("AND (`item`.`parent` = `item`.`id`) OR (`item`.`network` = '%s' AND ((`thread`.`network`='%s') OR (`thritem`.`network` = '%s')))",
+ dbesc(NETWORK_DFRN), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_OSTATUS));
$date_field = "`received`";
$sql_order = "`item`.`received` DESC";
} else {
// but for now let's just find any author photo
// Additionally we look for an alternate author link. On OStatus this one is the one we want.
- // Search for ostatus conversation url
$authorlinks = $item->feed->data["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["feed"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["author"][0]["child"]["http://www.w3.org/2005/Atom"]["link"];
if (is_array($authorlinks)) {
foreach ($authorlinks as $link) {
}
}
-// // Search for ostatus conversation url
-// $links = $item->feed->data["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["feed"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["entry"][0]["child"]["http://www.w3.org/2005/Atom"]["link"];
-//
-// if (is_array($links)) {
-// foreach ($links as $link) {
-// $conversation = array_shift($link["attribs"]);
-//
-// if ($conversation["rel"] == "ostatus:conversation") {
-// $res["ostatus_conversation"] = ostatus_convert_href($conversation["href"]);
-// logger('get_atom_elements: found conversation url '.$res["ostatus_conversation"]);
-// //} elseif ($conversation["rel"] == "alternate") {
-// // $res["plink"] = $conversation["href"];
-// // logger('get_atom_elements: found plink '.$res["plink"]);
-// }
-// };
-// }
-
if (isset($contact["network"]) AND ($contact["network"] == NETWORK_FEED) AND $contact['fetch_further_information']) {
$preview = "";
$arr['plink'] = ostatus_convert_href($arr['uri']);
}
-// // if an OStatus conversation url was passed in, it is stored and then
-// // removed from the array.
-// $ostatus_conversation = null;
-
-// if (isset($arr["ostatus_conversation"])) {
-// $ostatus_conversation = $arr["ostatus_conversation"];
-// unset($arr["ostatus_conversation"]);
-// }
-
if(x($arr, 'gravity'))
$arr['gravity'] = intval($arr['gravity']);
elseif($arr['parent-uri'] === $arr['uri'])
}
}
+ // If there is no guid then take the same guid that was taken before for the same plink
+ if ((trim($arr['guid']) == "") AND (trim($arr['plink']) != "") AND (trim($arr['network']) != "")) {
+ logger('item_store: checking for an existing guid for plink '.$arr['plink'], LOGGER_DEBUG);
+ $r = q("SELECT `guid`, `uri` FROM `guid` WHERE `plink` = '%s' AND `network` = '%s' LIMIT 1",
+ dbesc(trim($arr['plink'])), dbesc(trim($arr['network'])));
+
+ if(count($r)) {
+ $arr['guid'] = $r[0]["guid"];
+ logger('item_store: found guid '.$arr['guid'].' for plink '.$arr['plink'], LOGGER_DEBUG);
+
+ if ($r[0]["uri"] != $arr['uri'])
+ logger('Different uri for same guid: '.$arr['uri'].' and '.$r[0]["uri"].' - this shouldnt happen!', LOGGER_DEBUG);
+ }
+ }
+
// Shouldn't happen but we want to make absolutely sure it doesn't leak from a plugin.
// Deactivated, since the bbcode parser can handle with it - and it destroys posts with some smileys that contain "<"
//if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
intval($current_post)
);
- // Complete ostatus threads
- //if ($ostatus_conversation)
- // complete_conversation($current_post, $ostatus_conversation);
-
$arr['id'] = $current_post;
$arr['parent'] = $parent_id;
$arr['allow_cid'] = $allow_cid;
function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) {
if ($contact['network'] === NETWORK_OSTATUS) {
if ($pass < 2) {
+ // Test - remove before flight
+ //$tempfile = tempnam(get_temppath(), "ostatus");
+ //file_put_contents($tempfile, $xml);
+
logger("Consume OStatus messages ", LOGGER_DEBUG);
ostatus_import($xml,$importer,$contact, $hub);
}
return;
}
- // Test - remove before flight
-// if ($contact['network'] === NETWORK_OSTATUS) {
-// $tempfile = tempnam(get_temppath(), "ostatus");
-// file_put_contents($tempfile, $xml);
-// }
-
$feed = new SimplePie();
$feed->set_raw_data($xml);
if($datedir)
$o .= "<$tag>\r\n";
- $o .= "<name>$name</name>\r\n";
- $o .= "<uri>$uri</uri>\r\n";
- $o .= '<link rel="photo" type="image/jpeg" media:width="' . $w . '" media:height="' . $h . '" href="' . $photo . '" />' . "\r\n";
- $o .= '<link rel="avatar" type="image/jpeg" media:width="' . $w . '" media:height="' . $h . '" href="' . $photo . '" />' . "\r\n";
+ $o .= "\t<name>$name</name>\r\n";
+ $o .= "\t<uri>$uri</uri>\r\n";
+ $o .= "\t".'<link rel="photo" type="image/jpeg" media:width="' . $w . '" media:height="' . $h . '" href="' . $photo . '" />' . "\r\n";
+ $o .= "\t".'<link rel="avatar" type="image/jpeg" media:width="' . $w . '" media:height="' . $h . '" href="' . $photo . '" />' . "\r\n";
+
+ if ($tag == "author") {
+ $r = q("SELECT `profile`.`locality`, `profile`.`region`, `profile`.`country-name`,
+ `profile`.`name`, `profile`.`pub_keywords`, `profile`.`about`,
+ `profile`.`homepage`,`contact`.`nick` FROM `profile`
+ INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid`
+ INNER JOIN `user` ON `user`.`uid` = `profile`.`uid`
+ WHERE `profile`.`is-default` AND `contact`.`self` AND
+ NOT `user`.`hidewall` AND `contact`.`nurl`='%s'",
+ dbesc(normalise_link($uri)));
+ if ($r) {
+ $location = '';
+ if($r[0]['locality'])
+ $location .= $r[0]['locality'];
+ if($r[0]['region']) {
+ if($location)
+ $location .= ', ';
+ $location .= $r[0]['region'];
+ }
+ if($r[0]['country-name']) {
+ if($location)
+ $location .= ', ';
+ $location .= $r[0]['country-name'];
+ }
+
+ $o .= "\t<poco:preferredUsername>".xmlify($r[0]["nick"])."</poco:preferredUsername>\r\n";
+ $o .= "\t<poco:displayName>".xmlify($r[0]["name"])."</poco:displayName>\r\n";
+ $o .= "\t<poco:note>".xmlify($r[0]["about"])."</poco:note>\r\n";
+ $o .= "\t<poco:address>\r\n";
+ $o .= "\t\t<poco:formatted>".xmlify($location)."</poco:formatted>\r\n";
+ $o .= "\t</poco:address>\r\n";
+ $o .= "\t<poco:urls>\r\n";
+ $o .= "\t<poco:type>homepage</poco:type>\r\n";
+ $o .= "\t\t<poco:value>".xmlify($r[0]["homepage"])."</poco:value>\r\n";
+ $o .= "\t\t<poco:primary>true</poco:primary>\r\n";
+ $o .= "\t</poco:urls>\r\n";
+ }
+ }
call_hooks('atom_author', $o);
$o .= '<link rel="alternate" type="text/html" href="' . xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']) . '" />' . "\r\n";
+ $o .= '<status_net notice_id="'.$item['id'].'"></status_net>'."\r\n";
+
if($comment)
$o .= '<dfrn:comment-allow>' . intval($item['last-child']) . '</dfrn:comment-allow>' . "\r\n";
$o .= '<category scheme="X-DFRN:' . xmlify($t[0]) . ':' . xmlify($t[1]) . '" term="' . xmlify($t[2]) . '" />' . "\r\n";
}
+ // To-Do:
+ // To support these elements, the API needs to be enhanced
//$o .= '<link rel="ostatus:conversation" href="'.xmlify($a->get_baseurl().'/display/'.$owner['nickname'].'/'.$item['parent']).'"/>'."\r\n";
- //$o .= '<link rel="self" type="application/atom+xml" href="'.xmlify($a->get_baseurl().'/api/statuses/show/'.$item['id'].'.atom').'"/>'."\r\n";
- //$o .= '<link rel="edit" type="application/atom+xml" href="'.xmlify($a->get_baseurl().'/api/statuses/show/'.$item['id'].'.atom').'"/>'."\r\n";
+ //$o .= "\t".'<link rel="self" type="application/atom+xml" href="'.xmlify($a->get_baseurl().'/api/statuses/show/'.$item['id'].'.atom').'"/>'."\r\n";
+ //$o .= "\t".'<link rel="edit" type="application/atom+xml" href="'.xmlify($a->get_baseurl().'/api/statuses/show/'.$item['id'].'.atom').'"/>'."\r\n";
$o .= item_get_attachment($item);
$parent = $items[0];
+ $thr_parent = q("SELECT `network` FROM `item` WHERE `uri` = '%s' AND `uid` = %d",
+ dbesc($target_item["thr-parent"]), intval($target_item["uid"]));
+
+ logger('Parent is '.$parent['network'].'. Thread parent is '.$thr_parent[0]['network'], LOGGER_DEBUG);
+
// This is IMPORTANT!!!!
// We will only send a "notify owner to relay" or followup message if the referenced post
$target_item['deny_cid'].$target_item['deny_gid']) == 0))
$push_notify = true;
- if ($parent['network'] == NETWORK_OSTATUS) {
- logger('Parent is OStatus', LOGGER_DEBUG);
+ // We notify Friendica users in the thread when it is an OStatus thread.
+ // Hopefully this transfers the messages to the other Friendica servers. (Untested)
+ if (($thr_parent AND ($thr_parent[0]['network'] == NETWORK_OSTATUS)) OR ($parent['network'] == NETWORK_OSTATUS)) {
$push_notify = true;
- // Send a salmon notification to every person we mentioned in the post
- // To-Do: Send a Salmon to every Friendica user in that thread
- $arr = explode(',',$target_item['tag']);
- foreach($arr as $x) {
- logger('Checking tag '.$x, LOGGER_DEBUG);
- $matches = null;
- if(preg_match('/@\[url=([^\]]*)\]/',$x,$matches)) {
- $probed_contact = probe_url($matches[1]);
- if ($probed_contact["notify"] != "") {
- logger('scrape data for slapper: '.print_r($probed_contact, true));
+ if ($parent["network"] == NETWORK_OSTATUS) {
+ $r = q("SELECT `author-link` FROM `item` WHERE `parent` = %d AND `author-link` != '%s'",
+ intval($target_item["parent"]), dbesc($owner['url']));
+ foreach($r as $parent_item) {
+ $probed_contact = probe_url($parent_item["author-link"]);
+ if (($probed_contact["notify"] != "") AND ($probed_contact["network"] == NETWORK_DFRN)) {
+ logger('Notify Friendica user '.$probed_contact["url"].': '.$probed_contact["notify"]);
$url_recipients[$probed_contact["notify"]] = $probed_contact["notify"];
}
}
}
-/*
- // Check if the recipient isn't in your contact list, try to slap it
- // Not sure if it is working or not.
- $r = q("SELECT `url` FROM `contact` WHERE `id` = %d", $parent['contact-id']);
- if (count($r)) {
-
- $thrparent = q("SELECT `author-link` FROM `item` WHERE `uri` = '%s'", dbesc($target_item["thr-parent"]));
- if (count($thrparent) AND (normalise_link($r[0]["url"]) != normalise_link($thrparent[0]["author-link"]))) {
- $probed_contact = probe_url($thrparent[0]["author-link"]);
- if ($probed_contact["notify"] != "") {
- logger('scrape data for slapper: '.print_r($probed_contact, true));
- $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"];
- }
- }
- }
-*/
if (count($url_recipients))
logger("url_recipients ".print_r($url_recipients,true));
}
$conversant_str = dbesc(implode(', ',$conversants));
}
+ // If the thread parent is OStatus then do some magic to distribute the messages.
+ // We have not only to look at the parent, since it could be a Friendica thread.
+ if (($thr_parent AND ($thr_parent[0]['network'] == NETWORK_OSTATUS)) OR ($parent['network'] == NETWORK_OSTATUS)) {
+
+ // Send a salmon notification to every person we mentioned in the post
+ $arr = explode(',',$target_item['tag']);
+ foreach($arr as $x) {
+ //logger('Checking tag '.$x, LOGGER_DEBUG);
+ $matches = null;
+ if(preg_match('/@\[url=([^\]]*)\]/',$x,$matches)) {
+ $probed_contact = probe_url($matches[1]);
+ if ($probed_contact["notify"] != "") {
+ logger('Notify mentioned user '.$probed_contact["url"].': '.$probed_contact["notify"]);
+ $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"];
+ }
+ }
+ }
+ }
+
$r = q("SELECT * FROM `contact` WHERE `id` IN ( $conversant_str ) AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0");
if(count($r))
$recipients_relocate = q("SELECT * FROM contact WHERE uid = %d AND self = 0 AND network = '%s'" , intval($uid), NETWORK_DFRN);
unset($photos);
} else {
+
+ $slap = atom_entry($target_item,'html',null,$owner,false);
+
if($followup) {
foreach($items as $item) { // there is only one item
if(! $item['parent'])
continue;
if($item['id'] == $item_id) {
logger('notifier: followup: item: ' . print_r($item,true), LOGGER_DATA);
- $slap = atom_entry($item,'html',null,$owner,false);
+ //$slap = atom_entry($item,'html',null,$owner,false);
$atom .= atom_entry($item,'text',null,$owner,false);
}
}
// send additional slaps to mentioned remote tags (@foo@example.com)
- if($slap && count($url_recipients) && ($followup || $top_level) && ($public_message || $push_notify) && (! $expire)) {
+ //if($slap && count($url_recipients) && ($followup || $top_level) && ($public_message || $push_notify) && (! $expire)) {
+ if($slap && count($url_recipients) && ($public_message || $push_notify) && (!$expire)) {
if(! get_config('system','dfrn_only')) {
foreach($url_recipients as $url) {
if($url) {
if ($dom){
$xpath = new DOMXPath($dom);
$attr = "oembed";
-
$xattr = oe_build_xpath("class","oembed");
$entries = $xpath->query("//link[@type='application/json+oembed']");
foreach($entries as $e){
$txt = fetch_url($href . '&maxwidth=' . $a->videowidth);
break;
}
+ $entries = $xpath->query("//link[@type='text/json+oembed']");
+ foreach($entries as $e){
+ $href = $e->getAttributeNode("href")->nodeValue;
+ $txt = fetch_url($href . '&maxwidth=' . $a->videowidth);
+ break;
+ }
}
}
}
<?php
+require_once("include/Contact.php");
+require_once("include/threads.php");
+require_once("include/html2bbcode.php");
+require_once("include/items.php");
require_once("mod/share.php");
-require_once('include/html2bbcode.php');
-require_once('include/enotify.php');
-require_once('include/items.php');
-require_once('include/ostatus_conversation.php');
+require_once("include/enotify.php");
+require_once("include/socgraph.php");
+require_once("include/Photo.php");
+
+define('OSTATUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
+define('OSTATUS_DEFAULT_POLL_TIMEFRAME', 1440); // given in minutes
function ostatus_fetchauthor($xpath, $context, $importer, &$contact) {
$author["owner-link"] = $author["author-link"];
$author["owner-avatar"] = $author["author-avatar"];
+ if ($r) {
+ // Update contact data
+ $update_contact = ($r[0]['name-date'] < datetime_convert('','','now -12 hours'));
+ if ($update_contact) {
+ logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG);
+
+ $value = $xpath->evaluate('atom:author/poco:displayName/text()', $context)->item(0)->nodeValue;
+ if ($value != "")
+ $contact["name"] = $value;
+
+ $value = $xpath->evaluate('atom:author/poco:preferredUsername/text()', $context)->item(0)->nodeValue;
+ if ($value != "")
+ $contact["nick"] = $value;
+
+ $value = $xpath->evaluate('atom:author/poco:note/text()', $context)->item(0)->nodeValue;
+ if ($value != "")
+ $contact["about"] = $value;
+
+ $value = $xpath->evaluate('atom:author/poco:address/poco:formatted/text()', $context)->item(0)->nodeValue;
+ if ($value != "")
+ $contact["location"] = $value;
+
+ q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d",
+ dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]),
+ dbesc(datetime_convert()), intval($contact["id"]));
+
+ poco_check($contact["url"], $contact["name"], $contact["network"], $author["author-avatar"], $contact["about"], $contact["location"],
+ "", "", "", datetime_convert(), 2, $contact["id"], $contact["uid"]);
+ }
+
+ $update_photo = ($r[0]['avatar-date'] < datetime_convert('','','now -12 hours'));
+
+ if ($update_photo AND isset($author["author-avatar"])) {
+ logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG);
+
+ $photos = import_profile_photo($author["author-avatar"], $importer["uid"], $contact["id"]);
+
+ q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d",
+ dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]),
+ dbesc(datetime_convert()), intval($contact["id"]));
+ }
+ }
+
return($author);
}
function ostatus_import($xml,$importer,&$contact, &$hub) {
- // To-Do:
- // Hub
-
$a = get_app();
logger("Import OStatus message", LOGGER_DEBUG);
$item["body"] = add_page_info_to_body(html2bbcode($xpath->query('atom:content/text()', $entry)->item(0)->nodeValue));
$item["object-type"] = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue;
+
+ if (($item["object-type"] == ACTIVITY_OBJ_BOOKMARK) OR ($item["object-type"] == ACTIVITY_OBJ_EVENT)) {
+ $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue;
+ $item["body"] = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue;
+ } elseif ($item["object-type"] == ACTIVITY_OBJ_QUESTION)
+ $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue;
+
+ $item["object"] = $xml;
$item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue;
+ if ($item["verb"] == ACTIVITY_JOIN) {
+ // ignore "Join" messages
+ continue;
+ }
+
if ($item["verb"] == ACTIVITY_FOLLOW) {
// ignore "Follow" messages
continue;
if ($georsspoint)
$item["coord"] = $georsspoint->item(0)->nodeValue;
+ // To-Do
+ // $item["location"] =
+
$categories = $xpath->query('atom:category', $entry);
if ($categories) {
foreach ($categories AS $category) {
switch($rel) {
case "alternate":
$item["plink"] = $href;
+ if (($item["object-type"] == ACTIVITY_OBJ_QUESTION) OR
+ ($item["object-type"] == ACTIVITY_OBJ_EVENT))
+ $item["body"] .= add_page_info($href);
break;
case "ostatus:conversation":
$conversation = $href;
$item["attach"] .= '[attach]href="'.$href.'" length="'.$length.'" type="'.$type.'" title="'.$title.'"[/attach]';
break;
case "related":
- if (!isset($item["parent-uri"]))
- $item["parent-uri"] = $href;
-
- if ($related == "")
- $related = $href;
+ if ($item["object-type"] != ACTIVITY_OBJ_BOOKMARK) {
+ if (!isset($item["parent-uri"]))
+ $item["parent-uri"] = $href;
+
+ if ($related == "")
+ $related = $href;
+ } else
+ $item["body"] .= add_page_info($href);
break;
case "self":
$self = $href;
$repeat_of = "";
$notice_info = $xpath->query('statusnet:notice_info', $entry);
- if ($notice_info)
+ if ($notice_info AND ($notice_info->length > 0)) {
foreach($notice_info->item(0)->attributes AS $attributes) {
if ($attributes->name == "source")
$item["app"] = strip_tags($attributes->textContent);
if ($attributes->name == "repeat_of")
$repeat_of = $attributes->textContent;
}
+ }
// Is it a repeated post?
if ($repeat_of != "") {
if (is_object($activityobjects)) {
- $orig_uris = $xpath->query("activity:object/atom:link[@rel='alternate']", $activityobjects);
- if ($orig_uris)
- foreach($orig_uris->item(0)->attributes AS $attributes)
+ $orig_uri = $xpath->query("activity:object/atom:id", $activityobjects)->item(0)->nodeValue;
+ if (!isset($orig_uri))
+ $orig_uri = $xpath->query('atom:id/text()', $activityobjects)->item(0)->nodeValue;
+
+ $orig_links = $xpath->query("activity:object/atom:link[@rel='alternate']", $activityobjects);
+ if ($orig_links AND ($orig_links->length > 0))
+ foreach($orig_links->item(0)->attributes AS $attributes)
if ($attributes->name == "href")
- $orig_uri = $attributes->textContent;
+ $orig_link = $attributes->textContent;
- if (!isset($orig_uri))
- $orig_uri = $xpath->query("atom:link[@rel='alternate']", $activityobjects)->item(0)->nodeValue;
+ if (!isset($orig_link))
+ $orig_link = $xpath->query("atom:link[@rel='alternate']", $activityobjects)->item(0)->nodeValue;
- if (!isset($orig_uri))
- $orig_uri = $xpath->query("activity:object/atom:id", $activityobjects)->item(0)->nodeValue;
+ if (!isset($orig_link))
+ $orig_link = ostatus_convert_href($orig_uri);
- if (!isset($orig_uri))
- $orig_uri = $xpath->query('atom:id/text()', $activityobjects)->item(0)->nodeValue;
+ $orig_body = $xpath->query('activity:object/atom:content/text()', $activityobjects)->item(0)->nodeValue;
+ if (!isset($orig_body))
+ $orig_body = $xpath->query('atom:content/text()', $activityobjects)->item(0)->nodeValue;
- $orig_body = $xpath->query('atom:content/text()', $activityobjects)->item(0)->nodeValue;
$orig_created = $xpath->query('atom:published/text()', $activityobjects)->item(0)->nodeValue;
$orig_contact = $contact;
$orig_author = ostatus_fetchauthor($xpath, $activityobjects, $importer, $orig_contact);
- $prefix = share_header($orig_author['author-name'], $orig_author['author-link'], $orig_author['author-avatar'], "", $orig_created, $orig_uri);
- $item["body"] = $prefix.html2bbcode($orig_body)."[/share]";
+ //if (!intval(get_config('system','wall-to-wall_share'))) {
+ // $prefix = share_header($orig_author['author-name'], $orig_author['author-link'], $orig_author['author-avatar'], "", $orig_created, $orig_link);
+ // $item["body"] = $prefix.add_page_info_to_body(html2bbcode($orig_body))."[/share]";
+ //} else {
+ $item["author-name"] = $orig_author["author-name"];
+ $item["author-link"] = $orig_author["author-link"];
+ $item["author-avatar"] = $orig_author["author-avatar"];
+ $item["body"] = add_page_info_to_body(html2bbcode($orig_body));
+ $item["created"] = $orig_created;
+
+ $item["uri"] = $orig_uri;
+ $item["plink"] = $orig_link;
+ //}
$item["verb"] = $xpath->query('activity:verb/text()', $activityobjects)->item(0)->nodeValue;
- $item["object-type"] = $xpath->query('activity:object-type/text()', $activityobjects)->item(0)->nodeValue;
+
+ $item["object-type"] = $xpath->query('activity:object/activity:object-type/text()', $activityobjects)->item(0)->nodeValue;
+ if (!isset($item["object-type"]))
+ $item["object-type"] = $xpath->query('activity:object-type/text()', $activityobjects)->item(0)->nodeValue;
}
}
} else
$item["parent-uri"] = $item["uri"];
- $item_id = item_store($item);
- //echo $xml;
- //print_r($item);
- //echo $item_id." ".$item["parent-uri"]."\n";
+ $item_id = ostatus_completion($conversation, $importer["uid"], $item);
if (!$item_id) {
- logger("Error storing item ".print_r($item, true), LOGGER_DEBUG);
+ logger("Error storing item", LOGGER_DEBUG);
continue;
}
'parent' => $item["parent"]
));
}
+ }
+}
+
+function ostatus_convert_href($href) {
+ $elements = explode(":",$href);
+
+ if ((count($elements) <= 2) OR ($elements[0] != "tag"))
+ return $href;
+
+ $server = explode(",", $elements[1]);
+ $conversation = explode("=", $elements[2]);
+
+ if ((count($elements) == 4) AND ($elements[2] == "post"))
+ return "http://".$server[0]."/notice/".$elements[3];
+
+ if ((count($conversation) != 2) OR ($conversation[1] ==""))
+ return $href;
+
+ if ($elements[3] == "objectType=thread")
+ return "http://".$server[0]."/conversation/".$conversation[1];
+ else
+ return "http://".$server[0]."/notice/".$conversation[1];
+
+ return $href;
+}
+
+function check_conversations($override = false) {
+ $last = get_config('system','ostatus_last_poll');
+
+ $poll_interval = intval(get_config('system','ostatus_poll_interval'));
+ if(! $poll_interval)
+ $poll_interval = OSTATUS_DEFAULT_POLL_INTERVAL;
+
+ // Don't poll if the interval is set negative
+ if (($poll_interval < 0) AND !$override)
+ return;
+
+ $poll_timeframe = intval(get_config('system','ostatus_poll_timeframe'));
+ if (!$poll_timeframe)
+ $poll_timeframe = OSTATUS_DEFAULT_POLL_TIMEFRAME;
+
+ if ($last AND !$override) {
+ $next = $last + ($poll_interval * 60);
+ if ($next > time()) {
+ logger('poll interval not reached');
+ return;
+ }
+ }
+
+ logger('cron_start');
+
+ $start = date("Y-m-d H:i:s", time() - ($poll_timeframe * 60));
+ $conversations = q("SELECT `oid`, `url`, `uid` FROM `term` WHERE `type` = 7 AND `term` > '%s' GROUP BY `url`, `uid` ORDER BY `term` DESC",
+ dbesc($start));
+
+ foreach ($conversations AS $conversation) {
+ ostatus_completion($conversation['url'], $conversation['uid']);
+ }
+
+ logger('cron_end');
+
+ set_config('system','ostatus_last_poll', time());
+}
+
+function ostatus_completion($conversation_url, $uid, $item = array()) {
+
+ $item_stored = -1;
+
+ $conversation_url = ostatus_convert_href($conversation_url);
+
+ // If the thread shouldn't be completed then store the item and go away
+ if ((intval(get_config('system','ostatus_poll_interval')) == -2) AND (count($item) > 0)) {
+ //$arr["app"] .= " (OStatus-NoCompletion)";
+ $item_stored = item_store($item, true);
+ return($item_stored);
+ }
+
+ // Get the parent
+ $parents = q("SELECT `id`, `parent`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `id` IN
+ (SELECT `parent` FROM `item` WHERE `id` IN
+ (SELECT `oid` FROM `term` WHERE `uid` = %d AND `otype` = %d AND `type` = %d AND `url` = '%s'))",
+ intval($uid), intval(TERM_OBJ_POST), intval(TERM_CONVERSATION), dbesc($conversation_url));
+
+ if ($parents)
+ $parent = $parents[0];
+ elseif (count($item) > 0) {
+ $parent = $item;
+ $parent["type"] = "remote";
+ $parent["verb"] = ACTIVITY_POST;
+ $parent["visible"] = 1;
+ } else {
+ // Preset the parent
+ $r = q("SELECT `id` FROM `contact` WHERE `self` AND `uid`=%d", $uid);
+ if (!$r)
+ return(-2);
+
+ $parent = array();
+ $parent["id"] = 0;
+ $parent["parent"] = 0;
+ $parent["uri"] = "";
+ $parent["contact-id"] = $r[0]["id"];
+ $parent["type"] = "remote";
+ $parent["verb"] = ACTIVITY_POST;
+ $parent["visible"] = 1;
+ }
+
+ $conv = str_replace("/conversation/", "/api/statusnet/conversation/", $conversation_url).".as";
+ $pageno = 1;
+ $items = array();
+
+ logger('fetching conversation url '.$conv.' for user '.$uid);
+
+ do {
+ $conv_arr = z_fetch_url($conv."?page=".$pageno);
+
+ // If it is a non-ssl site and there is an error, then try ssl or vice versa
+ if (!$conv_arr["success"] AND (substr($conv, 0, 7) == "http://")) {
+ $conv = str_replace("http://", "https://", $conv);
+ $conv_as = fetch_url($conv."?page=".$pageno);
+ } elseif (!$conv_arr["success"] AND (substr($conv, 0, 8) == "https://")) {
+ $conv = str_replace("https://", "http://", $conv);
+ $conv_as = fetch_url($conv."?page=".$pageno);
+ } else
+ $conv_as = $conv_arr["body"];
+
+ $conv_as = str_replace(',"statusnet:notice_info":', ',"statusnet_notice_info":', $conv_as);
+ $conv_as = json_decode($conv_as);
+
+ if (@is_array($conv_as->items))
+ $items = array_merge($items, $conv_as->items);
+ else
+ break;
+
+ $pageno++;
+
+ } while (true);
+
+ logger('fetching conversation done. Found '.count($items).' items');
+
+ if (!sizeof($items)) {
+ if (count($item) > 0) {
+ //$arr["app"] .= " (OStatus-NoConvFetched)";
+ $item_stored = item_store($item, true);
+
+ if ($item_stored) {
+ logger("Conversation ".$conversation_url." couldn't be fetched. Item uri ".$item["uri"]." stored: ".$item_stored, LOGGER_DEBUG);
+ ostatus_store_conversation($item_id, $conversation_url);
+ }
+
+ return($item_stored);
+ } else
+ return(-3);
+ }
+
+ $items = array_reverse($items);
+
+ foreach ($items as $single_conv) {
+
+ // Test - remove before flight
+ //$tempfile = tempnam(get_temppath(), "conversation");
+ //file_put_contents($tempfile, json_encode($single_conv));
+
+
+ if (isset($single_conv->object->id))
+ $single_conv->id = $single_conv->object->id;
+
+ $plink = ostatus_convert_href($single_conv->id);
+ if (isset($single_conv->object->url))
+ $plink = ostatus_convert_href($single_conv->object->url);
+
+ if (@!$single_conv->id)
+ continue;
+
+ logger("Got id ".$single_conv->id, LOGGER_DEBUG);
+
+ if ($first_id == "") {
+ $first_id = $single_conv->id;
+
+ // The first post of the conversation isn't our first post. There are three options:
+ // 1. Our conversation hasn't the "real" thread starter
+ // 2. This first post is a post inside our thread
+ // 3. This first post is a post inside another thread
+ if (($first_id != $parent["uri"]) AND ($parent["uri"] != "")) {
+ $new_parents = q("SELECT `id`, `parent`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `id` IN
+ (SELECT `parent` FROM `item`
+ WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s','%s')) LIMIT 1",
+ intval($uid), dbesc($first_id), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
+ if ($new_parents) {
+ if ($new_parents[0]["parent"] == $parent["parent"]) {
+ // Option 2: This post is already present inside our thread - but not as thread starter
+ logger("Option 2: uri present in our thread: ".$first_id, LOGGER_DEBUG);
+ $first_id = $parent["uri"];
+ } else {
+ // Option 3: Not so good. We have mixed parents. We have to see how to clean this up.
+ // For now just take the new parent.
+ $parent = $new_parents[0];
+ $first_id = $parent["uri"];
+ logger("Option 3: mixed parents for uri ".$first_id, LOGGER_DEBUG);
+ }
+ } else {
+ // Option 1: We hadn't got the real thread starter
+ // We have to clean up our existing messages.
+ $parent["id"] = 0;
+ $parent["uri"] = $first_id;
+ logger("Option 1: we have a new parent: ".$first_id, LOGGER_DEBUG);
+ }
+ } elseif ($parent["uri"] == "") {
+ $parent["id"] = 0;
+ $parent["uri"] = $first_id;
+ }
+ }
+
+ $parent_uri = $parent["uri"];
+
+ // "context" only seems to exist on older servers
+ if (isset($single_conv->context->inReplyTo->id)) {
+ $parent_exists = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
+ intval($uid), dbesc($single_conv->context->inReplyTo->id), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
+ if ($parent_exists)
+ $parent_uri = $single_conv->context->inReplyTo->id;
+ }
+
+ // This is the current way
+ if (isset($single_conv->object->inReplyTo->id)) {
+ $parent_exists = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
+ intval($uid), dbesc($single_conv->object->inReplyTo->id), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
+ if ($parent_exists)
+ $parent_uri = $single_conv->object->inReplyTo->id;
+ }
+
+ $message_exists = q("SELECT `id`, `parent`, `uri` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
+ intval($uid), dbesc($single_conv->id),
+ dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
+ if ($message_exists) {
+ logger("Message ".$single_conv->id." already existed on the system", LOGGER_DEBUG);
- if ($conversation != "") {
- // Check for duplicates. We really don't need to check the same conversation twice.
- if (!in_array($conversation, $conversationlist)) {
- complete_conversation($item_id, $conversation);
- $conversationlist[] = $conversation;
+ if ($parent["id"] != 0) {
+ $existing_message = $message_exists[0];
+
+ // We improved the way we fetch OStatus messages, this shouldn't happen very often now
+ // To-Do: we have to change the shadow copies as well. This way here is really ugly.
+ if ($existing_message["parent"] != $parent["id"]) {
+ logger('updating id '.$existing_message["id"].' with parent '.$existing_message["parent"].' to parent '.$parent["id"].' uri '.$parent["uri"].' thread '.$parent_uri, LOGGER_DEBUG);
+
+ // Update the parent id of the selected item
+ $r = q("UPDATE `item` SET `parent` = %d, `parent-uri` = '%s' WHERE `id` = %d",
+ intval($parent["id"]), dbesc($parent["uri"]), intval($existing_message["id"]));
+
+ // Update the parent uri in the thread - but only if it points to itself
+ $r = q("UPDATE `item` SET `thr-parent` = '%s' WHERE `id` = %d AND `uri` = `thr-parent`",
+ dbesc($parent_uri), intval($existing_message["id"]));
+
+ // try to change all items of the same parent
+ $r = q("UPDATE `item` SET `parent` = %d, `parent-uri` = '%s' WHERE `parent` = %d",
+ intval($parent["id"]), dbesc($parent["uri"]), intval($existing_message["parent"]));
+
+ // Update the parent uri in the thread - but only if it points to itself
+ $r = q("UPDATE `item` SET `thr-parent` = '%s' WHERE (`parent` = %d) AND (`uri` = `thr-parent`)",
+ dbesc($parent["uri"]), intval($existing_message["parent"]));
+
+ // Now delete the thread
+ delete_thread($existing_message["parent"]);
+ }
}
+
+ // The item we are having on the system is the one that we wanted to store via the item array
+ if (isset($item["uri"]) AND ($item["uri"] == $existing_message["uri"])) {
+ $item = array();
+ $item_stored = 0;
+ }
+
+ continue;
+ }
+
+ $actor = $single_conv->actor->id;
+ if (isset($single_conv->actor->url))
+ $actor = $single_conv->actor->url;
+
+ $contact = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` != '%s'",
+ $uid, normalise_link($actor), NETWORK_STATUSNET);
+
+ if (count($contact)) {
+ logger("Found contact for url ".$actor, LOGGER_DEBUG);
+ $contact_id = $contact[0]["id"];
+ } else {
+ logger("No contact found for url ".$actor, LOGGER_DEBUG);
+
+ // Adding a global contact
+ // To-Do: Use this data for the post
+ $global_contact_id = get_contact($actor, 0);
+
+ logger("Global contact ".$global_contact_id." found for url ".$actor, LOGGER_DEBUG);
+
+ $contact_id = $parent["contact-id"];
+ }
+
+ $arr = array();
+ $arr["network"] = NETWORK_OSTATUS;
+ $arr["uri"] = $single_conv->id;
+ $arr["plink"] = $plink;
+ $arr["uid"] = $uid;
+ $arr["contact-id"] = $contact_id;
+ $arr["parent-uri"] = $parent_uri;
+ $arr["created"] = $single_conv->published;
+ $arr["edited"] = $single_conv->published;
+ $arr["owner-name"] = $single_conv->actor->displayName;
+ if ($arr["owner-name"] == '')
+ $arr["owner-name"] = $single_conv->actor->contact->displayName;
+ if ($arr["owner-name"] == '')
+ $arr["owner-name"] = $single_conv->actor->portablecontacts_net->displayName;
+
+ $arr["owner-link"] = $actor;
+ $arr["owner-avatar"] = $single_conv->actor->image->url;
+ $arr["author-name"] = $arr["owner-name"];
+ $arr["author-link"] = $actor;
+ $arr["author-avatar"] = $single_conv->actor->image->url;
+ $arr["body"] = add_page_info_to_body(html2bbcode($single_conv->content));
+
+ if (isset($single_conv->status_net->notice_info->source))
+ $arr["app"] = strip_tags($single_conv->status_net->notice_info->source);
+ elseif (isset($single_conv->statusnet->notice_info->source))
+ $arr["app"] = strip_tags($single_conv->statusnet->notice_info->source);
+ elseif (isset($single_conv->statusnet_notice_info->source))
+ $arr["app"] = strip_tags($single_conv->statusnet_notice_info->source);
+ elseif (isset($single_conv->provider->displayName))
+ $arr["app"] = $single_conv->provider->displayName;
+ else
+ $arr["app"] = "OStatus";
+
+ //$arr["app"] .= " (Conversation)";
+
+ $arr["object"] = json_encode($single_conv);
+ $arr["verb"] = $parent["verb"];
+ $arr["visible"] = $parent["visible"];
+ $arr["location"] = $single_conv->location->displayName;
+ $arr["coord"] = trim($single_conv->location->lat." ".$single_conv->location->lon);
+
+ // Is it a reshared item?
+ if (isset($single_conv->verb) AND ($single_conv->verb == "share") AND isset($single_conv->object)) {
+ if (is_array($single_conv->object))
+ $single_conv->object = $single_conv->object[0];
+
+ logger("Found reshared item ".$single_conv->object->id);
+
+ // $single_conv->object->context->conversation;
+
+ if (isset($single_conv->object->object->id))
+ $arr["uri"] = $single_conv->object->object->id;
+ else
+ $arr["uri"] = $single_conv->object->id;
+
+ if (isset($single_conv->object->object->url))
+ $plink = ostatus_convert_href($single_conv->object->object->url);
+ else
+ $plink = ostatus_convert_href($single_conv->object->url);
+
+ if (isset($single_conv->object->object->content))
+ $arr["body"] = add_page_info_to_body(html2bbcode($single_conv->object->object->content));
+ else
+ $arr["body"] = add_page_info_to_body(html2bbcode($single_conv->object->content));
+
+ $arr["plink"] = $plink;
+
+ $arr["created"] = $single_conv->object->published;
+ $arr["edited"] = $single_conv->object->published;
+
+ $arr["author-name"] = $single_conv->object->actor->displayName;
+ if ($arr["owner-name"] == '')
+ $arr["author-name"] = $single_conv->object->actor->contact->displayName;
+
+ $arr["author-link"] = $single_conv->object->actor->url;
+ $arr["author-avatar"] = $single_conv->object->actor->image->url;
+
+ $arr["app"] = $single_conv->object->provider->displayName."#";
+ //$arr["verb"] = $single_conv->object->verb;
+
+ $arr["location"] = $single_conv->object->location->displayName;
+ $arr["coord"] = trim($single_conv->object->location->lat." ".$single_conv->object->location->lon);
+ }
+
+ if ($arr["location"] == "")
+ unset($arr["location"]);
+
+ if ($arr["coord"] == "")
+ unset($arr["coord"]);
+
+ // Copy fields from given item array
+ if (isset($item["uri"]) AND (($item["uri"] == $arr["uri"]) OR ($item["uri"] == $single_conv->id))) {
+ $copy_fields = array("owner-name", "owner-link", "owner-avatar", "author-name", "author-link", "author-avatar",
+ "gravity", "body", "object-type", "object", "verb", "created", "edited", "coord", "tag",
+ "title", "attach", "app", "type", "location", "contact-id", "uri");
+ foreach ($copy_fields AS $field)
+ if (isset($item[$field]))
+ $arr[$field] = $item[$field];
+
+ //$arr["app"] .= " (OStatus)";
}
+
+ $newitem = item_store($arr);
+ if (!$newitem) {
+ logger("Item wasn't stored ".print_r($arr, true), LOGGER_DEBUG);
+ continue;
+ }
+
+ if (isset($item["uri"]) AND ($item["uri"] == $arr["uri"])) {
+ $item = array();
+ $item_stored = $newitem;
+ }
+
+ logger('Stored new item '.$plink.' for parent '.$arr["parent-uri"].' under id '.$newitem, LOGGER_DEBUG);
+
+ // Add the conversation entry (but don't fetch the whole conversation)
+ ostatus_store_conversation($newitem, $conversation_url);
+
+ // If the newly created item is the top item then change the parent settings of the thread
+ // This shouldn't happen anymore. This is supposed to be absolote.
+ if ($arr["uri"] == $first_id) {
+ logger('setting new parent to id '.$newitem);
+ $new_parents = q("SELECT `id`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `uid` = %d AND `id` = %d LIMIT 1",
+ intval($uid), intval($newitem));
+ if ($new_parents)
+ $parent = $new_parents[0];
+ }
+ }
+
+ if (($item_stored < 0) AND (count($item) > 0)) {
+ //$arr["app"] .= " (OStatus-NoConvFound)";
+ $item_stored = item_store($item, true);
+ if ($item_stored) {
+ logger("Uri ".$item["uri"]." wasn't found in conversation ".$conversation_url, LOGGER_DEBUG);
+ ostatus_store_conversation($item_stored, $conversation_url);
+ }
+ }
+
+ return($item_stored);
+}
+
+function ostatus_store_conversation($itemid, $conversation_url) {
+ global $a;
+
+ $conversation_url = ostatus_convert_href($conversation_url);
+
+ $messages = q("SELECT `uid`, `parent`, `created`, `received`, `guid` FROM `item` WHERE `id` = %d LIMIT 1", intval($itemid));
+ if (!$messages)
+ return;
+ $message = $messages[0];
+
+ // Store conversation url if not done before
+ $conversation = q("SELECT `url` FROM `term` WHERE `uid` = %d AND `oid` = %d AND `otype` = %d AND `type` = %d",
+ intval($message["uid"]), intval($itemid), intval(TERM_OBJ_POST), intval(TERM_CONVERSATION));
+
+ if (!$conversation) {
+ $r = q("INSERT INTO `term` (`uid`, `oid`, `otype`, `type`, `term`, `url`, `created`, `received`, `guid`) VALUES (%d, %d, %d, %d, '%s', '%s', '%s', '%s', '%s')",
+ intval($message["uid"]), intval($itemid), intval(TERM_OBJ_POST), intval(TERM_CONVERSATION),
+ dbesc($message["created"]), dbesc($conversation_url), dbesc($message["created"]), dbesc($message["received"]), dbesc($message["guid"]));
+ logger('Storing conversation url '.$conversation_url.' for id '.$itemid);
}
}
+?>
+++ /dev/null
-<?php
-require_once("include/Contact.php");
-
-define('OSTATUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
-define('OSTATUS_DEFAULT_POLL_TIMEFRAME', 1440); // given in minutes
-
-function ostatus_convert_href($href) {
- $elements = explode(":",$href);
-
- if ((count($elements) <= 2) OR ($elements[0] != "tag"))
- return $href;
-
- $server = explode(",", $elements[1]);
- $conversation = explode("=", $elements[2]);
-
- if ((count($elements) == 4) AND ($elements[2] == "post"))
- return "http://".$server[0]."/notice/".$elements[3];
-
- if ((count($conversation) != 2) OR ($conversation[1] ==""))
- return $href;
-
- if ($elements[3] == "objectType=thread")
- return "http://".$server[0]."/conversation/".$conversation[1];
- else
- return "http://".$server[0]."/notice/".$conversation[1];
-
- return $href;
-}
-
-function check_conversations($override = false) {
- $last = get_config('system','ostatus_last_poll');
-
- $poll_interval = intval(get_config('system','ostatus_poll_interval'));
- if(! $poll_interval)
- $poll_interval = OSTATUS_DEFAULT_POLL_INTERVAL;
-
- // Don't poll if the interval is set negative
- if (($poll_interval < 0) AND !$override)
- return;
-
- $poll_timeframe = intval(get_config('system','ostatus_poll_timeframe'));
- if (!$poll_timeframe)
- $poll_timeframe = OSTATUS_DEFAULT_POLL_TIMEFRAME;
-
- if ($last AND !$override) {
- $next = $last + ($poll_interval * 60);
- if ($next > time()) {
- logger('poll interval not reached');
- return;
- }
- }
-
- logger('cron_start');
-
- $start = date("Y-m-d H:i:s", time() - ($poll_timeframe * 60));
- $conversations = q("SELECT `oid`, `url` FROM `term` WHERE `type` = 7 AND `term` > '%s' GROUP BY `url` ORDER BY `term` DESC",
- dbesc($start));
-
- foreach ($conversations AS $conversation) {
- $id = $conversation['oid'];
- $url = $conversation['url'];
- complete_conversation($id, $url);
- }
-
- logger('cron_end');
-
- set_config('system','ostatus_last_poll', time());
-}
-
-function complete_conversation($itemid, $conversation_url, $only_add_conversation = false) {
- global $a;
-
- $conversation_url = ostatus_convert_href($conversation_url);
-
- if (intval(get_config('system','ostatus_poll_interval')) == -2)
- return;
-
- if ($a->last_ostatus_conversation_url == $conversation_url)
- return;
-
- $a->last_ostatus_conversation_url = $conversation_url;
-
- $messages = q("SELECT `uid`, `parent`, `created`, `received`, `guid` FROM `item` WHERE `id` = %d LIMIT 1", intval($itemid));
- if (!$messages)
- return;
- $message = $messages[0];
-
- // Store conversation url if not done before
- $conversation = q("SELECT `url` FROM `term` WHERE `uid` = %d AND `oid` = %d AND `otype` = %d AND `type` = %d",
- intval($message["uid"]), intval($itemid), intval(TERM_OBJ_POST), intval(TERM_CONVERSATION));
-
- if (!$conversation) {
- $r = q("INSERT INTO `term` (`uid`, `oid`, `otype`, `type`, `term`, `url`, `created`, `received`, `guid`) VALUES (%d, %d, %d, %d, '%s', '%s', '%s', '%s', '%s')",
- intval($message["uid"]), intval($itemid), intval(TERM_OBJ_POST), intval(TERM_CONVERSATION),
- dbesc($message["created"]), dbesc($conversation_url), dbesc($message["created"]), dbesc($message["received"]), dbesc($message["guid"]));
- logger('complete_conversation: Storing conversation url '.$conversation_url.' for id '.$itemid);
- }
-
- if ($only_add_conversation)
- return;
-
- // Get the parent
- $parents = q("SELECT `id`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `uid` = %d AND `id` = %d LIMIT 1",
- intval($message["uid"]), intval($message["parent"]));
- if (!$parents)
- return;
- $parent = $parents[0];
-
- require_once('include/html2bbcode.php');
- require_once('include/items.php');
-
- $conv = str_replace("/conversation/", "/api/statusnet/conversation/", $conversation_url).".as";
- $pageno = 1;
- $items = array();
-
- logger('complete_conversation: fetching conversation url '.$conv.' for '.$itemid);
-
- do {
- $conv_as = fetch_url($conv."?page=".$pageno);
- $conv_as = str_replace(',"statusnet:notice_info":', ',"statusnet_notice_info":', $conv_as);
- $conv_as = json_decode($conv_as);
-
- if (@is_array($conv_as->items))
- $items = array_merge($items, $conv_as->items);
- else
- break;
-
- $pageno++;
-
- } while (true);
-
- if (!sizeof($items))
- return;
-
- $items = array_reverse($items);
-
- foreach ($items as $single_conv) {
- if (isset($single_conv->object->id))
- $single_conv->id = $single_conv->object->id;
-
- //logger("Got id ".$single_conv->id, LOGGER_DEBUG);
-
- $plink = ostatus_convert_href($single_conv->id);
- if (isset($single_conv->object->url))
- $plink = ostatus_convert_href($single_conv->object->url);
-
- //logger("Got url ".$plink, LOGGER_DEBUG);
-
- if (@!$single_conv->id)
- continue;
-
- if ($first_id == "") {
- $first_id = $single_conv->id;
-
- // To-Do:
- // Only fetch a new parent if the new one doesn't have parents
- // It can happen that OStatus servers have incomplete threads.
- $new_parents = q("SELECT `id`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
- intval($message["uid"]), dbesc($first_id),
- dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
- if ($new_parents) {
- $parent = $new_parents[0];
- if ($parent["id"] != $message["parent"])
- logger('Fetch new parent id '.$parent["id"].' for '.$itemid.' Old parent: '.$message["parent"]);
- } else {
- $parent["id"] = 0;
- $parent["uri"] = $first_id;
- }
- }
-
- if (isset($single_conv->context->inReplyTo->id))
- $parent_uri = $single_conv->context->inReplyTo->id;
- else
- $parent_uri = $parent["uri"];
-
- $message_exists = q("SELECT `id`, `parent` FROM `item` WHERE `uid` = %d AND `plink` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
- intval($message["uid"]), dbesc($plink),
- dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
-
- if (!$message_exists)
- $message_exists = q("SELECT `id`, `parent` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
- intval($message["uid"]), dbesc($single_conv->id),
- dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
-
- if ($message_exists) {
- if ($parent["id"] != 0) {
- $existing_message = $message_exists[0];
-
- // Normally this shouldn't happen anymore, since we improved the way we fetch OStatus messages
- if ($existing_message["parent"] != $parent["id"]) {
- logger('updating id '.$existing_message["id"].' to parent '.$parent["id"].' uri '.$parent["uri"].' thread '.$parent_uri, LOGGER_DEBUG);
-
- // This is partly bad, since the entry in the thread table isn't updated
- $r = q("UPDATE `item` SET `parent` = %d, `parent-uri` = '%s', `thr-parent` = '%s' WHERE `id` = %d",
- intval($parent["id"]),
- dbesc($parent["uri"]),
- dbesc($parent_uri),
- intval($existing_message["id"]));
- }
- }
- continue;
- }
-
- $actor = $single_conv->actor->id;
- if (isset($single_conv->actor->url))
- $actor = $single_conv->actor->url;
-
- $contact = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` != '%s'",
- $message["uid"], normalise_link($actor), NETWORK_STATUSNET);
-
- if (count($contact)) {
- logger("Found contact for url ".$actor, LOGGER_DEBUG);
- $contact_id = $contact[0]["id"];
- } else {
- logger("No contact found for url ".$actor, LOGGER_DEBUG);
-
- // Adding a global contact
- // To-Do: Use this data for the post
- $global_contact_id = get_contact($actor, 0);
-
- logger("Global contact ".$global_contact_id." found for url ".$actor, LOGGER_DEBUG);
-
- $contact_id = $parent["contact-id"];
- }
-
- $arr = array();
- $arr["network"] = NETWORK_OSTATUS;
- $arr["uri"] = $single_conv->id;
- $arr["plink"] = $plink;
- $arr["uid"] = $message["uid"];
- $arr["contact-id"] = $contact_id;
- if ($parent["id"] != 0)
- $arr["parent"] = $parent["id"];
- $arr["parent-uri"] = $parent["uri"];
- $arr["thr-parent"] = $parent_uri;
- $arr["created"] = $single_conv->published;
- $arr["edited"] = $single_conv->published;
- //$arr["owner-name"] = $single_conv->actor->contact->displayName;
- $arr["owner-name"] = $single_conv->actor->contact->preferredUsername;
- if ($arr["owner-name"] == '')
- $arr["owner-name"] = $single_conv->actor->portablecontacts_net->preferredUsername;
- if ($arr["owner-name"] == '')
- $arr["owner-name"] = $single_conv->actor->displayName;
-
- $arr["owner-link"] = $actor;
- $arr["owner-avatar"] = $single_conv->actor->image->url;
- //$arr["author-name"] = $single_conv->actor->contact->displayName;
- //$arr["author-name"] = $single_conv->actor->contact->preferredUsername;
- $arr["author-name"] = $arr["owner-name"];
- $arr["author-link"] = $actor;
- $arr["author-avatar"] = $single_conv->actor->image->url;
- $arr["body"] = add_page_info_to_body(html2bbcode($single_conv->content));
-
- if (isset($single_conv->status_net->notice_info->source))
- $arr["app"] = strip_tags($single_conv->status_net->notice_info->source);
- elseif (isset($single_conv->statusnet->notice_info->source))
- $arr["app"] = strip_tags($single_conv->statusnet->notice_info->source);
- elseif (isset($single_conv->statusnet_notice_info->source))
- $arr["app"] = strip_tags($single_conv->statusnet_notice_info->source);
- elseif (isset($single_conv->provider->displayName))
- $arr["app"] = $single_conv->provider->displayName;
- else
- $arr["app"] = "OStatus";
-
- $arr["verb"] = $parent["verb"];
- $arr["visible"] = $parent["visible"];
- $arr["location"] = $single_conv->location->displayName;
- $arr["coord"] = trim($single_conv->location->lat." ".$single_conv->location->lon);
-
- if ($arr["location"] == "")
- unset($arr["location"]);
-
- if ($arr["coord"] == "")
- unset($arr["coord"]);
-
- $newitem = item_store($arr);
-
- logger('Stored new item '.$plink.' under id '.$newitem, LOGGER_DEBUG);
-
- // Add the conversation entry (but don't fetch the whole conversation)
- complete_conversation($newitem, $conversation_url, true);
-
- // If the newly created item is the top item then change the parent settings of the thread
- // This shouldn't happen anymore. This could is supposed to be absolote.
- if ($newitem AND ($arr["uri"] == $first_id)) {
- logger('setting new parent to id '.$newitem);
- $new_parents = q("SELECT `id`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `uid` = %d AND `id` = %d LIMIT 1",
- intval($message["uid"]), intval($newitem));
- if ($new_parents) {
- $parent = $new_parents[0];
- logger('done changing parents to parent '.$newitem);
- }
- }
- }
-}
-?>
$buffer = mb_ereg_replace("<", "<", $buffer);
$buffer = mb_ereg_replace(">", ">", $buffer);
*/
- $buffer = htmlspecialchars($str, ENT_QUOTES);
+ $buffer = htmlspecialchars($str, ENT_QUOTES, "UTF-8");
$buffer = trim($buffer);
return($buffer);
);
$icons = array(
- '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
- '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
- '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
return $x[0];
$t = '';
for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
- $t .= '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
+ $t .= '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
$r = str_replace($x[0],$t,$x[0]);
return $r;
}
setupFieldRichtext();
/* popup menus */
- function close_last_popup_menu() {
- if(last_popup_menu) {
- last_popup_menu.hide();
- last_popup_button.removeClass("selected");
- last_popup_menu = null;
- last_popup_button = null;
- }
- }
+ function close_last_popup_menu() {
+ if(last_popup_menu) {
+ last_popup_menu.hide();
+ last_popup_button.removeClass("selected");
+ last_popup_menu = null;
+ last_popup_button = null;
+ }
+ }
$('a[rel^=#]').click(function(e){
e.preventDefault();
var parent = $(this).parent();
return false;
});
$('html').click(function() {
- close_last_popup_menu();
+ close_last_popup_menu();
});
// fancyboxes
nnm = $("#nav-notifications-menu");
nnm.html(notifications_all + notifications_mark);
//nnm.attr('popup','true');
+
+ var notification_lastitem = parseInt(localStorage.getItem("notification-lastitem"));
+ var notification_id = 0;
eNotif.children("note").each(function(){
e = $(this);
- text = e.text().format("<span class='contactname'>"+e.attr('name')+"</span>");
- html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
+ var text = e.text().format("<span class='contactname'>"+e.attr('name')+"</span>");
+ var seenclass = (e.attr('seen')==1)?"notify-seen":"notify-unseen";
+ var html = notifications_tpl.format(e.attr('href'),
+ e.attr('photo'), // {0}
+ text, // {1}
+ e.attr('date'), // {2}
+ seenclass, // {3}
+ new Date(e.attr('timestamp')*1000) // {4}
+ );
nnm.append(html);
+ });
+ $(eNotif.children("note").get().reverse()).each(function(){
+ e = $(this);
+ notification_id = parseInt(e.attr('timestamp'));
+ if (notification_lastitem!== null && notification_id > notification_lastitem) {
+ if (getNotificationPermission()==="granted") {
+ var notification = new Notification(document.title, {
+ body: e.text().replace('→ ','').format(e.attr('name')),
+ icon: e.attr('photo'),
+ });
+ notification['url'] = e.attr('href');
+ notification.addEventListener("click", function(ev){
+ window.location = ev.target.url;
+ });
+ }
+ }
- if(e.text().search('→') == 0) {
- var notification = new Notification(document.title, {
- body: e.text().replace('→ ',''),
- icon: e.attr('photo')
- });
-
- // TODO (yet unsupported by most browsers):
- // Implement notification.onclick()
-
- // notifyMarkAll();
- }
});
+ notification_lastitem = notification_id;
+ localStorage.setItem("notification-lastitem", notification_lastitem)
$("img[data-src]", nnm).each(function(i, el){
// Add src attribute for images with a data-src attribute
});
}
+
+// notification permission settings in localstorage
+// set by settings page
+function getNotificationPermission() {
+ if (window["Notification"] === undefined) {
+ return null;
+ }
+ if (Notification.permission === 'granted') {
+ var val = localStorage.getItem('notification-permissions');
+ if (val === null) return 'denied';
+ return val;
+ } else {
+ return Notification.permission;
+ }
+}
'$relocate'=> t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
'$baseurl' => $a->get_baseurl(true),
// name, label, value, help string, extra data...
- '$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), 'UTF-8'),
+ '$sitename' => array('sitename', t("Site name"), $a->config['sitename'],'UTF-8'),
'$hostname' => array('hostname', t("Host name"), $a->config['hostname'], ""),
'$sender_email' => array('sender_email', t("Sender Email"), $a->config['sender_email'], "The email address your server shall use to send notification emails from.", "", "", "email"),
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
'$register_policy' => array('register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices),
'$daily_registrations' => array('max_daily_registrations', t("Maximum Daily Registrations"), get_config('system', 'max_daily_registrations'), t("If registration is permitted above, this sets the maximum number of new user registrations to accept per day. If register is set to closed, this setting has no effect.")),
- '$register_text' => array('register_text', t("Register text"), htmlentities($a->config['register_text'], ENT_QUOTES, 'UTF-8'), t("Will be displayed prominently on the registration page.")),
+ '$register_text' => array('register_text', t("Register text"), $a->config['register_text'], t("Will be displayed prominently on the registration page.")),
'$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), get_config('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')),
'$allowed_sites' => array('allowed_sites', t("Allowed friend domains"), get_config('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")),
'$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")),
$nu_nickname = ( x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : '');
$nu_email = ( x($_POST, 'new_user_email') ? $_POST['new_user_email'] : '');
- check_form_security_token_redirectOnErr('/admin/users', 'admin_users');
+ check_form_security_token_redirectOnErr($a->get_baseurl().'/admin/users', 'admin_users');
if (!($nu_name==="") && !($nu_email==="") && !($nu_nickname==="")) {
require_once('include/user.php');
intval($a->pager['itemspage'])
);
- function _setup_users($e){
- $a = get_app();
-
- $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
-
+ $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
+ $_setup_users = function ($e) use ($adminlist){
$accounts = Array(
t('Normal Account'),
t('Soapbox Account'),
$e['lastitem_date'] = relative_date($e['lastitem_date']);
//$e['is_admin'] = ($e['email'] === $a->config['admin_email']);
$e['is_admin'] = in_array($e['email'], $adminlist);
+ $e['is_deletable'] = (intval($e['uid']) != local_user());
$e['deleted'] = ($e['account_removed']?relative_date($e['account_expires_on']):False);
return $e;
- }
- $users = array_map("_setup_users", $users);
+ };
+ $users = array_map($_setup_users, $users);
// Get rid of dashes in key names, Smarty3 can't handle them
}
$a->page['aside'] = '';
- return replace_macros(get_markup_template('confirm.tpl'), array(
+
+ return replace_macros(get_markup_template('contact_drop_confirm.tpl'), array(
+ '$contact' => _contact_detail_for_template($orig_record[0]),
'$method' => 'get',
'$message' => t('Do you really want to delete this contact?'),
'$extra_inputs' => $inputs,
$contacts = array();
if(count($r)) {
-
foreach($r as $rr) {
-
- switch($rr['rel']) {
- case CONTACT_IS_FRIEND:
- $dir_icon = 'images/lrarrow.gif';
- $alt_text = t('Mutual Friendship');
- break;
- case CONTACT_IS_FOLLOWER;
- $dir_icon = 'images/larrow.gif';
- $alt_text = t('is a fan of yours');
- break;
- case CONTACT_IS_SHARING;
- $dir_icon = 'images/rarrow.gif';
- $alt_text = t('you are a fan of');
- break;
- default:
- break;
- }
- if(($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) {
- $url = "redir/{$rr['id']}";
- $sparkle = ' class="sparkle" ';
- }
- else {
- $url = $rr['url'];
- $sparkle = '';
- }
-
-
- $contacts[] = array(
- 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
- 'edit_hover' => t('Edit contact'),
- 'photo_menu' => contact_photo_menu($rr),
- 'id' => $rr['id'],
- 'alt_text' => $alt_text,
- 'dir_icon' => $dir_icon,
- 'thumb' => proxy_url($rr['thumb']),
- 'name' => $rr['name'],
- 'username' => $rr['name'],
- 'sparkle' => $sparkle,
- 'itemurl' => $rr['url'],
- 'url' => $url,
- 'network' => network_to_name($rr['network']),
- );
+ $contacts[] = _contact_detail_for_template($rr);
}
-
-
-
}
$tpl = get_markup_template("contacts-template.tpl");
return $o;
}
+
+function _contact_detail_for_template($rr){
+ switch($rr['rel']) {
+ case CONTACT_IS_FRIEND:
+ $dir_icon = 'images/lrarrow.gif';
+ $alt_text = t('Mutual Friendship');
+ break;
+ case CONTACT_IS_FOLLOWER;
+ $dir_icon = 'images/larrow.gif';
+ $alt_text = t('is a fan of yours');
+ break;
+ case CONTACT_IS_SHARING;
+ $dir_icon = 'images/rarrow.gif';
+ $alt_text = t('you are a fan of');
+ break;
+ default:
+ break;
+ }
+ if(($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) {
+ $url = "redir/{$rr['id']}";
+ $sparkle = ' class="sparkle" ';
+ }
+ else {
+ $url = $rr['url'];
+ $sparkle = '';
+ }
+
+
+ return array(
+ 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
+ 'edit_hover' => t('Edit contact'),
+ 'photo_menu' => contact_photo_menu($rr),
+ 'id' => $rr['id'],
+ 'alt_text' => $alt_text,
+ 'dir_icon' => $dir_icon,
+ 'thumb' => proxy_url($rr['thumb']),
+ 'name' => $rr['name'],
+ 'username' => $rr['name'],
+ 'sparkle' => $sparkle,
+ 'itemurl' => $rr['url'],
+ 'url' => $url,
+ 'network' => network_to_name($rr['network']),
+ );
+
+}
\ No newline at end of file
function directory_content(&$a) {
+ global $db;
require_once("mod/proxy.php");
'$submit' => t('Find')
));
- if($search)
+ if($search) {
$search = dbesc($search);
- $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`pub_keywords`,`prv_keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : "");
+
+ $sql_extra = " AND ((`profile`.`name` LIKE '%$search%') OR
+ (`user`.`nickname` LIKE '%$search%') OR
+ (`pdesc` LIKE '%$search%') OR
+ (`locality` LIKE '%$search%') OR
+ (`region` LIKE '%$search%') OR
+ (`country-name` LIKE '%$search%') OR
+ (`gender` LIKE '%$search%') OR
+ (`marital` LIKE '%$search%') OR
+ (`sexual` LIKE '%$search%') OR
+ (`about` LIKE '%$search%') OR
+ (`romance` LIKE '%$search%') OR
+ (`work` LIKE '%$search%') OR
+ (`education` LIKE '%$search%') OR
+ (`pub_keywords` LIKE '%$search%') OR
+ (`prv_keywords` LIKE '%$search%'))";
+ }
$publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " );
- $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra ");
+ $r = $db->q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra ");
if(count($r))
$a->set_pager_total($r[0]['total']);
- $order = " ORDER BY `name` ASC ";
+ $order = " ORDER BY `name` ASC ";
+ $limit = intval($a->pager['start']).",".intval($a->pager['itemspage']);
- $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ",
- intval($a->pager['start']),
- intval($a->pager['itemspage'])
- );
+ $r = $db->q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT ".$limit);
if(count($r)) {
if(in_array('small', $a->argv))
$profiledata["network"] = $item["network"];
// Fetching further contact data from the contact table
- $r = q("SELECT `photo`, `nick`, `location`, `about` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
- normalise_link($profiledata["url"]), $item["uid"]);
+ $r = q("SELECT `photo`, `nick`, `location`, `about` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s'",
+ dbesc(normalise_link($profiledata["url"])), intval($item["uid"]), dbesc($item["network"]));
+
+ if (!count($r))
+ $r = q("SELECT `photo`, `nick`, `location`, `about` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
+ dbesc(normalise_link($profiledata["url"])), intval($item["uid"]));
+
+ if (!count($r))
+ $r = q("SELECT `photo`, `nick`, `location`, `about` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
+ dbesc(normalise_link($profiledata["url"])));
+
if (count($r)) {
$profiledata["photo"] = proxy_url($r[0]["photo"]);
$profiledata["address"] = proxy_parse_html(bbcode($r[0]["location"]));
}
// Fetching profile data from unique contacts
- $r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", normalise_link($profiledata["url"]));
+ $r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($profiledata["url"])));
if (count($r)) {
if ($profiledata["photo"] == "")
$profiledata["photo"] = proxy_url($r[0]["avatar"]);
// Fetching profile data from unique contacts
if ($profiledata["url"] != "") {
- $r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", normalise_link($profiledata["url"]));
+ $r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($profiledata["url"])));
if (count($r)) {
$profiledata["photo"] = proxy_url($r[0]["avatar"]);
$profiledata["address"] = proxy_parse_html(bbcode($r[0]["location"]));
// connect to db
$db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
- $tpl = get_intltext_template('htconfig.tpl');
+ $tpl = get_markup_template('htconfig.tpl');
$txt = replace_macros($tpl,array(
'$dbhost' => $dbhost,
'$dbuser' => $dbuser,
'$phpath' => $phpath,
'$adminmail' => $adminmail
));
+
$result = file_put_contents('.htconfig.php', $txt);
if(! $result) {
$a->data['txt'] = $txt;
}
-
+
$errors = load_database($db);
+
if($errors)
$a->data['db_failed'] = $errors;
return replace_macros($tpl, array(
'$title' => $install_title,
'$pass' => '',
- '$status' => t('Permission denied.'),
+ '$status' => t('Database already in use.'),
'$text' => '',
));
}
$status = true;
$help = "";
if (function_exists('curl_init')){
- $test = fetch_url($a->get_baseurl()."/install/testrewrite");
- if ($test!="ok") {
- $status = false;
- $help = t('Url rewrite in .htaccess is not working. Check your server configuration.');
- }
- check_add($checks, t('Url rewrite is working'), $status, true, $help);
- } else {
- // cannot check modrewrite if libcurl is not installed
- }
+ $test = fetch_url($a->get_baseurl()."/install/testrewrite");
+
+ if ($test!="ok")
+ $test = fetch_url(normalise_link($a->get_baseurl()."/install/testrewrite"));
+ if ($test!="ok") {
+ $status = false;
+ $help = t('Url rewrite in .htaccess is not working. Check your server configuration.');
+ }
+ check_add($checks, t('Url rewrite is working'), $status, true, $help);
+ } else {
+ // cannot check modrewrite if libcurl is not installed
+ }
}
intval(local_user())
);
- // Friendica-Client
- $friendicamobile = ($_SERVER['HTTP_USER_AGENT'] == "Apache-HttpClient/UNAVAILABLE (java 1.4)");
-
// The friendica client has problems with the GUID. this is some workaround
- if ($friendicamobile) {
+ if ($a->is_friendica_app()) {
require_once("include/items.php");
$urldata = parse_url($r[0]['link']);
$guid = basename($urldata["path"]);
$sql_extra = permissions_sql($a->data['user']['uid']);
- $albums = q("SELECT count(distinct `resource-id`) AS `total`, `album` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
+ $albums = q("SELECT count(distinct `resource-id`) AS `total`, `album` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
$sql_extra group by album order by created desc",
intval($a->data['user']['uid']),
dbesc('Contact Photos'),
killme();
}
- $r = q("SELECT `contact`.*, `user`.`nickname` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`
+ $r = q("SELECT `contact`.*, `user`.`nickname` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`
WHERE `user`.`uid` = %d AND `self` = 1 LIMIT 1",
intval($page_owner_uid)
);
killme();
}
- $owner_record = $r[0];
+ $owner_record = $r[0];
if(($a->argc > 3) && ($a->argv[2] === 'album')) {
$albname = datetime_convert('UTC',date_default_timezone_get(),'now', 'Y');
- if((x($_POST,'rotate') !== false) &&
+ if((x($_POST,'rotate') !== false) &&
( (intval($_POST['rotate']) == 1) || (intval($_POST['rotate']) == 2) )) {
logger('rotate');
$arr['visible'] = $visibility;
$arr['origin'] = 1;
- $arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $p[0]['resource-id'] . ']'
- . '[img]' . $a->get_baseurl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.'. $ext . '[/img]'
+ $arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $p[0]['resource-id'] . ']'
+ . '[img]' . $a->get_baseurl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.'. $ext . '[/img]'
. '[/url]';
$item_id = item_store($arr);
* overwhelm the data stream with a hundred newly uploaded photos.
* So we will make the first photo uploaded to this album in the last several hours
* visible by default, the rest will become visible over time when and if
- * they acquire comments, likes, dislikes, and/or tags
+ * they acquire comments, likes, dislikes, and/or tags
*
*/
$visible = 1;
else
$visible = 0;
-
+
if(intval($_REQUEST['not_visible']) || $_REQUEST['not_visible'] === 'true')
$visible = 0;
call_hooks('photo_post_end',$foo);
killme();
}
-
+
$ph = new Photo($imagedata, $type);
$ph->store($page_owner_uid, $visitor, $photo_hash, $filename, $album, 2, 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
$smallest = 2;
}
-
+
$basename = basename($filename);
$uri = item_new_uri($a->get_hostname(), $page_owner_uid);
$arr['visible'] = $visible;
$arr['origin'] = 1;
- $arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo_hash . ']'
- . '[img]' . $a->get_baseurl() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/img]'
+ $arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo_hash . ']'
+ . '[img]' . $a->get_baseurl() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/img]'
. '[/url]';
$item_id = item_store($arr);
$_SESSION['photo_return'] = $a->cmd;
//
- // Parse arguments
+ // Parse arguments
//
if($a->argc > 3) {
));
- return $o;
+ return $o;
}
if($datatype === 'album') {
$album = hex2bin($datum);
- $r = q("SELECT `resource-id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
+ $r = q("SELECT `resource-id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
AND `scale` <= 4 $sql_extra GROUP BY `resource-id`",
intval($owner_uid),
dbesc($album)
else
$order = 'DESC';
- $r = q("SELECT `resource-id`, `id`, `filename`, type, max(`scale`) AS `scale`, `desc` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
+ $r = q("SELECT `resource-id`, `id`, `filename`, type, max(`scale`) AS `scale`, `desc` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
AND `scale` <= 4 $sql_extra GROUP BY `resource-id` ORDER BY `created` $order LIMIT %d , %d",
intval($owner_uid),
dbesc($album),
$imgalt_e = $rr['filename'];
$desc_e = $rr['desc'];
}
-
+
$photos[] = array(
'id' => $rr['id'],
'twist' => ' ' . $twist . rand(2,4),
//$o = '';
// fetch image, item containing image, then comments
- $ph = q("SELECT * FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'
+ $ph = q("SELECT * FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'
$sql_extra ORDER BY `scale` ASC ",
intval($owner_uid),
dbesc($datum)
);
// lock
- $lock = ( ( ($ph[0]['uid'] == local_user()) && (strlen($ph[0]['allow_cid']) || strlen($ph[0]['allow_gid'])
- || strlen($ph[0]['deny_cid']) || strlen($ph[0]['deny_gid'])) )
+ $lock = ( ( ($ph[0]['uid'] == local_user()) && (strlen($ph[0]['allow_cid']) || strlen($ph[0]['allow_gid'])
+ || strlen($ph[0]['deny_cid']) || strlen($ph[0]['deny_gid'])) )
? t('Private Message')
: Null);
$edit = replace_macros($edit_tpl, array(
'$id' => $ph[0]['id'],
- '$rotatecw' => t('Rotate CW (right)'),
- '$rotateccw' => t('Rotate CCW (left)'),
- '$album' => $album_e,
- '$newalbum' => t('New album name'),
+ '$album' => array('albname', t('New album name'), $album_e,''),
+ '$caption' => array('desc', t('Caption'), $caption_e, ''),
+ '$tags' => array('newtag', t('Add a Tag'), "", t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping')),
+ '$rotate_none' => array('rotate',t('Do not rotate'),0,'', true),
+ '$rotate_cw' => array('rotate',t('Rotate CW (right)'),1,''),
+ '$rotate_ccw' => array('rotate',t('Rotate CCW (left)'),2,''),
+
'$nickname' => $a->data['user']['nickname'],
'$resource_id' => $ph[0]['resource-id'],
- '$capt_label' => t('Caption'),
- '$caption' => $caption_e,
- '$tag_label' => t('Add a Tag'),
- '$tags' => $link_item['tag'],
'$permissions' => t('Permissions'),
'$aclselect' => $aclselect_e,
- '$help_tags' => t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'),
+
'$item_id' => ((count($linked_items)) ? $link_item['id'] : 0),
'$submit' => t('Submit'),
'$delete' => t('Delete Photo'),
$profile_link = $profile_url;
-
-
+
+
$dropping = (($item['contact-id'] == $contact_id) || ($item['uid'] == local_user()));
$drop = array(
'dropping' => $dropping,
// Default - show recent photos with upload link (if applicable)
//$o = '';
- $r = q("SELECT `resource-id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
+ $r = q("SELECT `resource-id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
$sql_extra GROUP BY `resource-id`",
intval($a->data['user']['uid']),
dbesc('Contact Photos'),
}
$r = q("SELECT `resource-id`, `id`, `filename`, type, `album`, max(`scale`) AS `scale` FROM `photo`
- WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
+ WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
$sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT %d , %d",
intval($a->data['user']['uid']),
dbesc('Contact Photos'),
else
$twist = 'rotright';
$ext = $phototypes[$rr['type']];
-
+
if($a->theme['template_engine'] === 'internal') {
$alt_e = template_escape($rr['filename']);
$name_e = template_escape($rr['album']);
<?php
require_once("include/datetime.php");
require_once('include/bbcode.php');
-
+require_once("mod/proxy.php");
function ping_init(&$a) {
killme();
}
- $firehose = intval(get_pconfig(local_user(),'system','notify_full'));
-
- // Are the nofications calles from the regular process or via the friendica app?
- $regularnotifications = (intval($_GET['uid']) AND intval($_GET['_']));
-
- $z = ping_get_notifications(local_user(), $regularnotifications);
+ $notifs = ping_get_notifications(local_user());
$sysnotify = 0; // we will update this in a moment
$tags = array();
}
-
- function xmlize($href, $name, $url, $photo, $date, $seen, $message){
- require_once("mod/proxy.php");
- $photo = proxy_url($photo);
- $data = array('href' => &$href, 'name' => &$name, 'url'=>&$url, 'photo'=>&$photo, 'date'=>&$date, 'seen'=>&$seen, 'messsage'=>&$message);
- call_hooks('ping_xmlize', $data);
- $notsxml = '<note href="%s" name="%s" url="%s" photo="%s" date="%s" seen="%s" >%s</note>';
+ /**
+ * return xml from notification array
+ *
+ * @param array $n Notification array:
+ * 'href' => notification link
+ * 'name' => subject name
+ * 'url' => subject url
+ * 'photo' => subject photo
+ * 'date' => notification date
+ * 'seen' => bool true/false
+ * 'message' => notification message. "{0}" will be replaced by subject name
+ **/
+ function xmlize($n){
+ $n['photo'] = proxy_url($n['photo']);
+
+ $n['message'] = html_entity_decode($n['message'], ENT_COMPAT | ENT_HTML401, "UTF-8");
+ $n['name'] = html_entity_decode($n['name'], ENT_COMPAT | ENT_HTML401, "UTF-8");
+
+ // Are the nofications calles from the regular process or via the friendica app?
+ $regularnotifications = (intval($_GET['uid']) AND intval($_GET['_']));
+
+ $a = get_app();
+
+ if ($a->is_friendica_app() OR !$regularnotifications)
+ $n['message'] = str_replace("{0}", $n['name'], $n['message']);
+
+ $local_time = datetime_convert('UTC',date_default_timezone_get(),$n['date']);
+
+ call_hooks('ping_xmlize', $n);
+ $notsxml = '<note href="%s" name="%s" url="%s" photo="%s" date="%s" seen="%s" timestamp="%s" >%s</note>'."\n";
return sprintf ( $notsxml,
- xmlify($href), xmlify($name), xmlify($url), xmlify($photo), xmlify($date), xmlify($seen), xmlify($message)
+ xmlify($n['href']), xmlify($n['name']), xmlify($n['url']), xmlify($n['photo']),
+ xmlify(relative_date($n['date'])), xmlify($n['seen']), xmlify(strtotime($local_time)),
+ xmlify($n['message'])
);
}
<birthdays>$birthdays</birthdays>
<birthdays-today>$birthdays_today</birthdays-today>\r\n";
- $tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags);
-
- if($firehose) {
- echo ' <notif count="'.$tot.'">';
- }
- else {
- if(count($z) && (! $sysnotify)) {
- foreach($z as $zz) {
- if($zz['seen'] == 0)
- $sysnotify ++;
- }
- }
-
- echo ' <notif count="'. ($sysnotify + $intro + $mail + $register) .'">';
- if ($intro>0){
- foreach ($intros as $i) {
- echo xmlize($a->get_baseurl().'/notifications/intros/'.$i['id'], $i['name'], $i['url'], $i['photo'], relative_date($i['datetime']), 'notify-unseen', "→ ".t("{0} wants to be your friend"));
- };
- }
- if ($mail>0){
- foreach ($mails as $i) {
- echo xmlize($a->get_baseurl().'/message/'.$i['id'], $i['from-name'], $i['from-url'], $i['from-photo'], relative_date($i['created']), 'notify-unseen',"→ ".t("{0} sent you a message"));
- };
- }
- if ($register>0){
- foreach ($regs as $i) {
- echo xmlize($a->get_baseurl().'/admin/users/', $i['name'], $i['url'], $i['micro'], relative_date($i['created']), 'notify-unseen', "→ ".t("{0} requested registration"));
- };
- }
-
- if(count($z)) {
- foreach($z as $zz) {
- echo xmlize($a->get_baseurl() . '/notify/view/' . $zz['id'], $zz['name'],$zz['url'],$zz['photo'],relative_date($zz['date']), ($zz['seen'] ? 'notify-seen' : 'notify-unseen'), ($zz['seen'] ? '' : '→ ') .strip_tags(bbcode($zz['msg'])));
- }
+ if(count($notifs) && (! $sysnotify)) {
+ foreach($notifs as $zz) {
+ if($zz['seen'] == 0)
+ $sysnotify ++;
}
}
- if($firehose) {
- if ($intro>0){
- foreach ($intros as $i) {
- echo xmlize( $a->get_baseurl().'/notifications/intros/'.$i['id'], $i['name'], $i['url'], $i['photo'], relative_date($i['datetime']), 'notify-unseen',t("{0} wants to be your friend") );
- };
+ echo ' <notif count="'. ($sysnotify + $intro + $mail + $register) .'">';
+
+ // merge all notification types in one array
+ if ($intro>0){
+ foreach ($intros as $i) {
+ $n = array(
+ 'href' => $a->get_baseurl().'/notifications/intros/'.$i['id'],
+ 'name' => $i['name'],
+ 'url' => $i['url'],
+ 'photo' => $i['photo'],
+ 'date' => $i['datetime'],
+ 'seen' => false,
+ 'message' => t("{0} wants to be your friend"),
+ );
+ $notifs[] = $n;
}
- if ($mail>0){
- foreach ($mails as $i) {
- echo xmlize( $a->get_baseurl().'/message/'.$i['id'], $i['from-name'], $i['from-url'], $i['from-photo'], relative_date($i['created']), 'notify-unseen',t("{0} sent you a message") );
- };
- }
- if ($register>0){
- foreach ($regs as $i) {
- echo xmlize( $a->get_baseurl().'/admin/users/', $i['name'], $i['url'], $i['micro'], relative_date($i['created']), 'notify-unseen',t("{0} requested registration") );
- };
- }
-
- if (count($comments)){
- foreach ($comments as $i) {
- echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), 'notify-unseen',sprintf( t("{0} commented %s's post"), $i['pname'] ) );
- };
- }
- if (count($likes)){
- foreach ($likes as $i) {
- echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), 'notify-unseen',sprintf( t("{0} liked %s's post"), $i['pname'] ) );
- };
- }
- if (count($dislikes)){
- foreach ($dislikes as $i) {
- echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), 'notify-unseen',sprintf( t("{0} disliked %s's post"), $i['pname'] ) );
- };
- }
- if (count($friends)){
- foreach ($friends as $i) {
- echo xmlize($a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'],$i['author-name'],$i['author-link'], $i['author-avatar'], relative_date($i['created']), 'notify-unseen',sprintf( t("{0} is now friends with %s"), $i['fname'] ) );
- };
+ }
+
+ if ($mail>0){
+ foreach ($mails as $i) {
+ $n = array(
+ 'href' => $a->get_baseurl().'/message/'.$i['id'],
+ 'name' => $i['from-name'],
+ 'url' => $i['from-url'],
+ 'photo' => $i['from-photo'],
+ 'date' => $i['created'],
+ 'seen' => false,
+ 'message' => t("{0} sent you a message"),
+ );
+ $notifs[] = $n;
}
- if (count($posts)){
- foreach ($posts as $i) {
- echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), 'notify-unseen',sprintf( t("{0} posted") ) );
- };
+ }
+
+ if ($register>0){
+ foreach ($regs as $i) {
+ $n = array(
+ 'href' => $a->get_baseurl().'/admin/users/',
+ 'name' => $i['name'],
+ 'url' => $i['url'],
+ 'photo' => $i['micro'],
+ 'date' => $i['created'],
+ 'seen' => false,
+ 'message' => t("{0} requested registration"),
+ );
+ $notifs[] = $n;
}
- if (count($tags)){
- foreach ($tags as $i) {
- echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), 'notify-unseen',sprintf( t("{0} tagged %s's post with #%s"), $i['pname'], $i['tname'] ) );
- };
+ }
+ // sort notifications by $[]['date']
+ $sort_function = function($a, $b) {
+ $adate = date($a['date']);
+ $bdate = date($b['date']);
+ if ($adate == $bdate) {
+ return 0;
}
+ return ($adate < $bdate) ? 1 : -1;
+ };
+ usort($notifs, $sort_function);
- if (count($cit)){
- foreach ($cit as $i) {
- echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), 'notify-unseen',t("{0} mentioned you in a post") );
- };
+ if(count($notifs)) {
+ foreach($notifs as $n) {
+ echo xmlize($n);
}
}
+
echo " </notif>";
}
echo " <sysmsgs>";
killme();
}
-function ping_get_notifications($uid, $regularnotifications) {
+function ping_get_notifications($uid) {
$result = array();
$offset = 0;
$seen = false;
$seensql = "NOT";
- $order = "";
+ $order = "DESC";
$quit = false;
+ $a = get_app();
+
do {
$r = q("SELECT `notify`.*, `item`.`visible`, `item`.`spam`, `item`.`deleted`
FROM `notify` LEFT JOIN `item` ON `item`.`id` = `notify`.`iid`
$quit = true;
else
$offset += 50;
+
foreach ($r AS $notification) {
if (is_null($notification["visible"]))
if (is_null($notification["deleted"]))
$notification["deleted"] = 0;
- $notification["msg"] = strip_tags(bbcode($notification["msg"]));
+ $notification["message"] = strip_tags(bbcode($notification["msg"]));
$notification["name"] = strip_tags(bbcode($notification["name"]));
// Replace the name with {0} but ensure to make that only once
// The {0} is used later and prints the name in bold.
- // But don't do it for the android app.
- $pos = strpos($notification["msg"],$notification['name']);
- if (($pos !== false) AND $regularnotifications)
- $notification["msg"] = substr_replace($notification["msg"],"{0}",$pos,strlen($notification["name"]));
- else
- $notification["msg"] = str_replace("{0}", $notification["name"], $notification["msg"]);
+ $pos = strpos($notification["message"],$notification['name']);
+ if ($pos !== false)
+ $notification["message"] = substr_replace($notification["message"],"{0}",$pos,strlen($notification["name"]));
+
+ $notification['href'] = $a->get_baseurl() . '/notify/view/' . $notification['id'];
+
if ($notification["visible"] AND !$notification["spam"] AND
- !$notification["deleted"] AND !is_array($result[$notification["parent"]]))
+ !$notification["deleted"] AND !is_array($result[$notification["parent"]])) {
$result[$notification["parent"]] = $notification;
+ }
}
} while ((count($result) < 50) AND !$quit);
+
return($result);
}
'$notify7' => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''),
'$notify8' => array('notify8', t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''),
- '$desktop_notifications' => t('Activate desktop notifications'),
- '$desktop_notifications_note' => t('Note: This is an experimental feature, as being not supported by each browser'),
- '$desktop_notifications_success_message' => t('You will now receive desktop notifications!'),
-
+ '$desktop_notifications' => array('desktop_notifications', t('Activate desktop notifications') , false, t('Show desktop popup on new notifications')),
+
'$email_textonly' => array('email_textonly', t('Text-only notification emails'),
get_pconfig(local_user(),'system','email_textonly'),
t('Send text only notification emails, without the html part')),
'$dspr' => $dspr,
'$salmon' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'],
'$salmen' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'] . '/mention',
+ '$subscribe' => $a->get_baseurl() . '/follow?url={uri}',
'$modexp' => 'data:application/magic-public-key,' . $salmon_key,
'$bigkey' => salmon_key($r[0]['pubkey'])
));
$a->strings["Photo:"] = "";
$a->strings["Please visit %s to approve or reject the suggestion."] = "";
$a->strings["[Friendica:Notify] Connection accepted"] = "";
-$a->strings["'%1\$s' has acepted your connection request at %2\$s"] = "";
+$a->strings["'%1\$s' has accepted your connection request at %2\$s"] = "";
$a->strings["%2\$s has accepted your [url=%1\$s]connection request[/url]."] = "";
$a->strings["You are now mutual friends and may exchange status updates, photos, and email\n\twithout restriction."] = "";
$a->strings["Please visit %s if you wish to make any changes to this relationship."] = "";
+++ /dev/null
-
-<?php
-
-// Set the following for your MySQL installation
-// Copy or rename this file to .htconfig.php
-
-$db_host = '{{$dbhost}}';
-$db_user = '{{$dbuser}}';
-$db_pass = '{{$dbpass}}';
-$db_data = '{{$dbdata}}';
-
-// 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 $a->path to 'directory/subdirectory'.
-
-$a->path = '{{$urlpath}}';
-
-// 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.
-
-$default_timezone = '{{$timezone}}';
-
-// What is your site name?
-
-$a->config['sitename'] = "La Meva Xarxa d'Amics";
-
-// 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
-// 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['register_policy'] = REGISTER_OPEN;
-$a->config['register_text'] = '';
-$a->config['admin_email'] = '{{$adminmail}}';
-
-// Maximum size of an imported message, 0 is unlimited
-
-$a->config['max_import_size'] = 200000;
-
-// maximum size of uploaded photos
-
-$a->config['system']['maximagesize'] = 800000;
-
-// Location of PHP command line processor
-
-$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.
-// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
-
-$a->config['system']['rino_encrypt'] = true;
-
-// default system theme
-
-$a->config['system']['theme'] = 'duepuntozero';
-
+++ /dev/null
-
-<?php
-
-// Nastavte následující pro Vaši instalaci MySQL
-// Zkopírujte nebo přejmenujte tento soubor na .htconfig.php
-
-$db_host = '{{$dbhost}}';
-$db_user = '{{$dbuser}}';
-$db_pass = '{{$dbpass}}';
-$db_data = '{{$dbdata}}';
-
-// Pokud používáte podadresár z vaší domény, budete zde potřebovat zadat
-// relativní cestu (od kořene vaší domény).
-// Například pokud je URL adresa vaší instance 'http://priklad.cz/adresar/podadresar',
-// nastavte $a->path na 'adresar/podadresar'.
-
-$a->path = '{{$urlpath}}';
-
-// Vyberte platnou defaultní časovou zónu. Pokud si nejste jistí, použijte use "Europe/Prague".
-// Toto nastavení lze změnit i později a používá se pouze pro časové značky anonymních čtenářů.
-
-$default_timezone = '{{$timezone}}';
-
-// Jak se jmenuje Váš web?
-
-$a->config['sitename'] = "Moje síť přátel";
-
-// Nastavení defaultního jazyka webu
-
-$a->config['system']['language'] = 'cs';
-
-// Vaše možnosti jsou REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
-// Ujistěte se, že jste si vytvořili Váš osobníúčet dříve, než nastavíte
-// REGISTER_CLOSED. 'register_text' (pokud je nastaven) se bude zobrazovat jako první text na
-// registrační stránce. REGISTER_APPROVE vyžaduje aby byl nastaven 'admin_email'
-// na e-mailovou adresu již existující registrované osoby, která může autorizovat
-// a/nebo schvalovat/odmítat žádosti o registraci.
-
-$a->config['register_policy'] = REGISTER_OPEN;
-$a->config['register_text'] = '';
-$a->config['admin_email'] = '{{$adminmail}}';
-
-// Maximální velikost importované zprávy, 0 je neomezeno
-
-$a->config['max_import_size'] = 200000;
-
-// maximální velikost nahrávaných fotografií
-
-$a->config['system']['maximagesize'] = 800000;
-
-// cesta k PHP command line processor
-
-$a->config['php_path'] = '{{$phpath}}';
-
-// URL adresy globálního adresáře.
-
-$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit';
-$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search=';
-
-// PuSH - také zvaný jako pubsubhubbub URL. Tímto zajistíte doručování veřejných přízpěvků stejně rychle jako těch soukromých
-
-$a->config['system']['huburl'] = '[internal]';
-
-// Server-to-server private message encryption (RINO) je defaultně povolen.
-// Šifrování bude zajištěno pouze pokud je toto nastaveno na true a
-// PHP mcrypt extension jsou nainstalována na obou systémech
-
-$a->config['system']['rino_encrypt'] = true;
-
-// defaultní systémové grafické téma
-
-$a->config['system']['theme'] = 'duepuntozero';
-
-
+++ /dev/null
-
-<?php
-
-// Set the following for your MySQL installation
-// Copy or rename this file to .htconfig.php
-
-$db_host = '{{$dbhost}}';
-$db_user = '{{$dbuser}}';
-$db_pass = '{{$dbpass}}';
-$db_data = '{{$dbdata}}';
-
-// 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 $a->path to 'directory/subdirectory'.
-
-$a->path = '{{$urlpath}}';
-
-// 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.
-
-$default_timezone = '{{$timezone}}';
-
-// What is your site name?
-
-$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
-// 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['register_policy'] = REGISTER_OPEN;
-$a->config['register_text'] = '';
-$a->config['admin_email'] = '{{$adminmail}}';
-
-// Maximum size of an imported message, 0 is unlimited
-
-$a->config['max_import_size'] = 200000;
-
-// maximum size of uploaded photos
-
-$a->config['system']['maximagesize'] = 800000;
-
-// Location of PHP command line processor
-
-$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.
-// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
-
-$a->config['system']['rino_encrypt'] = true;
-
-// default system theme
-
-$a->config['system']['theme'] = 'duepuntozero';
-
+++ /dev/null
-
-<?php
-
-// Set the following for your MySQL installation
-// Copy or rename this file to .htconfig.php
-
-$db_host = '{{$dbhost}}';
-$db_user = '{{$dbuser}}';
-$db_pass = '{{$dbpass}}';
-$db_data = '{{$dbdata}}';
-
-// 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 $a->path to 'directory/subdirectory'.
-
-$a->path = '{{$urlpath}}';
-
-// 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.
-
-$default_timezone = '{{$timezone}}';
-
-// What is your site name?
-
-$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
-// 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['register_policy'] = REGISTER_OPEN;
-$a->config['register_text'] = '';
-$a->config['admin_email'] = '{{$adminmail}}';
-
-// Maximum size of an imported message, 0 is unlimited
-
-$a->config['max_import_size'] = 200000;
-
-// maximum size of uploaded photos
-
-$a->config['system']['maximagesize'] = 800000;
-
-// Location of PHP command line processor
-
-$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.
-// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
-
-$a->config['system']['rino_encrypt'] = true;
-
-// default system theme
-
-$a->config['system']['theme'] = 'duepuntozero';
-
-// By default allow pseudonyms
-
-$a->config['system']['no_regfullname'] = true;
+++ /dev/null
-
-<?php
-
-// Set the following for your MySQL installation
-// Copy or rename this file to .htconfig.php
-
-$db_host = '{{$dbhost}}';
-$db_user = '{{$dbuser}}';
-$db_pass = '{{$dbpass}}';
-$db_data = '{{$dbdata}}';
-
-// 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 $a->path to 'directory/subdirectory'.
-
-$a->path = '{{$urlpath}}';
-
-// 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.
-
-$default_timezone = '{{$timezone}}';
-
-// What is your site name?
-
-$a->config['sitename'] = "La Mia Rete di Amici";
-
-// 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
-// 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['register_policy'] = REGISTER_OPEN;
-$a->config['register_text'] = '';
-$a->config['admin_email'] = '{{$adminmail}}';
-
-// Maximum size of an imported message, 0 is unlimited
-
-$a->config['max_import_size'] = 200000;
-
-// maximum size of uploaded photos
-
-$a->config['system']['maximagesize'] = 800000;
-
-// Location of PHP command line processor
-
-$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.
-// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
-
-$a->config['system']['rino_encrypt'] = true;
-
-// default system theme
-
-$a->config['system']['theme'] = 'duepuntozero';
-
+++ /dev/null
-
-<?php
-
-// Set the following for your MySQL installation
-// Copy or rename this file to .htconfig.php
-
-$db_host = '{{$dbhost}}';
-$db_user = '{{$dbuser}}';
-$db_pass = '{{$dbpass}}';
-$db_data = '{{$dbdata}}';
-
-// 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 $a->path to 'directory/subdirectory'.
-
-$a->path = '{{$urlpath}}';
-
-// 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.
-
-$default_timezone = '{{$timezone}}';
-
-// What is your site name?
-
-$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
-// 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['register_policy'] = REGISTER_OPEN;
-$a->config['register_text'] = '';
-$a->config['admin_email'] = '{{$adminmail}}';
-
-// Maximum size of an imported message, 0 is unlimited
-
-$a->config['max_import_size'] = 200000;
-
-// maximum size of uploaded photos
-
-$a->config['system']['maximagesize'] = 800000;
-
-// Location of PHP command line processor
-
-$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.
-// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
-
-$a->config['system']['rino_encrypt'] = true;
-
-// default system theme
-
-$a->config['system']['theme'] = 'duepuntozero';
-
span.oembed, h4 {
margin: 0px 0px 0px 0px;
}
+
+/* fields help text */
+.field .field_help {
+ clear: left;
+}
+
+/* notifications unseen */
+.notify-unseen { background-color: #cceeFF; }
\ No newline at end of file
+++ /dev/null
-
-<?php
-
-// Set the following for your MySQL installation
-// Copy or rename this file to .htconfig.php
-
-$db_host = '$dbhost';
-$db_user = '$dbuser';
-$db_pass = '$dbpass';
-$db_data = '$dbdata';
-
-// 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 $a->path to 'directory/subdirectory'.
-
-$a->path = '$urlpath';
-
-// 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.
-
-$default_timezone = '$timezone';
-
-// What is your site name?
-
-$a->config['sitename'] = "La Mia Rete di Amici";
-
-// 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
-// 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['register_policy'] = REGISTER_OPEN;
-$a->config['register_text'] = '';
-$a->config['admin_email'] = '$adminmail';
-
-// Maximum size of an imported message, 0 is unlimited
-
-$a->config['max_import_size'] = 200000;
-
-// maximum size of uploaded photos
-
-$a->config['system']['maximagesize'] = 800000;
-
-// Location of PHP command line processor
-
-$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.
-// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
-
-$a->config['system']['rino_encrypt'] = true;
-
-// default system theme
-
-$a->config['system']['theme'] = 'duepuntozero';
-
+++ /dev/null
-
-<?php
-
-// Set the following for your MySQL installation
-// Copy or rename this file to .htconfig.php
-
-$db_host = '{{$dbhost}}';
-$db_user = '{{$dbuser}}';
-$db_pass = '{{$dbpass}}';
-$db_data = '{{$dbdata}}';
-
-// 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 $a->path to 'directory/subdirectory'.
-
-$a->path = '{{$urlpath}}';
-
-// 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.
-
-$default_timezone = '{{$timezone}}';
-
-// What is your site name?
-
-$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
-// 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['register_policy'] = REGISTER_OPEN;
-$a->config['register_text'] = '';
-$a->config['admin_email'] = '{{$adminmail}}';
-
-// Maximum size of an imported message, 0 is unlimited
-
-$a->config['max_import_size'] = 200000;
-
-// maximum size of uploaded photos
-
-$a->config['system']['maximagesize'] = 800000;
-
-// Location of PHP command line processor
-
-$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.
-// Encryption will only be provided if this setting is true and the
-// PHP mcrypt extension is installed on both systems
-
-$a->config['system']['rino_encrypt'] = true;
-
-// default system theme
-
-$a->config['system']['theme'] = 'duepuntozero';
-
<td class='lastitem_date'>{{$u.lastitem_date}}</td>
<td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.account_expired}}({{$accountexpired}}){{/if}}</td>
<td class="checkbox">
- {{if $u.is_admin}}
-
- {{else}}
- <input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
- {{/if}}
+ {{if $u.is_deletable}}
+ <input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
+ {{else}}
+
+ {{/if}}
<td class="tools">
- {{if $u.is_admin}}
-
- {{else}}
- <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'><span class='icon block {{if $u.blocked==0}}dim{{/if}}'></span></a>
- <a href="{{$baseurl}}/admin/users/delete/{{$u.uid}}?t={{$form_security_token}}" title='{{$delete}}' onclick="return confirm_delete('{{$u.name}}')"><span class='icon drop'></span></a>
- {{/if}}
+ {{if $u.is_deletable}}
+ <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'><span class='icon block {{if $u.blocked==0}}dim{{/if}}'></span></a>
+ <a href="{{$baseurl}}/admin/users/delete/{{$u.uid}}?t={{$form_security_token}}" title='{{$delete}}' onclick="return confirm_delete('{{$u.name}}')"><span class='icon drop'></span></a>
+ {{else}}
+
+ {{/if}}
</td>
</tr>
{{/foreach}}
<center>
<form action="{{$confirm_url}}" id="confirm-form" method="{{$method}}">
- <span id="confirm-message">{{$message}}</span>
+ <h3 id="confirm-message">{{$message}}</h3>
{{foreach $extra_inputs as $input}}
<input type="hidden" name="{{$input.name}}" value="{{$input.value|escape:'html'}}" />
{{/foreach}}
--- /dev/null
+<h1>{{"Drop contact"|t}}</h1>\r
+\r
+{{include file="contact_template.tpl" no_contacts_checkbox=True}}\r
+\r
+{{include file="confirm.tpl"}}\r
+\r
+\r
+<div class="clear"></div>
\ No newline at end of file
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" /><img src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" /></a>
+ {{if !$no_contacts_checkbox}}
<input type="checkbox" class="contact-select" name="contact_batch[]" value="{{$contact.id}}">
+ {{/if}}
{{if $contact.photo_menu}}
<span onclick="openClose('contact-photo-menu-{{$contact.id}}');" class="fakelink contact-photo-menu-button" id="contact-photo-menu-button-{{$contact.id}}">menu</span>
- <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
- <ul>
- {{foreach $contact.photo_menu as $k=>$c}}
- {{if $c.2}}
- <li><a class="{{$k}}" target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
- {{else}}
- <li><a class="{{$k}}" href="{{$c.1}}">{{$c.0}}</a></li>
- {{/if}}
- {{/foreach}}
- </ul>
- </div>
+ <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
+ <ul>
+ {{foreach $contact.photo_menu as $k=>$c}}
+ {{if $c.2}}
+ <li><a class="{{$k}}" target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
+ {{else}}
+ <li><a class="{{$k}}" href="{{$c.1}}">{{$c.0}}</a></li>
+ {{/if}}
+ {{/foreach}}
+ </ul>
+ </div>
{{/if}}
</div>
</div>
<div class="contact-entry-photo-end" ></div>
- <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
+ <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
<div class="contact-entry-end" ></div>
</div>
<div id="event-wrapper" style="display: none;" ><div id="event-title">{{$event_title}}</div>
<div id="event-title-end"></div>
{{foreach $events as $event}}
-<div class="event-list" id="event-{{$event.id}}"> <a href="events/{{$event.link}}">{{$event.title}}</a> {{$event.date}} </div>
+<div class="event-list" id="event-{{$event.id}}"> <a class="cboxElement" href="events/?id={{$event.id}}">{{$event.title}}</a> - {{$event.date}} </div>
{{/foreach}}
</div>
{{/if}}
--- /dev/null
+<?php
+
+// Set the following for your MySQL installation
+// Copy or rename this file to .htconfig.php
+
+$db_host = '{{$dbhost}}';
+$db_user = '{{$dbuser}}';
+$db_pass = '{{$dbpass}}';
+$db_data = '{{$dbdata}}';
+
+// 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'.
+
+$a->path = '{{$urlpath}}';
+
+// 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.
+
+$default_timezone = '{{$timezone}}';
+
+// What is your site name?
+
+$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
+// 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['register_policy'] = REGISTER_OPEN;
+$a->config['register_text'] = '';
+$a->config['admin_email'] = '{{$adminmail}}';
+
+// Maximum size of an imported message, 0 is unlimited
+
+$a->config['max_import_size'] = 200000;
+
+// maximum size of uploaded photos
+
+$a->config['system']['maximagesize'] = 800000;
+
+// Location of PHP command line processor
+
+$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.
+// Encryption will only be provided if this setting is true and the
+// PHP mcrypt extension is installed on both systems
+
+$a->config['system']['rino_encrypt'] = true;
+
+// default system theme
+
+$a->config['system']['theme'] = 'duepuntozero';
+
+// By default allow pseudonyms
+
+$a->config['system']['no_regfullname'] = true;
</nav>
<ul id="nav-notifications-template" style="display:none;" rel="template">
- <li class="{4}"><a href="{0}"><img data-src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
+ <li class="{4}"><a href="{0}" title="{5}"><img data-src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
</ul>
<input type="hidden" name="item_id" value="{{$item_id}}" />
- <label id="photo-edit-albumname-label" for="photo-edit-albumname">{{$newalbum}}</label>
- <input id="photo-edit-albumname" type="text" size="32" name="albname" value="{{$album|escape:'html'}}" />
+ {{include file="field_input.tpl" field=$album}}
+ {{include file="field_input.tpl" field=$caption}}
+ {{include file="field_input.tpl" field=$tags}}
- <div id="photo-edit-albumname-end"></div>
-
- <label id="photo-edit-caption-label" for="photo-edit-caption">{{$capt_label}}</label>
- <input id="photo-edit-caption" type="text" size="84" name="desc" value="{{$caption|escape:'html'}}" />
-
- <div id="photo-edit-caption-end"></div>
-
- <label id="photo-edit-tags-label" for="photo-edit-newtag" >{{$tag_label}}</label>
- <input name="newtag" id="photo-edit-newtag" size="84" title="{{$help_tags}}" type="text" />
-
- <div id="photo-edit-tags-end"></div>
- <div id="photo-edit-rotate-wrapper">
- <div id="photo-edit-rotate-label">
- {{$rotatecw}}<br>
- {{$rotateccw}}
- </div>
- <input type="radio" name="rotate" value="1" /><br>
- <input type="radio" name="rotate" value="2" />
- </div>
- <div id="photo-edit-rotate-end"></div>
+ {{include file="field_radio.tpl" field=$rotate_none}}
+ {{include file="field_radio.tpl" field=$rotate_cw}}
+ {{include file="field_radio.tpl" field=$rotate_ccw}}
<div id="photo-edit-perms" class="photo-edit-perms" >
<a href="#photo-edit-perms-select" id="photo-edit-perms-menu" class="button popupbox" title="{{$permissions}}"/>
<span id="jot-perms-icon" class="icon {{$lockstate}}" ></span>{{$permissions}}
</a>
<div id="photo-edit-perms-menu-end"></div>
-
+
<div style="display: none;">
<div id="photo-edit-perms-select" >
{{$aclselect}}
{{include file="field_intcheckbox.tpl" field=$notify8}}
</div>
+{{include file="field_checkbox.tpl" field=$email_textonly}}
+
+
+<!--
<div class="field">
<button onclick="javascript:Notification.requestPermission(function(perm){if(perm === 'granted')alert('{{$desktop_notifications_success_message}}');});return false;">{{$desktop_notifications}}</button>
<span class="field_help">{{$desktop_notifications_note}}</span>
</div>
-
-{{include file="field_checkbox.tpl" field=$email_textonly}}
+-->
+{{include file="field_yesno.tpl" field=$desktop_notifications}}
+<script>
+(function(){
+ var elm = $("#id_{{$desktop_notifications.0}}_onoff");
+ var ckbox = $("#id_{{$desktop_notifications.0}}");
+
+ if (getNotificationPermission() === 'granted') {
+ ckbox.val(1);
+ elm.find(".off").addClass("hidden");
+ elm.find(".on").removeClass("hidden");
+ }
+ if (getNotificationPermission() === null) {
+ elm.parent(".field.yesno").hide();
+ }
+
+ $("#id_{{$desktop_notifications.0}}_onoff").on("click", function(e){
+
+ if (Notification.permission === 'granted') {
+ localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
+ } else if (Notification.permission === 'denied') {
+ localStorage.setItem('notification-permissions', 'denied');
+
+ ckbox.val(0);
+ elm.find(".on").addClass("hidden");
+ elm.find(".off").removeClass("hidden");
+
+ } else if (Notification.permission === 'default') {
+ Notification.requestPermission(function(choice) {
+ if (choice === 'granted') {
+ localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
+
+ } else {
+ localStorage.setItem('notification-permissions', 'denied');
+ ckbox.val(0);
+ elm.find(".on").addClass("hidden");
+ elm.find(".off").removeClass("hidden");
+ }
+ });
+ }
+
+ //console.log(getNotificationPermission());
+
+
+ })
+})();
+</script>
</div>
href="{{$salmon}}" />
<Link rel="http://salmon-protocol.org/ns/salmon-mention"
href="{{$salmen}}" />
+ <Link rel="http://ostatus.org/schema/1.0/subscribe"
+ template="{{$subscribe}}" />
<Link rel="magic-public-key"
href="{{$modexp}}" />
</nav>
<ul id="nav-notifications-template" style="display:none;" rel="template">
- <li class="{4}"><a href="{0}"><img data-src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
+ <li class="{4}"><a href="{0}" title="{5}"><img data-src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
</ul>
margin: 0px;
padding: 0px;
/*width: 100%; height: 12px; */
+
z-index: 110;
color: #ffffff;
}
overflow: auto;
height: auto;
/*.contact-block-div { width:60px; height: 60px; }*/
+
}
#contact-block .contact-block-h4 {
float: left;
margin-bottom: 2em;
/*.action .s10 { width: 10px; overflow: hidden; padding: 0px;}
.action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/
+
}
.widget h3 {
padding: 0px;
height: 32px;
margin-left: 16px;
/*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
+
}
.comment-edit-preview .contact-photo-menu-button {
top: 15px !important;
min-height: 22px;
padding-top: 6px;
/* a { display: block;}*/
+
}
#photo-caption {
display: block;
#photo-like-div .like-rotator {
float: right;
}
+#photo_edit_form {
+ padding: 1em;
+}
/* profile match wrapper */
.profile-match-wrapper {
float: left;
margin: 0px;
padding: 0px;
/*width: 100%; height: 12px; */
+
z-index: 110;
color: #ffffff;
}
overflow: auto;
height: auto;
/*.contact-block-div { width:60px; height: 60px; }*/
+
}
#contact-block .contact-block-h4 {
float: left;
margin-bottom: 2em;
/*.action .s10 { width: 10px; overflow: hidden; padding: 0px;}
.action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/
+
}
.widget h3 {
padding: 0px;
height: 32px;
margin-left: 16px;
/*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
+
}
.comment-edit-preview .contact-photo-menu-button {
top: 15px !important;
min-height: 22px;
padding-top: 6px;
/* a { display: block;}*/
+
}
#photo-caption {
display: block;
#photo-like-div .like-rotator {
float: right;
}
+#photo_edit_form {
+ padding: 1em;
+}
/* profile match wrapper */
.profile-match-wrapper {
float: left;
margin: 0px;
padding: 0px;
/*width: 100%; height: 12px; */
+
z-index: 110;
color: #ffffff;
}
overflow: auto;
height: auto;
/*.contact-block-div { width:60px; height: 60px; }*/
+
}
#contact-block .contact-block-h4 {
float: left;
margin-bottom: 2em;
/*.action .s10 { width: 10px; overflow: hidden; padding: 0px;}
.action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/
+
}
.widget h3 {
padding: 0px;
height: 32px;
margin-left: 16px;
/*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
+
}
.comment-edit-preview .contact-photo-menu-button {
top: 15px !important;
min-height: 22px;
padding-top: 6px;
/* a { display: block;}*/
+
}
#photo-caption {
display: block;
#photo-like-div .like-rotator {
float: right;
}
+#photo_edit_form {
+ padding: 1em;
+}
/* profile match wrapper */
.profile-match-wrapper {
float: left;
display: block;
margin-left: 200px;
color: @FieldHelpColor;
-
}
.icon {float: left;}
.like-rotator {float: right;}
}
+
+#photo_edit_form {
+ padding: 1em;
+}
+
/* profile match wrapper */
.profile-match-wrapper {
float: left;
<td class='lastitem_date'>{{$u.lastitem_date}}</td>
<td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.account_expired}}({{$accountexpired}}){{/if}}</td>
<td class="checkbox">
- {{if $u.is_admin}}
-
- {{else}}
- <input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
- {{/if}}
+ {{if $u.is_deletable}}
+ <input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
+ {{else}}
+
+ {{/if}}
<td class="tools">
- {{if $u.is_admin}}
-
- {{else}}
- <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'><span class='icon {{if $u.blocked==0}}unlock{{else}}lock{{/if}}'></span></a>
- <a href="{{$baseurl}}/admin/users/delete/{{$u.uid}}?t={{$form_security_token}}" title='{{$delete}}' onclick="return confirm_delete('{{$u.name}}')"><span class='icon delete'></span></a>
- {{/if}}
+ {{if $u.is_deletable}}
+ <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'><span class='icon {{if $u.blocked==0}}unlock{{else}}lock{{/if}}'></span></a>
+ <a href="{{$baseurl}}/admin/users/delete/{{$u.uid}}?t={{$form_security_token}}" title='{{$delete}}' onclick="return confirm_delete('{{$u.name}}')"><span class='icon delete'></span></a>
+ {{else}}
+
+ {{/if}}
</td>
</tr>
{{/foreach}}
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" /><img src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" /></a>
+ {{if !$no_contacts_checkbox}}
<input type="checkbox" class="contact-select" name="contact_batch[]" value="{{$contact.id}}">
+ {{/if}}
{{if $contact.photo_menu}}
<a href="#" rel="#contact-photo-menu-{{$contact.id}}" class="contact-photo-menu-button icon s16 menu" id="contact-photo-menu-button-{{$contact.id}}">menu</a>
<ul class="contact-photo-menu menu-popup" id="contact-photo-menu-{{$contact.id}}">
</nav>
<ul id="nav-notifications-template" style="display:none;" rel="template">
- <li><a href="{0}"><img data-src="{1}">{2} <span class="notif-when">{3}</span></a></li>
+ <li class="{4}"><a href="{0}" title="{5}"><img data-src="{1}">{2} <span class="notif-when">{3}</span></a></li>
</ul>
<div style="position: fixed; top: 3px; left: 5px; z-index:9999">{{$langselector}}</div>
.icon-signout:before { content: "\f08b"; }
.icon-linkedin-sign:before { content: "\f08c"; }
.icon-pushpin:before { content: "\f08d"; }
-.icon-external-link:before { content: "\f08e"; }
+.icon.remote-link:before { content: "\f08e"; }
.icon-signin:before { content: "\f090"; }
.icon-trophy:before { content: "\f091"; }
width: calc(100% - 90px);
border-bottom: 1px solid hsl(198, 21%, 79%);
}
+.wall-item-container.thread_level_2 {
+ margin-left: 80px;
+ width: calc(100% - 90px);
+}
+.wall-item-container.thread_level_3 {
+ margin-left: 95px;
+ width: calc(100% - 105px);
+}
+.wall-item-container.thread_level_4 {
+ margin-left: 110px;
+ width: calc(100% - 120px);
+}
+.wall-item-container.thread_level_5 {
+ margin-left: 125px;
+ width: calc(100% - 135px);
+}
+.wall-item-container.thread_level_6 {
+ margin-left: 140px;
+ width: calc(100% - 150px);
+}
+.wall-item-container.thread_level_7 {
+ margin-left: 155px;
+ width: calc(100% - 165px);
+}
.wall-item-container.comment .wall-item-content {
max-width: 585px;
}
+.wall-item-container.thread_level_3 .wall-item-content {
+ max-width: 570px;
+}
+.wall-item-container.thread_level_4 .wall-item-content {
+ max-width: 555px;
+}
+.wall-item-container.thread_level_5 .wall-item-content {
+ max-width: 540px;
+}
+.wall-item-container.thread_level_6 .wall-item-content {
+ max-width: 525px;
+}
+.wall-item-container.thread_level_7 .wall-item-content {
+ max-width: 510px;
+}
+
+.children .wall-item-comment-wrapper textarea {
+ width: 570px;
+}
+.wall-item-container.thread_level_3 .wall-item-comment-wrapper textarea {
+ width: 555px;
+}
+.wall-item-container.thread_level_4 .wall-item-comment-wrapper textarea {
+ width: 540px;
+}
+.wall-item-container.thread_level_5 .wall-item-comment-wrapper textarea {
+ width: 525px;
+}
+.wall-item-container.thread_level_6 .wall-item-comment-wrapper textarea {
+ width: 510px;
+}
+.wall-item-container.thread_level_7 .wall-item-comment-wrapper textarea {
+ width: 495px;
+}
+
+.children .wall-item-bottom .comment-edit-preview {
+ width: 575px;
+}
+.wall-item-container.thread_level_3 .wall-item-bottom .comment-edit-preview {
+ width: 560px;
+}
+.wall-item-container.thread_level_4 .wall-item-bottom .comment-edit-preview {
+ width: 545px;
+}
+.wall-item-container.thread_level_5 .wall-item-bottom .comment-edit-preview {
+ width: 530px;
+}
+.wall-item-container.thread_level_6 .wall-item-bottom .comment-edit-preview {
+ width: 515px;
+}
+.wall-item-container.thread_level_7 .wall-item-bottom .comment-edit-preview {
+ width: 500px;
+}
.wall-item-container.comment .contact-photo {
width: 32px;
</nav>
<ul id="nav-notifications-template" style="display:none;" rel="template">
- <li><a href="{0}"><img data-src="{1}">{2} <span class="notif-when">{3}</span></a></li>
+ <li class="{4}"><a href="{0}" title="{5}"><img data-src="{1}">{2} <span class="notif-when">{3}</span></a></li>
</ul>
<!--
<div class="icon-flag" style="position: fixed; bottom: 10px; left: 20px; z-index:9;">{{$langselector}}</div>
-->
-{{*
-
-{{if $nav.logout}}<a id="nav-logout-link" class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" >{{$nav.logout.1}}</a> {{/if}}
-{{if $nav.login}}<a id="nav-login-link" class="nav-login-link {{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" >{{$nav.login.1}}</a> {{/if}}
-
-<span id="nav-link-wrapper" >
-
-{{if $nav.register}}<a id="nav-register-link" class="nav-commlink {{$nav.register.2}}" href="{{$nav.register.0}}" title="{{$nav.register.3}}" >{{$nav.register.1}}</a>{{/if}}
-
-<a id="nav-help-link" class="nav-link {{$nav.help.2}}" target="friendica-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" >{{$nav.help.1}}</a>
-
-{{if $nav.apps}}<a id="nav-apps-link" class="nav-link {{$nav.apps.2}}" href="{{$nav.apps.0}}" title="{{$nav.apps.3}}" >{{$nav.apps.1}}</a>{{/if}}
-
-<a id="nav-search-link" class="nav-link {{$nav.search.2}}" href="{{$nav.search.0}}" title="{{$nav.search.3}}" >{{$nav.search.1}}</a>
-<a id="nav-directory-link" class="nav-link {{$nav.directory.2}}" href="{{$nav.directory.0}}" title="{{$nav.directory.3}}" >{{$nav.directory.1}}</a>
-
-{{if $nav.admin}}<a id="nav-admin-link" class="nav-link {{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" >{{$nav.admin.1}}</a>{{/if}}
-
-{{if $nav.notifications}}
-<a id="nav-notify-link" class="nav-commlink {{$nav.notifications.2}}" href="{{$nav.notifications.0}}" title="{{$nav.notifications.3}}" >{{$nav.notifications.1}}</a>
-<span id="notify-update" class="nav-ajax-left"></span>
-{{/if}}
-{{if $nav.messages}}
-<a id="nav-messages-link" class="nav-commlink {{$nav.messages.2}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" >{{$nav.messages.1}}</a>
-<span id="mail-update" class="nav-ajax-left"></span>
-{{/if}}
-
-{{if $nav.manage}}<a id="nav-manage-link" class="nav-commlink {{$nav.manage.2}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}">{{$nav.manage.1}}</a>{{/if}}
-{{if $nav.settings}}<a id="nav-settings-link" class="nav-link {{$nav.settings.2}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}">{{$nav.settings.1}}</a>{{/if}}
-{{if $nav.profiles}}<a id="nav-profiles-link" class="nav-link {{$nav.profiles.2}}" href="{{$nav.profiles.0}}" title="{{$nav.profiles.3}}" >{{$nav.profiles.1}}</a>{{/if}}
-
-
-</span>
-<span id="nav-end"></span>
-<span id="banner">{{$banner}}</span>
-*}}
{{if $mode == display}}
{{else}}
{{if $item.comment_firstcollapsed}}
- <div class="hide-comments-outer">
- <span id="hide-comments-total-{{$item.id}}"
- class="hide-comments-total">{{$item.num_comments}}</span>
+ {{if $item.thread_level<3}}
+ <div class="hide-comments-outer">
+ <span id="hide-comments-total-{{$item.id}}"
+ class="hide-comments-total">{{$item.num_comments}}</span>
<span id="hide-comments-{{$item.id}}"
class="hide-comments fakelink"
onclick="showHideComments({{$item.id}});">{{$item.hide_text}}</span>
- {{if $item.thread_level==3}} -
+<!-- {{if $item.thread_level==3}} -
<span id="hide-thread-{{$item}}-id"
class="fakelink"
onclick="showThread({{$item.id}});">expand</span> /
<span id="hide-thread-{{$item}}-id"
class="fakelink"
onclick="hideThread({{$item.id}});">collapse</span> thread{{/if}}
- </div>
- <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
+-->
+ </div>
+ <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
+ {{else}}
+ <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: block;">
+ {{/if}}
{{/if}}
{{/if}}
<img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
</div>
-<div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}}" id="item-{{$item.guid}}">
+{{if $item.thread_level<7}}
+ <div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}} thread_level_{{$item.thread_level}}" id="item-{{$item.guid}}">
+{{else}}
+ <div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}} thread_level_7" id="item-{{$item.guid}}">
+{{/if}}
<div class="wall-item-item">
<div class="wall-item-info">
<div class="contact-photo-wrapper mframe{{if $item.owner_url}} wwfrom{{/if}}"