mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:42:53 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
e50c0efcdf
826 changed files with 24507 additions and 2632 deletions
59
boot.php
59
boot.php
|
@ -12,7 +12,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
|
||||||
require_once('include/features.php');
|
require_once('include/features.php');
|
||||||
|
|
||||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_VERSION', '3.1.1561' );
|
define ( 'FRIENDICA_VERSION', '3.1.1572' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1157 );
|
define ( 'DB_UPDATE_VERSION', 1157 );
|
||||||
|
|
||||||
|
@ -380,9 +380,13 @@ if(! class_exists('App')) {
|
||||||
'videoheight' => 350,
|
'videoheight' => 350,
|
||||||
'force_max_items' => 0,
|
'force_max_items' => 0,
|
||||||
'thread_allow' => true,
|
'thread_allow' => true,
|
||||||
'stylesheet' => ''
|
'stylesheet' => '',
|
||||||
|
'template_engine' => 'internal',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public $smarty3_ldelim = '{{';
|
||||||
|
public $smarty3_rdelim = '}}';
|
||||||
|
|
||||||
private $scheme;
|
private $scheme;
|
||||||
private $hostname;
|
private $hostname;
|
||||||
private $baseurl;
|
private $baseurl;
|
||||||
|
@ -613,6 +617,16 @@ if(! class_exists('App')) {
|
||||||
if(!isset($this->page['htmlhead']))
|
if(!isset($this->page['htmlhead']))
|
||||||
$this->page['htmlhead'] = '';
|
$this->page['htmlhead'] = '';
|
||||||
$tpl = get_markup_template('head.tpl');
|
$tpl = get_markup_template('head.tpl');
|
||||||
|
|
||||||
|
// If we're using Smarty, then doing replace_macros() will replace
|
||||||
|
// any unrecognized variables with a blank string. Since we delay
|
||||||
|
// replacing $stylesheet until later, we need to replace it now
|
||||||
|
// with another variable name
|
||||||
|
if($this->theme['template_engine'] === 'smarty3')
|
||||||
|
$stylesheet = $this->smarty3_ldelim . '$stylesheet' . $this->smarty3_rdelim;
|
||||||
|
else
|
||||||
|
$stylesheet = '$stylesheet';
|
||||||
|
|
||||||
$this->page['htmlhead'] = replace_macros($tpl,array(
|
$this->page['htmlhead'] = replace_macros($tpl,array(
|
||||||
'$baseurl' => $this->get_baseurl(), // FIXME for z_path!!!!
|
'$baseurl' => $this->get_baseurl(), // FIXME for z_path!!!!
|
||||||
'$local_user' => local_user(),
|
'$local_user' => local_user(),
|
||||||
|
@ -621,7 +635,8 @@ if(! class_exists('App')) {
|
||||||
'$comment' => t('Comment'),
|
'$comment' => t('Comment'),
|
||||||
'$showmore' => t('show more'),
|
'$showmore' => t('show more'),
|
||||||
'$showfewer' => t('show fewer'),
|
'$showfewer' => t('show fewer'),
|
||||||
'$update_interval' => $interval
|
'$update_interval' => $interval,
|
||||||
|
'$stylesheet' => $stylesheet
|
||||||
)) . $this->page['htmlhead'];
|
)) . $this->page['htmlhead'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -954,8 +969,7 @@ if(! function_exists('login')) {
|
||||||
$a->module = 'login';
|
$a->module = 'login';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$o .= replace_macros($tpl, array(
|
||||||
$o .= replace_macros($tpl,array(
|
|
||||||
|
|
||||||
'$dest_url' => $dest_url,
|
'$dest_url' => $dest_url,
|
||||||
'$logout' => t('Logout'),
|
'$logout' => t('Logout'),
|
||||||
|
@ -974,6 +988,13 @@ if(! function_exists('login')) {
|
||||||
|
|
||||||
'$lostpass' => t('Forgot your password?'),
|
'$lostpass' => t('Forgot your password?'),
|
||||||
'$lostlink' => t('Password Reset'),
|
'$lostlink' => t('Password Reset'),
|
||||||
|
|
||||||
|
'$tostitle' => t('Website Terms of Service'),
|
||||||
|
'$toslink' => t('terms of service'),
|
||||||
|
|
||||||
|
'$privacytitle' => t('Website Privacy Policy'),
|
||||||
|
'$privacylink' => t('privacy policy'),
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
call_hooks('login_hook',$o);
|
call_hooks('login_hook',$o);
|
||||||
|
@ -1324,11 +1345,20 @@ if(! function_exists('profile_sidebar')) {
|
||||||
|
|
||||||
$tpl = get_markup_template('profile_vcard.tpl');
|
$tpl = get_markup_template('profile_vcard.tpl');
|
||||||
|
|
||||||
|
$p = array();
|
||||||
|
foreach($profile as $k => $v) {
|
||||||
|
$k = str_replace('-','_',$k);
|
||||||
|
$p[$k] = $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal')
|
||||||
|
$location = template_escape($location);
|
||||||
|
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$profile' => $profile,
|
'$profile' => $p,
|
||||||
'$connect' => $connect,
|
'$connect' => $connect,
|
||||||
'$wallmessage' => $wallmessage,
|
'$wallmessage' => $wallmessage,
|
||||||
'$location' => template_escape($location),
|
'$location' => $location,
|
||||||
'$gender' => $gender,
|
'$gender' => $gender,
|
||||||
'$pdesc' => $pdesc,
|
'$pdesc' => $pdesc,
|
||||||
'$marital' => $marital,
|
'$marital' => $marital,
|
||||||
|
@ -1914,3 +1944,18 @@ function clear_cache($basepath = "", $path = "") {
|
||||||
closedir($dh);
|
closedir($dh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function set_template_engine(&$a, $engine = 'internal') {
|
||||||
|
|
||||||
|
$a->theme['template_engine'] = 'internal';
|
||||||
|
|
||||||
|
if(is_writable('view/smarty3/')) {
|
||||||
|
switch($engine) {
|
||||||
|
case 'smarty3':
|
||||||
|
$a->theme['template_engine'] = 'smarty3';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ Friendica Documentation and Resources
|
||||||
**Contents**
|
**Contents**
|
||||||
|
|
||||||
* [Account Basics](help/Account-Basics)
|
* [Account Basics](help/Account-Basics)
|
||||||
* [New User Quick Start](help/guide)
|
* [New User Quick Start](help/Quick-Start-guide)
|
||||||
* [Creating posts](help/Text_editor)
|
* [Creating posts](help/Text_editor)
|
||||||
* [Comment, sort and delete posts](help/Text_comment)
|
* [Comment, sort and delete posts](help/Text_comment)
|
||||||
* [Profiles](help/Profiles)
|
* [Profiles](help/Profiles)
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
[[!meta title="And Finally..."]]
|
|
||||||
|
|
||||||
And that brings the Quick Start to an end.
|
And that brings the Quick Start to an end.
|
||||||
|
|
||||||
Here are some more things to help get you started:
|
Here are some more things to help get you started:
|
|
@ -1,10 +1,10 @@
|
||||||
This is the global directory. If you get lost, you can <a href = "help/groupsandpages">click this link</a> to bring yourself back here.
|
This is the global directory. If you get lost, you can <a href = "help/Quick-Start-groupsandpages">click this link</a> to bring yourself back here.
|
||||||
|
|
||||||
On this page, you'll find a collection of groups, forums and celebrity pages. Groups are not real people. Connecting to them is similar to "liking" something on Facebook, or signing up for a new forum. You don't have to feel awkward about introducing yourself to a new person, because they're not people!
|
On this page, you'll find a collection of groups, forums and celebrity pages. Groups are not real people. Connecting to them is similar to "liking" something on Facebook, or signing up for a new forum. You don't have to feel awkward about introducing yourself to a new person, because they're not people!
|
||||||
|
|
||||||
When you connect to a group, all messages to that group will start appearing in your network tab. You can comment on these posts, or post to the group yourself without ever having to add any of the groups members. This is a great way to make friends dynamically - you'll find people you like and add each other naturally instead of adding random strangers. Simply find a group you're interested in, and connect to it the same way you did with people in the last section. There are a lot of groups, and you're likely to get lost. Remember the link at the top of this page will bring you back here.
|
When you connect to a group, all messages to that group will start appearing in your network tab. You can comment on these posts, or post to the group yourself without ever having to add any of the groups members. This is a great way to make friends dynamically - you'll find people you like and add each other naturally instead of adding random strangers. Simply find a group you're interested in, and connect to it the same way you did with people in the last section. There are a lot of groups, and you're likely to get lost. Remember the link at the top of this page will bring you back here.
|
||||||
|
|
||||||
Once you've added some groups, <a href="help/andfinally">move on to the next section</a>.
|
Once you've added some groups, <a href="help/Quick-Start-andfinally">move on to the next section</a>.
|
||||||
|
|
||||||
<iframe src="http://dir.friendica.com/directory/forum" width="950" height="600"></iframe>
|
<iframe src="http://dir.friendica.com/directory/forum" width="950" height="600"></iframe>
|
||||||
|
|
|
@ -6,7 +6,7 @@ This is a bit like your Facebook wall. It's where all your status messgages are
|
||||||
|
|
||||||
Once you've finished writing your post, click on the padlock icon to select who can see it. If you do not use the padlock icon, your post will be public. This means it will appear to anybody who views your profile, and in the community tab if your site has it enabled, as well as in the network tab of any of your contacts.
|
Once you've finished writing your post, click on the padlock icon to select who can see it. If you do not use the padlock icon, your post will be public. This means it will appear to anybody who views your profile, and in the community tab if your site has it enabled, as well as in the network tab of any of your contacts.
|
||||||
|
|
||||||
Play around with this a bit, then when you're ready to move on, we'll take a look at the <a href="help/network">Network Tab</a>
|
Play around with this a bit, then when you're ready to move on, we'll take a look at the <a href="help/Quick-Start-network">Network Tab</a>
|
||||||
|
|
||||||
<iframe src="login" width="950" height="600"></iframe>
|
<iframe src="login" width="950" height="600"></iframe>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
This is your Suggested Friends page. If you get lost, you can <a href="help/makenewfriends">click this link</a> to bring yourself back here.
|
This is your Suggested Friends page. If you get lost, you can <a href="help/Quick-Start-makenewfriends">click this link</a> to bring yourself back here.
|
||||||
|
|
||||||
This is a bit like the Friend Suggestions page of Facebook. Everybody on this list has agreed that they may be suggested as a friend. This means they're unlikely to refuse an introduction you send, and they want to meet new people too!
|
This is a bit like the Friend Suggestions page of Facebook. Everybody on this list has agreed that they may be suggested as a friend. This means they're unlikely to refuse an introduction you send, and they want to meet new people too!
|
||||||
|
|
||||||
See somebody you like the look of? Click the connect button beneath their photograph. This will bring you to the introductions page. Fill in the form as instructed, and add a small note (optional). Now, wait a bit and they'll accept your request - note that these are real people, and it might take a while. Now you've added one, you're probably lost. Click the link at the top of this page to go back to the suggested friends list and add some more.
|
See somebody you like the look of? Click the connect button beneath their photograph. This will bring you to the introductions page. Fill in the form as instructed, and add a small note (optional). Now, wait a bit and they'll accept your request - note that these are real people, and it might take a while. Now you've added one, you're probably lost. Click the link at the top of this page to go back to the suggested friends list and add some more.
|
||||||
|
|
||||||
Feel uncomfortable adding people you don't know? Don't worry - that's where <a href="help/groupsandpages">Groups and Pages</a> come in!
|
Feel uncomfortable adding people you don't know? Don't worry - that's where <a href="help/Quick-Start-groupsandpages">Groups and Pages</a> come in!
|
||||||
|
|
||||||
<iframe src="suggest" width="950" height="600"></iframe>
|
<iframe src="suggest" width="950" height="600"></iframe>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
This is your Network Tab. If you get lost, you can <a href="help/network">click this link</a> to bring yourself back here.
|
This is your Network Tab. If you get lost, you can <a href="help/Quick-Start-network">click this link</a> to bring yourself back here.
|
||||||
|
|
||||||
This is a bit like the Newsfeed at Facebook or the Stream at Diaspora. It's where all the posts from your contacts, groups, and feeds will appear. If you're new, you won't see anything in this page, unless you posted your status in the last step. If you've already added a few friends, you'll be able to see their posts. Here, you can comment, like, or dislike posts, or click on somebody's name to visit their profile page where you can write on their wall.
|
This is a bit like the Newsfeed at Facebook or the Stream at Diaspora. It's where all the posts from your contacts, groups, and feeds will appear. If you're new, you won't see anything in this page, unless you posted your status in the last step. If you've already added a few friends, you'll be able to see their posts. Here, you can comment, like, or dislike posts, or click on somebody's name to visit their profile page where you can write on their wall.
|
||||||
|
|
||||||
Now we need to fill it up, the first step, is to <a href="help/makingnewfriends"> make some new friends</a>.
|
Now we need to fill it up, the first step, is to <a href="help/Quick-Start-makingnewfriends"> make some new friends</a>.
|
||||||
|
|
||||||
<iframe src="network" width="950" height="600"></iframe>
|
<iframe src="network" width="950" height="600"></iframe>
|
||||||
|
|
|
@ -4,7 +4,7 @@ Friendica - Dokumentation und Ressourcen
|
||||||
**Inhalte**
|
**Inhalte**
|
||||||
|
|
||||||
* [Account - Basics](help/Account-Basics)
|
* [Account - Basics](help/Account-Basics)
|
||||||
* [Schnellstart für neue Benutzer](help/guide)
|
* [Schnellstart für neue Benutzer](help/Quick-Start-guide)
|
||||||
* [Beiträge erstellen](help/Text_editor)
|
* [Beiträge erstellen](help/Text_editor)
|
||||||
* [Beiträge kommentieren, einordnen und löschen](help/Text_comment)
|
* [Beiträge kommentieren, einordnen und löschen](help/Text_comment)
|
||||||
* [Profile](help/Profiles)
|
* [Profile](help/Profiles)
|
||||||
|
|
|
@ -3,13 +3,13 @@ Gruppen und Seiten
|
||||||
|
|
||||||
* [Zur Startseite der Hilfe](help)
|
* [Zur Startseite der Hilfe](help)
|
||||||
|
|
||||||
Hier siehst du das globale Verzeichnis. Wenn du dich mal verirrt hast, kannst du <a href = "help/groupsandpages">diesen Link klicken</a> und wieder hierher kommen.
|
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.
|
||||||
|
|
||||||
Auf dieser Seite findest du eine Zusammenstellung von Gruppen, Foren und bekannten 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. Habe keine Sorge, falls du dich unbehaglich fühlst, wenn du dich einer neuen Person vorstellen sollst, da es sich nicht um Personen handelt.
|
Auf dieser Seite findest du eine Zusammenstellung von Gruppen, Foren und bekannten 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. Habe keine Sorge, falls du dich unbehaglich fühlst, wenn du dich einer neuen Person vorstellen sollst, da es sich nicht um Personen handelt.
|
||||||
|
|
||||||
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 eine der Gruppenmitglieder persönlich hinzuzufügen. Das ist ein großartiger Weg, dynamisch neue Freunde zu gewinnen. Du findest Personen, die du magst, anstatt Fremde hinzuzufügen. Suche dir einfach eine Gruppe und füge sie so hinzu, wie du auch normale Freunde hinzufügst. Es gibt eine Menge Gruppen und möglicherweise findest du nicht wieder zu dieser Seite zurück. In diesem Fall nutze einfach den Link oben auf dieser Seite.
|
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 eine der Gruppenmitglieder persönlich hinzuzufügen. Das ist ein großartiger Weg, dynamisch neue Freunde zu gewinnen. Du findest Personen, die du magst, anstatt Fremde hinzuzufügen. Suche dir einfach eine Gruppe und füge sie so hinzu, wie du auch normale Freunde hinzufügst. Es gibt eine Menge Gruppen und möglicherweise findest du nicht wieder zu dieser Seite zurück. In diesem Fall nutze einfach den Link oben auf dieser Seite.
|
||||||
|
|
||||||
Wenn du einige Gruppen hinzugefügt hast, gehe <a href="help/andfinally">weiter zum nächsten Schritt</a>.
|
Wenn du einige Gruppen hinzugefügt hast, gehe <a href="help/Quick-Start-andfinally">weiter zum nächsten Schritt</a>.
|
||||||
|
|
||||||
<iframe src="http://dir.friendica.com/directory/forum" width="950" height="600"></iframe>
|
<iframe src="http://dir.friendica.com/directory/forum" width="950" height="600"></iframe>
|
||||||
|
|
|
@ -11,7 +11,7 @@ Hier sieht es ein wenig wie auf deiner Facebook-Seite aus. Hier findest du alle
|
||||||
|
|
||||||
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. Das bedeutet, dass jeder, der dein Profil ansieht, der auf dem "Community"-Tab deines Servers oder auf dem "Netzwerk"-Tab ("Beiträge deiner Kontakte") eines befreundeten Kontakts ist, den Beitrag sehen kann.
|
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. Das bedeutet, dass jeder, der dein Profil ansieht, der auf dem "Community"-Tab deines Servers oder auf dem "Netzwerk"-Tab ("Beiträge deiner Kontakte") eines befreundeten Kontakts ist, den Beitrag sehen kann.
|
||||||
|
|
||||||
Probiere es doch einfach mal aus. Wenn du fertg bist, schauen wir uns den <a href="help/network">"Netzwerk"-Tab</a> an.
|
Probiere es doch einfach mal aus. Wenn du fertg bist, schauen wir uns den <a href="help/Quick-Start-network">"Netzwerk"-Tab</a> an.
|
||||||
|
|
||||||
<iframe src="login" width="950" height="600"></iframe>
|
<iframe src="login" width="950" height="600"></iframe>
|
||||||
|
|
|
@ -3,13 +3,13 @@ Neue Freunde finden
|
||||||
|
|
||||||
* [Zur Startseite der Hilfe](help)
|
* [Zur Startseite der Hilfe](help)
|
||||||
|
|
||||||
Hier siehst du die Kontaktvorschläge. Wenn du dich mal verirrt hast, kannst du <a href="help/makenewfriends">diesen Link klicken</a> und wieder hierher kommen.
|
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.
|
||||||
|
|
||||||
Diese Seite ist ein wenig wie die 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.
|
Diese Seite ist ein wenig wie die 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.
|
||||||
|
|
||||||
Siehst du jemanden, dessen Aussehen du magst? Klicke auf den "Verbinden"-Button 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. 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 kommst zurück zur Seite mit den Kontaktvorschlägen, um weitere Personen hinzuzufügen.
|
Siehst du jemanden, dessen Aussehen du magst? Klicke auf den "Verbinden"-Button 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. 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 kommst zurück zur Seite mit den Kontaktvorschlägen, 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/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>
|
<iframe src="suggest" width="950" height="600"></iframe>
|
||||||
|
|
|
@ -3,11 +3,11 @@ Deine "Netzwerk"-Seite
|
||||||
|
|
||||||
* [Zur Startseite der Hilfe](help)
|
* [Zur Startseite der Hilfe](help)
|
||||||
|
|
||||||
Das ist dein "Netzwerk"-Tab. Wenn du dich mal verirrt hast, kannst du <a href="help/network">diesen Link klicken</a>, um wieder hierher zu kommen.
|
Das 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.
|
||||||
|
|
||||||
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 deinen Status im letzten Schritt noch nicht eingetragen hast. Wenn du bereits ein paar Freunde eingetragen hast, findest du hier ihre Beiträge. Hier kannst du Beiträge kommentieren, eintragen, dass du den Beitrag magst oder ablehnst oder die Profile durch einen Klick auf deren Namen anschauen und auf deren Seite ("Wall") Nachrichten schreiben.
|
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 deinen Status im letzten Schritt noch nicht eingetragen hast. Wenn du bereits ein paar Freunde eingetragen hast, findest du hier ihre Beiträge. Hier kannst du Beiträge kommentieren, eintragen, dass du den Beitrag magst oder ablehnst oder die Profile durch einen Klick auf deren Namen anschauen und auf deren Seite ("Wall") Nachrichten schreiben.
|
||||||
|
|
||||||
Nun wollen wir diese Seite mit Inhalt füllen. Der erste Schritt ist es, Leute <a href="help/makingnewfriends">zu deinem Account hinzuzufügen</a>.
|
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>.
|
||||||
|
|
||||||
<iframe src="network" width="950" height="600"></iframe>
|
<iframe src="network" width="950" height="600"></iframe>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
require_once("bbcode.php");
|
require_once("include/bbcode.php");
|
||||||
require_once("datetime.php");
|
require_once("include/datetime.php");
|
||||||
require_once("conversation.php");
|
require_once("include/conversation.php");
|
||||||
require_once("oauth.php");
|
require_once("include/oauth.php");
|
||||||
require_once("html2plain.php");
|
require_once("include/html2plain.php");
|
||||||
/*
|
/*
|
||||||
* Twitter-Like API
|
* Twitter-Like API
|
||||||
*
|
*
|
||||||
|
|
|
@ -5,6 +5,8 @@ require_once('include/security.php');
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
|
|
||||||
function nuke_session() {
|
function nuke_session() {
|
||||||
|
new_cookie(0); // make sure cookie is deleted on browser close, as a security measure
|
||||||
|
|
||||||
unset($_SESSION['authenticated']);
|
unset($_SESSION['authenticated']);
|
||||||
unset($_SESSION['uid']);
|
unset($_SESSION['uid']);
|
||||||
unset($_SESSION['visitor_id']);
|
unset($_SESSION['visitor_id']);
|
||||||
|
@ -187,18 +189,10 @@ else {
|
||||||
// (i.e. expire when the browser is closed), even when there's a time expiration
|
// (i.e. expire when the browser is closed), even when there's a time expiration
|
||||||
// on the cookie
|
// on the cookie
|
||||||
if($_POST['remember']) {
|
if($_POST['remember']) {
|
||||||
$old_sid = session_id();
|
new_cookie(31449600); // one year
|
||||||
session_set_cookie_params('31449600'); // one year
|
|
||||||
session_regenerate_id(false);
|
|
||||||
|
|
||||||
q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$old_sid = session_id();
|
new_cookie(0); // 0 means delete on browser exit
|
||||||
session_set_cookie_params('0');
|
|
||||||
session_regenerate_id(false);
|
|
||||||
|
|
||||||
q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we haven't failed up this point, log them in.
|
// if we haven't failed up this point, log them in.
|
||||||
|
@ -208,4 +202,10 @@ else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function new_cookie($time) {
|
||||||
|
$old_sid = session_id();
|
||||||
|
session_set_cookie_params("$time");
|
||||||
|
session_regenerate_id(false);
|
||||||
|
|
||||||
|
q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid));
|
||||||
|
}
|
||||||
|
|
|
@ -369,7 +369,7 @@ if(!function_exists('conversation')) {
|
||||||
function conversation(&$a, $items, $mode, $update, $preview = false) {
|
function conversation(&$a, $items, $mode, $update, $preview = false) {
|
||||||
|
|
||||||
|
|
||||||
require_once('bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
$ssl_state = ((local_user()) ? true : false);
|
$ssl_state = ((local_user()) ? true : false);
|
||||||
|
|
||||||
|
@ -581,33 +581,54 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
||||||
|
|
||||||
list($categories, $folders) = get_cats_and_terms($item);
|
list($categories, $folders) = get_cats_and_terms($item);
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$profile_name_e = template_escape($profile_name);
|
||||||
|
$item['title_e'] = template_escape($item['title']);
|
||||||
|
$body_e = template_escape($body);
|
||||||
|
$tags_e = template_escape($tags);
|
||||||
|
$hashtags_e = template_escape($hashtags);
|
||||||
|
$mentions_e = template_escape($mentions);
|
||||||
|
$location_e = template_escape($location);
|
||||||
|
$owner_name_e = template_escape($owner_name);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$profile_name_e = $profile_name;
|
||||||
|
$item['title_e'] = $item['title'];
|
||||||
|
$body_e = $body;
|
||||||
|
$tags_e = $tags;
|
||||||
|
$hashtags_e = $hashtags;
|
||||||
|
$mentions_e = $mentions;
|
||||||
|
$location_e = $location;
|
||||||
|
$owner_name_e = $owner_name;
|
||||||
|
}
|
||||||
|
|
||||||
$tmp_item = array(
|
$tmp_item = array(
|
||||||
'template' => $tpl,
|
'template' => $tpl,
|
||||||
'id' => (($preview) ? 'P0' : $item['item_id']),
|
'id' => (($preview) ? 'P0' : $item['item_id']),
|
||||||
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
||||||
'profile_url' => $profile_link,
|
'profile_url' => $profile_link,
|
||||||
'item_photo_menu' => item_photo_menu($item),
|
'item_photo_menu' => item_photo_menu($item),
|
||||||
'name' => template_escape($profile_name),
|
'name' => $profile_name_e,
|
||||||
'sparkle' => $sparkle,
|
'sparkle' => $sparkle,
|
||||||
'lock' => $lock,
|
'lock' => $lock,
|
||||||
'thumb' => $profile_avatar,
|
'thumb' => $profile_avatar,
|
||||||
'title' => template_escape($item['title']),
|
'title' => $item['title_e'],
|
||||||
'body' => template_escape($body),
|
'body' => $body_e,
|
||||||
'tags' => template_escape($tags),
|
'tags' => $tags_e,
|
||||||
'hashtags' => template_escape($hashtags),
|
'hashtags' => $hashtags_e,
|
||||||
'mentions' => template_escape($mentions),
|
'mentions' => $mentions_e,
|
||||||
'txt_cats' => t('Categories:'),
|
'txt_cats' => t('Categories:'),
|
||||||
'txt_folders' => t('Filed under:'),
|
'txt_folders' => t('Filed under:'),
|
||||||
'has_cats' => ((count($categories)) ? 'true' : ''),
|
'has_cats' => ((count($categories)) ? 'true' : ''),
|
||||||
'has_folders' => ((count($folders)) ? 'true' : ''),
|
'has_folders' => ((count($folders)) ? 'true' : ''),
|
||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
'folders' => $folders,
|
'folders' => $folders,
|
||||||
'text' => strip_tags(template_escape($body)),
|
'text' => strip_tags($body_e),
|
||||||
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
|
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
|
||||||
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
||||||
'location' => template_escape($location),
|
'location' => $location_e,
|
||||||
'indent' => '',
|
'indent' => '',
|
||||||
'owner_name' => template_escape($owner_name),
|
'owner_name' => $owner_name_e,
|
||||||
'owner_url' => $owner_url,
|
'owner_url' => $owner_url,
|
||||||
'owner_photo' => $owner_photo,
|
'owner_photo' => $owner_photo,
|
||||||
'plink' => get_plink($item),
|
'plink' => get_plink($item),
|
||||||
|
@ -856,12 +877,27 @@ function format_like($cnt,$arr,$type,$id) {
|
||||||
if($cnt == 1)
|
if($cnt == 1)
|
||||||
$o .= (($type === 'like') ? sprintf( t('%s likes this.'), $arr[0]) : sprintf( t('%s doesn\'t like this.'), $arr[0])) . EOL ;
|
$o .= (($type === 'like') ? sprintf( t('%s likes this.'), $arr[0]) : sprintf( t('%s doesn\'t like this.'), $arr[0])) . EOL ;
|
||||||
else {
|
else {
|
||||||
$spanatts = 'class="fakelink" onclick="openClose(\'' . $type . 'list-' . $id . '\');"';
|
//$spanatts = 'class="fakelink" onclick="openClose(\'' . $type . 'list-' . $id . '\');"';
|
||||||
$o .= (($type === 'like') ?
|
switch($type) {
|
||||||
sprintf( t('<span %1$s>%2$d people</span> like this.'), $spanatts, $cnt)
|
case 'like':
|
||||||
:
|
// $phrase = sprintf( t('<span %1$s>%2$d people</span> like this.'), $spanatts, $cnt);
|
||||||
sprintf( t('<span %1$s>%2$d people</span> don\'t like this.'), $spanatts, $cnt) );
|
$mood = t('like this');
|
||||||
$o .= EOL ;
|
break;
|
||||||
|
case 'dislike':
|
||||||
|
// $phrase = sprintf( t('<span %1$s>%2$d people</span> don\'t like this.'), $spanatts, $cnt);
|
||||||
|
$mood = t('don\'t like this');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$tpl = get_markup_template("voting_fakelink.tpl");
|
||||||
|
$phrase = replace_macros($tpl, array(
|
||||||
|
'$vote_id' => $type . 'list-' . $id,
|
||||||
|
'$count' => $cnt,
|
||||||
|
'$people' => t('people'),
|
||||||
|
'$vote_mood' => $mood
|
||||||
|
));
|
||||||
|
$o .= $phrase;
|
||||||
|
// $o .= EOL ;
|
||||||
|
|
||||||
$total = count($arr);
|
$total = count($arr);
|
||||||
if($total >= MAX_LIKERS)
|
if($total >= MAX_LIKERS)
|
||||||
$arr = array_slice($arr, 0, MAX_LIKERS - 1);
|
$arr = array_slice($arr, 0, MAX_LIKERS - 1);
|
||||||
|
@ -885,7 +921,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$geotag = (($x['allow_location']) ? get_markup_template('jot_geotag.tpl') : '');
|
$geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
|
||||||
|
|
||||||
/* $plaintext = false;
|
/* $plaintext = false;
|
||||||
if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) )
|
if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) )
|
||||||
|
|
|
@ -12,7 +12,7 @@ function cronhooks_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)) {
|
if(is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,13 +12,13 @@ function delivery_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)) {
|
if(is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once("session.php");
|
require_once("include/session.php");
|
||||||
require_once("datetime.php");
|
require_once("include/datetime.php");
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/diaspora.php');
|
require_once('include/diaspora.php');
|
||||||
|
|
|
@ -752,7 +752,7 @@ function diaspora_request($importer,$xml) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function diaspora_post_allow($importer,$contact) {
|
function diaspora_post_allow($importer,$contact) {
|
||||||
if(($contact['blocked']) || ($contact['readonly']))
|
if(($contact['blocked']) || ($contact['readonly']) || ($contact['archive']))
|
||||||
return false;
|
return false;
|
||||||
if($contact['rel'] == CONTACT_IS_SHARING || $contact['rel'] == CONTACT_IS_FRIEND)
|
if($contact['rel'] == CONTACT_IS_SHARING || $contact['rel'] == CONTACT_IS_FRIEND)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -10,7 +10,7 @@ function directory_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)) {
|
if(is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
};
|
};
|
||||||
|
|
|
@ -310,7 +310,7 @@ function notification($params) {
|
||||||
|
|
||||||
// send email notification if notification preferences permit
|
// send email notification if notification preferences permit
|
||||||
|
|
||||||
require_once('bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
if((intval($params['notify_flags']) & intval($params['type'])) || $params['type'] == NOTIFY_SYSTEM) {
|
if((intval($params['notify_flags']) & intval($params['type'])) || $params['type'] == NOTIFY_SYSTEM) {
|
||||||
|
|
||||||
logger('notification: sending notification email');
|
logger('notification: sending notification email');
|
||||||
|
|
|
@ -11,7 +11,7 @@ function expire_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)) {
|
if(is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
};
|
};
|
||||||
|
|
|
@ -218,7 +218,7 @@ function new_contact($uid,$url,$interactive = false) {
|
||||||
group_add_member($uid,'',$contact_id,$g[0]['def_gid']);
|
group_add_member($uid,'',$contact_id,$g[0]['def_gid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once("Photo.php");
|
require_once("include/Photo.php");
|
||||||
|
|
||||||
$photos = import_profile_photo($ret['photo'],$uid,$contact_id);
|
$photos = import_profile_photo($ret['photo'],$uid,$contact_id);
|
||||||
|
|
||||||
|
|
40
include/friendica_smarty.php
Normal file
40
include/friendica_smarty.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once("library/Smarty/libs/Smarty.class.php");
|
||||||
|
|
||||||
|
class FriendicaSmarty extends Smarty {
|
||||||
|
|
||||||
|
public $filename;
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$a = get_app();
|
||||||
|
$theme = current_theme();
|
||||||
|
|
||||||
|
// setTemplateDir can be set to an array, which Smarty will parse in order.
|
||||||
|
// The order is thus very important here
|
||||||
|
$template_dirs = array('theme' => "view/theme/$theme/smarty3/");
|
||||||
|
if( x($a->theme_info,"extends") )
|
||||||
|
$template_dirs = $template_dirs + array('extends' => "view/theme/".$a->theme_info["extends"]."/smarty3/");
|
||||||
|
$template_dirs = $template_dirs + array('base' => 'view/smarty3/');
|
||||||
|
$this->setTemplateDir($template_dirs);
|
||||||
|
|
||||||
|
$this->setCompileDir('view/smarty3/compiled/');
|
||||||
|
$this->setConfigDir('view/smarty3/config/');
|
||||||
|
$this->setCacheDir('view/smarty3/cache/');
|
||||||
|
|
||||||
|
$this->left_delimiter = $a->smarty3_ldelim;
|
||||||
|
$this->right_delimiter = $a->smarty3_rdelim;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parsed($template = '') {
|
||||||
|
if($template) {
|
||||||
|
return $this->fetch('string:' . $template);
|
||||||
|
}
|
||||||
|
return $this->fetch('file:' . $this->filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ function gprobe_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)) {
|
if(is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "html2bbcode.php";
|
require_once("include/html2bbcode.php");
|
||||||
|
|
||||||
function breaklines($line, $level, $wraplength = 75)
|
function breaklines($line, $level, $wraplength = 75)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1607,7 +1607,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
||||||
|
|
||||||
if((is_array($contact)) && ($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $contact['avatar-date'])) {
|
if((is_array($contact)) && ($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $contact['avatar-date'])) {
|
||||||
logger('consume_feed: Updating photo for ' . $contact['name']);
|
logger('consume_feed: Updating photo for ' . $contact['name']);
|
||||||
require_once("Photo.php");
|
require_once("include/Photo.php");
|
||||||
$photo_failure = false;
|
$photo_failure = false;
|
||||||
$have_photo = false;
|
$have_photo = false;
|
||||||
|
|
||||||
|
@ -2240,7 +2240,7 @@ function local_delivery($importer,$data) {
|
||||||
|
|
||||||
if(($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $importer['avatar-date'])) {
|
if(($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $importer['avatar-date'])) {
|
||||||
logger('local_delivery: Updating photo for ' . $importer['name']);
|
logger('local_delivery: Updating photo for ' . $importer['name']);
|
||||||
require_once("Photo.php");
|
require_once("include/Photo.php");
|
||||||
$photo_failure = false;
|
$photo_failure = false;
|
||||||
$have_photo = false;
|
$have_photo = false;
|
||||||
|
|
||||||
|
|
|
@ -51,13 +51,13 @@ function notifier_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)) {
|
if(is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once("session.php");
|
require_once("include/session.php");
|
||||||
require_once("datetime.php");
|
require_once("include/datetime.php");
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/email.php');
|
require_once('include/email.php');
|
||||||
|
|
|
@ -150,6 +150,7 @@ class FKOAuth1 extends OAuthServer {
|
||||||
$_SESSION['page_flags'] = $record['page-flags'];
|
$_SESSION['page_flags'] = $record['page-flags'];
|
||||||
$_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $record['nickname'];
|
$_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $record['nickname'];
|
||||||
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
|
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
|
||||||
|
$_SESSION["allow_api"] = true;
|
||||||
|
|
||||||
//notice( t("Welcome back ") . $record['username'] . EOL);
|
//notice( t("Welcome back ") . $record['username'] . EOL);
|
||||||
$a->user = $record;
|
$a->user = $record;
|
||||||
|
|
|
@ -18,7 +18,7 @@ function onepoll_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)) {
|
if(is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
};
|
};
|
||||||
|
@ -252,6 +252,9 @@ function onepoll_run(&$argv, &$argc){
|
||||||
|
|
||||||
$stat_writeable = ((($contact['notify']) && ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['rel'] == CONTACT_IS_FRIEND)) ? 1 : 0);
|
$stat_writeable = ((($contact['notify']) && ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['rel'] == CONTACT_IS_FRIEND)) ? 1 : 0);
|
||||||
|
|
||||||
|
if($contact['network'] === NETWORK_OSTATUS && get_pconfig($importer_uid,'system','ostatus_autofriend'))
|
||||||
|
$stat_writeable = 1;
|
||||||
|
|
||||||
if($stat_writeable != $contact['writable']) {
|
if($stat_writeable != $contact['writable']) {
|
||||||
q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1",
|
q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1",
|
||||||
intval($stat_writeable),
|
intval($stat_writeable),
|
||||||
|
|
|
@ -12,7 +12,7 @@ function poller_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)) {
|
if(is_null($db)) {
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,14 +11,14 @@ function queue_run(&$argv, &$argc){
|
||||||
|
|
||||||
if(is_null($db)){
|
if(is_null($db)){
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
require_once("session.php");
|
require_once("include/session.php");
|
||||||
require_once("datetime.php");
|
require_once("include/datetime.php");
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
|
|
|
@ -9,19 +9,39 @@
|
||||||
// depending on the order in which they were declared in the array.
|
// depending on the order in which they were declared in the array.
|
||||||
|
|
||||||
require_once("include/template_processor.php");
|
require_once("include/template_processor.php");
|
||||||
|
require_once("include/friendica_smarty.php");
|
||||||
|
|
||||||
if(! function_exists('replace_macros')) {
|
if(! function_exists('replace_macros')) {
|
||||||
function replace_macros($s,$r) {
|
function replace_macros($s,$r) {
|
||||||
global $t;
|
global $t;
|
||||||
|
|
||||||
//$ts = microtime();
|
// $ts = microtime();
|
||||||
|
$a = get_app();
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'smarty3') {
|
||||||
|
$template = '';
|
||||||
|
if(gettype($s) === 'string') {
|
||||||
|
$template = $s;
|
||||||
|
$s = new FriendicaSmarty();
|
||||||
|
$s->error_reporting = E_ALL & ~E_NOTICE;
|
||||||
|
}
|
||||||
|
foreach($r as $key=>$value) {
|
||||||
|
if($key[0] === '$') {
|
||||||
|
$key = substr($key, 1);
|
||||||
|
}
|
||||||
|
$s->assign($key, $value);
|
||||||
|
}
|
||||||
|
$output = $s->parsed($template);
|
||||||
|
}
|
||||||
|
else {
|
||||||
$r = $t->replace($s,$r);
|
$r = $t->replace($s,$r);
|
||||||
//$tt = microtime() - $ts;
|
|
||||||
|
|
||||||
//$a = get_app();
|
|
||||||
//$a->page['debug'] .= "$tt <br>\n";
|
|
||||||
return template_unescape($r);
|
|
||||||
|
|
||||||
|
$output = template_unescape($r);
|
||||||
|
}
|
||||||
|
// $tt = microtime() - $ts;
|
||||||
|
// $a = get_app();
|
||||||
|
// $a->page['debug'] .= "$tt <br>\n";
|
||||||
|
return $output;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
@ -421,29 +441,63 @@ if(! function_exists('get_intltext_template')) {
|
||||||
function get_intltext_template($s) {
|
function get_intltext_template($s) {
|
||||||
global $lang;
|
global $lang;
|
||||||
|
|
||||||
|
$a = get_app();
|
||||||
|
$engine = '';
|
||||||
|
if($a->theme['template_engine'] === 'smarty3')
|
||||||
|
$engine = "/smarty3";
|
||||||
|
|
||||||
if(! isset($lang))
|
if(! isset($lang))
|
||||||
$lang = 'en';
|
$lang = 'en';
|
||||||
|
|
||||||
if(file_exists("view/$lang/$s"))
|
if(file_exists("view/$lang$engine/$s"))
|
||||||
return file_get_contents("view/$lang/$s");
|
return file_get_contents("view/$lang$engine/$s");
|
||||||
elseif(file_exists("view/en/$s"))
|
elseif(file_exists("view/en$engine/$s"))
|
||||||
return file_get_contents("view/en/$s");
|
return file_get_contents("view/en$engine/$s");
|
||||||
else
|
else
|
||||||
return file_get_contents("view/$s");
|
return file_get_contents("view$engine/$s");
|
||||||
}}
|
}}
|
||||||
|
|
||||||
if(! function_exists('get_markup_template')) {
|
if(! function_exists('get_markup_template')) {
|
||||||
function get_markup_template($s) {
|
function get_markup_template($s, $root = '') {
|
||||||
$a=get_app();
|
// $ts = microtime();
|
||||||
|
$a = get_app();
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'smarty3') {
|
||||||
|
$template_file = get_template_file($a, 'smarty3/' . $s, $root);
|
||||||
|
|
||||||
|
$template = new FriendicaSmarty();
|
||||||
|
$template->filename = $template_file;
|
||||||
|
|
||||||
|
// $tt = microtime() - $ts;
|
||||||
|
// $a->page['debug'] .= "$tt <br>\n";
|
||||||
|
return $template;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$template_file = get_template_file($a, $s, $root);
|
||||||
|
// $file_contents = file_get_contents($template_file);
|
||||||
|
// $tt = microtime() - $ts;
|
||||||
|
// $a->page['debug'] .= "$tt <br>\n";
|
||||||
|
// return $file_contents;
|
||||||
|
return file_get_contents($template_file);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
if(! function_exists("get_template_file")) {
|
||||||
|
function get_template_file($a, $filename, $root = '') {
|
||||||
$theme = current_theme();
|
$theme = current_theme();
|
||||||
|
|
||||||
if(file_exists("view/theme/$theme/$s"))
|
// Make sure $root ends with a slash /
|
||||||
return file_get_contents("view/theme/$theme/$s");
|
if($root !== '' && $root[strlen($root)-1] !== '/')
|
||||||
elseif (x($a->theme_info,"extends") && file_exists("view/theme/".$a->theme_info["extends"]."/$s"))
|
$root = $root . '/';
|
||||||
return file_get_contents("view/theme/".$a->theme_info["extends"]."/$s");
|
|
||||||
else
|
|
||||||
return file_get_contents("view/$s");
|
|
||||||
|
|
||||||
|
if(file_exists($root . "view/theme/$theme/$filename"))
|
||||||
|
$template_file = $root . "view/theme/$theme/$filename";
|
||||||
|
elseif (x($a->theme_info,"extends") && file_exists($root . "view/theme/".$a->theme_info["extends"]."/$filename"))
|
||||||
|
$template_file = $root . "view/theme/".$a->theme_info["extends"]."/$filename";
|
||||||
|
else
|
||||||
|
$template_file = $root . "view/$filename";
|
||||||
|
|
||||||
|
return $template_file;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ load_translation_table($lang);
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
|
|
||||||
if(! $install) {
|
if(! $install) {
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
|
||||||
|
@ -54,7 +54,7 @@ if(! $install) {
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
require_once("session.php");
|
require_once("include/session.php");
|
||||||
load_hooks();
|
load_hooks();
|
||||||
call_hooks('init_1');
|
call_hooks('init_1');
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ if((x($_GET,'zrl')) && (! $install)) {
|
||||||
// header('Link: <' . $a->get_baseurl() . '/amcd>; rel="acct-mgmt";');
|
// header('Link: <' . $a->get_baseurl() . '/amcd>; rel="acct-mgmt";');
|
||||||
|
|
||||||
if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login'))
|
if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login'))
|
||||||
require("auth.php");
|
require("include/auth.php");
|
||||||
|
|
||||||
if(! x($_SESSION,'authenticated'))
|
if(! x($_SESSION,'authenticated'))
|
||||||
header('X-Account-Management-Status: none');
|
header('X-Account-Management-Status: none');
|
||||||
|
|
|
@ -248,11 +248,16 @@ ACL.prototype.populate = function(data){
|
||||||
that.list_content.height(height);
|
that.list_content.height(height);
|
||||||
$(data.items).each(function(){
|
$(data.items).each(function(){
|
||||||
html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
|
html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
|
||||||
html = html.format( this.photo, this.name, this.type, this.id, '', this.network, this.link );
|
html = html.format(this.photo, this.name, this.type, this.id, '', this.network, this.link);
|
||||||
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
|
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
|
||||||
//console.log(html);
|
//console.log(html);
|
||||||
that.list_content.append(html);
|
that.list_content.append(html);
|
||||||
});
|
});
|
||||||
|
$(".acl-list-item img[data-src]").each(function(i, el){
|
||||||
|
// Replace data-src attribute with src attribute for every image
|
||||||
|
$(el).attr('src', $(el).data("src"));
|
||||||
|
$(el).removeAttr("data-src");
|
||||||
|
});
|
||||||
that.update_view();
|
that.update_view();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,14 @@
|
||||||
html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
|
html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
|
||||||
nnm.append(html);
|
nnm.append(html);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("img[data-src]", nnm).each(function(i, el){
|
||||||
|
// Replace data-src attribute with src attribute for every image
|
||||||
|
$(el).attr('src', $(el).data("src"));
|
||||||
|
$(el).removeAttr("data-src");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
notif = eNotif.attr('count');
|
notif = eNotif.attr('count');
|
||||||
if (notif>0){
|
if (notif>0){
|
||||||
$("#nav-notifications-linkmenu").addClass("on");
|
$("#nav-notifications-linkmenu").addClass("on");
|
||||||
|
@ -203,7 +210,6 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
NavUpdate();
|
NavUpdate();
|
||||||
// Allow folks to stop the ajax page updates with the pause/break key
|
// Allow folks to stop the ajax page updates with the pause/break key
|
||||||
$(document).keydown(function(event) {
|
$(document).keydown(function(event) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
require_once("hostxrd.php");
|
require_once("mod/hostxrd.php");
|
||||||
|
|
||||||
function _well_known_init(&$a){
|
function _well_known_init(&$a){
|
||||||
if ($a->argc > 1) {
|
if ($a->argc > 1) {
|
||||||
|
|
|
@ -710,6 +710,16 @@ function admin_page_users(&$a){
|
||||||
$users = array_map("_setup_users", $users);
|
$users = array_map("_setup_users", $users);
|
||||||
|
|
||||||
|
|
||||||
|
// Get rid of dashes in key names, Smarty3 can't handle them
|
||||||
|
foreach($users as $key => $user) {
|
||||||
|
$new_user = array();
|
||||||
|
foreach($user as $k => $v) {
|
||||||
|
$k = str_replace('-','_',$k);
|
||||||
|
$new_user[$k] = $v;
|
||||||
|
}
|
||||||
|
$users[$key] = $new_user;
|
||||||
|
}
|
||||||
|
|
||||||
$t = get_markup_template("admin_users.tpl");
|
$t = get_markup_template("admin_users.tpl");
|
||||||
$o = replace_macros($t, array(
|
$o = replace_macros($t, array(
|
||||||
// strings //
|
// strings //
|
||||||
|
@ -1207,7 +1217,7 @@ function admin_page_remoteupdate(&$a) {
|
||||||
'$ftppath' => array('ftppath', t("FTP Path"), '/',''),
|
'$ftppath' => array('ftppath', t("FTP Path"), '/',''),
|
||||||
'$ftpuser' => array('ftpuser', t("FTP User"), '',''),
|
'$ftpuser' => array('ftpuser', t("FTP User"), '',''),
|
||||||
'$ftppwd' => array('ftppwd', t("FTP Password"), '',''),
|
'$ftppwd' => array('ftppwd', t("FTP Password"), '',''),
|
||||||
'$remotefile'=>array('remotefile','', $u['2'],'')
|
'$remotefile'=>array('remotefile','', $u['2'],''),
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -346,7 +346,7 @@ function contacts_content(&$a) {
|
||||||
|
|
||||||
$lost_contact = (($contact['archive'] && $contact['term-date'] != '0000-00-00 00:00:00' && $contact['term-date'] < datetime_convert('','','now')) ? t('Communications lost with this contact!') : '');
|
$lost_contact = (($contact['archive'] && $contact['term-date'] != '0000-00-00 00:00:00' && $contact['term-date'] < datetime_convert('','','now')) ? t('Communications lost with this contact!') : '');
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$header' => t('Contact Editor'),
|
'$header' => t('Contact Editor'),
|
||||||
'$tab_str' => $tab_str,
|
'$tab_str' => $tab_str,
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
|
@ -388,7 +388,7 @@ function contacts_content(&$a) {
|
||||||
'$dir_icon' => $dir_icon,
|
'$dir_icon' => $dir_icon,
|
||||||
'$alt_text' => $alt_text,
|
'$alt_text' => $alt_text,
|
||||||
'$sparkle' => $sparkle,
|
'$sparkle' => $sparkle,
|
||||||
'$url' => $url
|
'$url' => $url,
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -571,7 +571,7 @@ function contacts_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = get_markup_template("contacts-template.tpl");
|
$tpl = get_markup_template("contacts-template.tpl");
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''),
|
'$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''),
|
||||||
'$tabs' => $t,
|
'$tabs' => $t,
|
||||||
'$total' => $total,
|
'$total' => $total,
|
||||||
|
|
|
@ -309,7 +309,7 @@ function content_content(&$a, $update = 0) {
|
||||||
function render_content(&$a, $items, $mode, $update, $preview = false) {
|
function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||||
|
|
||||||
|
|
||||||
require_once('bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
$ssl_state = ((local_user()) ? true : false);
|
$ssl_state = ((local_user()) ? true : false);
|
||||||
|
|
||||||
|
@ -448,6 +448,23 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||||
|
|
||||||
$body = prepare_body($item,true);
|
$body = prepare_body($item,true);
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$name_e = template_escape($profile_name);
|
||||||
|
$title_e = template_escape($item['title']);
|
||||||
|
$body_e = template_escape($body);
|
||||||
|
$text_e = strip_tags(template_escape($body));
|
||||||
|
$location_e = template_escape($location);
|
||||||
|
$owner_name_e = template_escape($owner_name);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$name_e = $profile_name;
|
||||||
|
$title_e = $item['title'];
|
||||||
|
$body_e = $body;
|
||||||
|
$text_e = strip_tags($body);
|
||||||
|
$location_e = $location;
|
||||||
|
$owner_name_e = $owner_name;
|
||||||
|
}
|
||||||
|
|
||||||
//$tmp_item = replace_macros($tpl,array(
|
//$tmp_item = replace_macros($tpl,array(
|
||||||
$tmp_item = array(
|
$tmp_item = array(
|
||||||
'template' => $tpl,
|
'template' => $tpl,
|
||||||
|
@ -455,17 +472,17 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||||
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
||||||
'profile_url' => $profile_link,
|
'profile_url' => $profile_link,
|
||||||
'item_photo_menu' => item_photo_menu($item),
|
'item_photo_menu' => item_photo_menu($item),
|
||||||
'name' => template_escape($profile_name),
|
'name' => $name_e,
|
||||||
'sparkle' => $sparkle,
|
'sparkle' => $sparkle,
|
||||||
'lock' => $lock,
|
'lock' => $lock,
|
||||||
'thumb' => $profile_avatar,
|
'thumb' => $profile_avatar,
|
||||||
'title' => template_escape($item['title']),
|
'title' => $title_e,
|
||||||
'body' => template_escape($body),
|
'body' => $body_e,
|
||||||
'text' => strip_tags(template_escape($body)),
|
'text' => $text_e,
|
||||||
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
||||||
'location' => template_escape($location),
|
'location' => $location_e,
|
||||||
'indent' => '',
|
'indent' => '',
|
||||||
'owner_name' => template_escape($owner_name),
|
'owner_name' => $owner_name_e,
|
||||||
'owner_url' => $owner_url,
|
'owner_url' => $owner_url,
|
||||||
'owner_photo' => $owner_photo,
|
'owner_photo' => $owner_photo,
|
||||||
'plink' => get_plink($item),
|
'plink' => get_plink($item),
|
||||||
|
@ -802,6 +819,24 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||||
|
|
||||||
$body = prepare_body($item,true);
|
$body = prepare_body($item,true);
|
||||||
//$tmp_item = replace_macros($template,
|
//$tmp_item = replace_macros($template,
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$body_e = template_escape($body);
|
||||||
|
$text_e = strip_tags(template_escape($body));
|
||||||
|
$name_e = template_escape($profile_name);
|
||||||
|
$title_e = template_escape($item['title']);
|
||||||
|
$location_e = template_escape($location);
|
||||||
|
$owner_name_e = template_escape($owner_name);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$body_e = $body;
|
||||||
|
$text_e = strip_tags($body);
|
||||||
|
$name_e = $profile_name;
|
||||||
|
$title_e = $item['title'];
|
||||||
|
$location_e = $location;
|
||||||
|
$owner_name_e = $owner_name;
|
||||||
|
}
|
||||||
|
|
||||||
$tmp_item = array(
|
$tmp_item = array(
|
||||||
// collapse comments in template. I don't like this much...
|
// collapse comments in template. I don't like this much...
|
||||||
'comment_firstcollapsed' => $comment_firstcollapsed,
|
'comment_firstcollapsed' => $comment_firstcollapsed,
|
||||||
|
@ -811,8 +846,8 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||||
|
|
||||||
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
|
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
|
||||||
'tags' => $tags,
|
'tags' => $tags,
|
||||||
'body' => template_escape($body),
|
'body' => $body_e,
|
||||||
'text' => strip_tags(template_escape($body)),
|
'text' => $text_e,
|
||||||
'id' => $item['item_id'],
|
'id' => $item['item_id'],
|
||||||
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
||||||
'olinktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])),
|
'olinktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])),
|
||||||
|
@ -821,19 +856,19 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||||
'vwall' => t('via Wall-To-Wall:'),
|
'vwall' => t('via Wall-To-Wall:'),
|
||||||
'profile_url' => $profile_link,
|
'profile_url' => $profile_link,
|
||||||
'item_photo_menu' => item_photo_menu($item),
|
'item_photo_menu' => item_photo_menu($item),
|
||||||
'name' => template_escape($profile_name),
|
'name' => $name_e,
|
||||||
'thumb' => $profile_avatar,
|
'thumb' => $profile_avatar,
|
||||||
'osparkle' => $osparkle,
|
'osparkle' => $osparkle,
|
||||||
'sparkle' => $sparkle,
|
'sparkle' => $sparkle,
|
||||||
'title' => template_escape($item['title']),
|
'title' => $title_e,
|
||||||
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
||||||
'lock' => $lock,
|
'lock' => $lock,
|
||||||
'location' => template_escape($location),
|
'location' => $location_e,
|
||||||
'indent' => $indent,
|
'indent' => $indent,
|
||||||
'shiny' => $shiny,
|
'shiny' => $shiny,
|
||||||
'owner_url' => $owner_url,
|
'owner_url' => $owner_url,
|
||||||
'owner_photo' => $owner_photo,
|
'owner_photo' => $owner_photo,
|
||||||
'owner_name' => template_escape($owner_name),
|
'owner_name' => $owner_name_e,
|
||||||
'plink' => get_plink($item),
|
'plink' => get_plink($item),
|
||||||
'edpost' => $edpost,
|
'edpost' => $edpost,
|
||||||
'isstarred' => $isstarred,
|
'isstarred' => $isstarred,
|
||||||
|
|
|
@ -76,7 +76,7 @@ function crepair_post(&$a) {
|
||||||
|
|
||||||
if($photo) {
|
if($photo) {
|
||||||
logger('mod-crepair: updating photo from ' . $photo);
|
logger('mod-crepair: updating photo from ' . $photo);
|
||||||
require_once("Photo.php");
|
require_once("include/Photo.php");
|
||||||
|
|
||||||
$photos = import_profile_photo($photo,local_user(),$contact['id']);
|
$photos = import_profile_photo($photo,local_user(),$contact['id']);
|
||||||
|
|
||||||
|
|
|
@ -671,7 +671,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||||
else
|
else
|
||||||
$photo = $a->get_baseurl() . '/images/person-175.jpg';
|
$photo = $a->get_baseurl() . '/images/person-175.jpg';
|
||||||
|
|
||||||
require_once("Photo.php");
|
require_once("include/Photo.php");
|
||||||
|
|
||||||
$photos = import_profile_photo($photo,$local_uid,$dfrn_record);
|
$photos = import_profile_photo($photo,$local_uid,$dfrn_record);
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ function dfrn_request_post(&$a) {
|
||||||
* Scrape the other site's profile page to pick up the dfrn links, key, fn, and photo
|
* Scrape the other site's profile page to pick up the dfrn links, key, fn, and photo
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('Scrape.php');
|
require_once('include/Scrape.php');
|
||||||
|
|
||||||
$parms = scrape_dfrn($dfrn_url);
|
$parms = scrape_dfrn($dfrn_url);
|
||||||
|
|
||||||
|
@ -358,6 +358,7 @@ function dfrn_request_post(&$a) {
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
if(! count($r)) {
|
if(! count($r)) {
|
||||||
|
|
||||||
notice( t('This account has not been configured for email. Request failed.') . EOL);
|
notice( t('This account has not been configured for email. Request failed.') . EOL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -504,7 +505,7 @@ function dfrn_request_post(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once('Scrape.php');
|
require_once('include/Scrape.php');
|
||||||
|
|
||||||
$parms = scrape_dfrn(($hcard) ? $hcard : $url);
|
$parms = scrape_dfrn(($hcard) ? $hcard : $url);
|
||||||
|
|
||||||
|
@ -616,7 +617,7 @@ function dfrn_request_post(&$a) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$url = str_replace('{uri}', $a->get_baseurl() . '/dfrn_poll/' . $nickname, $url);
|
$url = str_replace('{uri}', $a->get_baseurl() . '/profile/' . $nickname, $url);
|
||||||
goaway($url);
|
goaway($url);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
// END $network === NETWORK_OSTATUS
|
// END $network === NETWORK_OSTATUS
|
||||||
|
|
|
@ -143,16 +143,23 @@ function directory_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('directory_item.tpl');
|
$tpl = get_markup_template('directory_item.tpl');
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$location_e = template_escape($location);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$location_e = $location;
|
||||||
|
}
|
||||||
|
|
||||||
$entry = replace_macros($tpl,array(
|
$entry = replace_macros($tpl,array(
|
||||||
'$id' => $rr['id'],
|
'$id' => $rr['id'],
|
||||||
'$profile-link' => $profile_link,
|
'$profile_link' => $profile_link,
|
||||||
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
|
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
|
||||||
'$alt-text' => $rr['name'],
|
'$alt_text' => $rr['name'],
|
||||||
'$name' => $rr['name'],
|
'$name' => $rr['name'],
|
||||||
'$details' => $pdesc . $details,
|
'$details' => $pdesc . $details,
|
||||||
'$page-type' => $page_type,
|
'$page_type' => $page_type,
|
||||||
'$profile' => $profile,
|
'$profile' => $profile,
|
||||||
'$location' => template_escape($location),
|
'$location' => $location_e,
|
||||||
'$gender' => $gender,
|
'$gender' => $gender,
|
||||||
'$pdesc' => $pdesc,
|
'$pdesc' => $pdesc,
|
||||||
'$marital' => $marital,
|
'$marital' => $marital,
|
||||||
|
|
|
@ -16,7 +16,7 @@ function display_content(&$a, $update = 0) {
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$a->page['htmlhead'] .= get_markup_template('display-head.tpl');
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('display-head.tpl'), array());
|
||||||
|
|
||||||
|
|
||||||
if($update) {
|
if($update) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('acl_selectors.php');
|
require_once('include/acl_selectors.php');
|
||||||
|
|
||||||
function editpost_content(&$a) {
|
function editpost_content(&$a) {
|
||||||
|
|
||||||
|
|
|
@ -341,6 +341,17 @@ function events_content(&$a) {
|
||||||
// $tpl = get_markup_template("events.tpl");
|
// $tpl = get_markup_template("events.tpl");
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get rid of dashes in key names, Smarty3 can't handle them
|
||||||
|
foreach($events as $key => $event) {
|
||||||
|
$event_item = array();
|
||||||
|
foreach($event['item'] as $k => $v) {
|
||||||
|
$k = str_replace('-','_',$k);
|
||||||
|
$event_item[$k] = $v;
|
||||||
|
}
|
||||||
|
$events[$key]['item'] = $event_item;
|
||||||
|
}
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
|
|
|
@ -55,9 +55,17 @@ function fbrowser_content($a){
|
||||||
global $a;
|
global $a;
|
||||||
$types = Photo::supportedTypes();
|
$types = Photo::supportedTypes();
|
||||||
$ext = $types[$rr['type']];
|
$ext = $types[$rr['type']];
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$filename_e = template_escape($rr['filename']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$filename_e = $rr['filename'];
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
$a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['hiq'] . '.' .$ext,
|
$a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['hiq'] . '.' .$ext,
|
||||||
template_escape($rr['filename']),
|
$filename_e,
|
||||||
$a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['loq'] . '.'. $ext
|
$a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['loq'] . '.'. $ext
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -70,6 +78,7 @@ function fbrowser_content($a){
|
||||||
'$path' => $path,
|
'$path' => $path,
|
||||||
'$folders' => $albums,
|
'$folders' => $albums,
|
||||||
'$files' =>$files,
|
'$files' =>$files,
|
||||||
|
'$cancel' => t('Cancel'),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +92,15 @@ function fbrowser_content($a){
|
||||||
function files2($rr){ global $a;
|
function files2($rr){ global $a;
|
||||||
list($m1,$m2) = explode("/",$rr['filetype']);
|
list($m1,$m2) = explode("/",$rr['filetype']);
|
||||||
$filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");
|
$filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");
|
||||||
return array( $a->get_baseurl() . '/attach/' . $rr['id'], template_escape($rr['filename']), $a->get_baseurl() . '/images/icons/16/' . $filetype . '.png');
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$filename_e = template_escape($rr['filename']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$filename_e = $rr['filename'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return array( $a->get_baseurl() . '/attach/' . $rr['id'], $filename_e, $a->get_baseurl() . '/images/icons/16/' . $filetype . '.png');
|
||||||
}
|
}
|
||||||
$files = array_map("files2", $files);
|
$files = array_map("files2", $files);
|
||||||
//echo "<pre>"; var_dump($files); killme();
|
//echo "<pre>"; var_dump($files); killme();
|
||||||
|
@ -96,6 +113,7 @@ function fbrowser_content($a){
|
||||||
'$path' => array( array($a->get_baseurl()."/fbrowser/image/", t("Files")) ),
|
'$path' => array( array($a->get_baseurl()."/fbrowser/image/", t("Files")) ),
|
||||||
'$folders' => false,
|
'$folders' => false,
|
||||||
'$files' =>$files,
|
'$files' =>$files,
|
||||||
|
'$cancel' => t('Cancel'),
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ function filer_content(&$a) {
|
||||||
$filetags = get_pconfig(local_user(),'system','filetags');
|
$filetags = get_pconfig(local_user(),'system','filetags');
|
||||||
$filetags = file_tag_file_to_list($filetags,'file');
|
$filetags = file_tag_file_to_list($filetags,'file');
|
||||||
$filetags = explode(",", $filetags);
|
$filetags = explode(",", $filetags);
|
||||||
|
|
||||||
$tpl = get_markup_template("filer_dialog.tpl");
|
$tpl = get_markup_template("filer_dialog.tpl");
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')),
|
'$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('Scrape.php');
|
require_once('include/Scrape.php');
|
||||||
require_once('include/follow.php');
|
require_once('include/follow.php');
|
||||||
|
|
||||||
function follow_init(&$a) {
|
function follow_init(&$a) {
|
||||||
|
|
|
@ -82,7 +82,10 @@ function group_content(&$a) {
|
||||||
$switchtotext = 400;
|
$switchtotext = 400;
|
||||||
|
|
||||||
$tpl = get_markup_template('group_edit.tpl');
|
$tpl = get_markup_template('group_edit.tpl');
|
||||||
$context = array('$submit' => t('Submit'));
|
|
||||||
|
$context = array(
|
||||||
|
'$submit' => t('Submit'),
|
||||||
|
);
|
||||||
|
|
||||||
if(($a->argc == 2) && ($a->argv[1] === 'new')) {
|
if(($a->argc == 2) && ($a->argv[1] === 'new')) {
|
||||||
|
|
||||||
|
@ -217,15 +220,16 @@ function group_content(&$a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$context['$groupeditor'] = $groupeditor;
|
|
||||||
$context['$desc'] = t('Click on a contact to add or remove.');
|
$context['$desc'] = t('Click on a contact to add or remove.');
|
||||||
|
|
||||||
if($change) {
|
if($change) {
|
||||||
|
$context['$groupeditor'] = $groupeditor;
|
||||||
$tpl = get_markup_template('groupeditor.tpl');
|
$tpl = get_markup_template('groupeditor.tpl');
|
||||||
echo replace_macros($tpl, $context);
|
echo replace_macros($tpl, $context);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$context['$groupedit_info'] = $groupeditor;
|
||||||
return replace_macros($tpl, $context);
|
return replace_macros($tpl, $context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,17 @@ function hostxrd_init(&$a) {
|
||||||
set_config('system','site_pubkey', $res['pubkey']);
|
set_config('system','site_pubkey', $res['pubkey']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = file_get_contents('view/xrd_host.tpl');
|
//$tpl = file_get_contents('view/xrd_host.tpl');
|
||||||
echo str_replace(array(
|
/*echo str_replace(array(
|
||||||
'$zhost','$zroot','$domain','$zot_post','$bigkey'),array($a->get_hostname(),z_root(),z_path(),z_root() . '/post', salmon_key(get_config('system','site_pubkey'))),$tpl);
|
'$zhost','$zroot','$domain','$zot_post','$bigkey'),array($a->get_hostname(),z_root(),z_path(),z_root() . '/post', salmon_key(get_config('system','site_pubkey'))),$tpl);*/
|
||||||
|
$tpl = get_markup_template('xrd_host.tpl');
|
||||||
|
echo replace_macros($tpl, array(
|
||||||
|
'$zhost' => $a->get_hostname(),
|
||||||
|
'$zroot' => z_root(),
|
||||||
|
'$domain' => z_path(),
|
||||||
|
'$zot_post' => z_root() . '/post',
|
||||||
|
'$bigkey' => salmon_key(get_config('system','site_pubkey')),
|
||||||
|
));
|
||||||
session_write_close();
|
session_write_close();
|
||||||
exit();
|
exit();
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ function install_post(&$a) {
|
||||||
$dbdata = notags(trim($_POST['dbdata']));
|
$dbdata = notags(trim($_POST['dbdata']));
|
||||||
$phpath = notags(trim($_POST['phpath']));
|
$phpath = notags(trim($_POST['phpath']));
|
||||||
|
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
unset($db);
|
unset($db);
|
||||||
$db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
|
$db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
|
||||||
/*if(get_db_errno()) {
|
/*if(get_db_errno()) {
|
||||||
|
@ -177,6 +177,8 @@ function install_content(&$a) {
|
||||||
|
|
||||||
check_htconfig($checks);
|
check_htconfig($checks);
|
||||||
|
|
||||||
|
check_smarty3($checks);
|
||||||
|
|
||||||
check_keys($checks);
|
check_keys($checks);
|
||||||
|
|
||||||
if(x($_POST,'phpath'))
|
if(x($_POST,'phpath'))
|
||||||
|
@ -249,7 +251,7 @@ function install_content(&$a) {
|
||||||
return $o;
|
return $o;
|
||||||
}; break;
|
}; break;
|
||||||
case 3: { // Site settings
|
case 3: { // Site settings
|
||||||
require_once('datetime.php');
|
require_once('include/datetime.php');
|
||||||
$dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
|
$dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
|
||||||
$dbuser = notags(trim($_POST['dbuser']));
|
$dbuser = notags(trim($_POST['dbuser']));
|
||||||
$dbpass = notags(trim($_POST['dbpass']));
|
$dbpass = notags(trim($_POST['dbpass']));
|
||||||
|
@ -428,6 +430,22 @@ function check_htconfig(&$checks) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_smarty3(&$checks) {
|
||||||
|
$status = true;
|
||||||
|
$help = "";
|
||||||
|
if( !is_writable('view/smarty3') ) {
|
||||||
|
|
||||||
|
$status=false;
|
||||||
|
$help = t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
|
||||||
|
$help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL;
|
||||||
|
$help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
|
||||||
|
$help .= t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
check_add($checks, t('view/smarty3 is writable'), $status, true, $help);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function check_htaccess(&$checks) {
|
function check_htaccess(&$checks) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$status = true;
|
$status = true;
|
||||||
|
|
|
@ -347,16 +347,27 @@ function message_content(&$a) {
|
||||||
$partecipants = sprintf( t("%s and You"), $rr['from-name']);
|
$partecipants = sprintf( t("%s and You"), $rr['from-name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$subject_e = template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>'));
|
||||||
|
$body_e = template_escape($rr['body']);
|
||||||
|
$to_name_e = template_escape($rr['name']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$subject_e = (($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>');
|
||||||
|
$body_e = $rr['body'];
|
||||||
|
$to_name_e = $rr['name'];
|
||||||
|
}
|
||||||
|
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$id' => $rr['id'],
|
'$id' => $rr['id'],
|
||||||
'$from_name' => $partecipants,
|
'$from_name' => $partecipants,
|
||||||
'$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl(true) . '/redir/' . $rr['contact-id'] : $rr['url']),
|
'$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl(true) . '/redir/' . $rr['contact-id'] : $rr['url']),
|
||||||
'$sparkle' => ' sparkle',
|
'$sparkle' => ' sparkle',
|
||||||
'$from_photo' => (($rr['thumb']) ? $rr['thumb'] : $rr['from-photo']),
|
'$from_photo' => (($rr['thumb']) ? $rr['thumb'] : $rr['from-photo']),
|
||||||
'$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>')),
|
'$subject' => $subject_e,
|
||||||
'$delete' => t('Delete conversation'),
|
'$delete' => t('Delete conversation'),
|
||||||
'$body' => template_escape($rr['body']),
|
'$body' => $body_e,
|
||||||
'$to_name' => template_escape($rr['name']),
|
'$to_name' => $to_name_e,
|
||||||
'$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'], t('D, d M Y - g:i A')),
|
'$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'], t('D, d M Y - g:i A')),
|
||||||
'$ago' => relative_date($rr['mailcreated']),
|
'$ago' => relative_date($rr['mailcreated']),
|
||||||
'$seen' => $rr['mailseen'],
|
'$seen' => $rr['mailseen'],
|
||||||
|
@ -371,6 +382,10 @@ function message_content(&$a) {
|
||||||
|
|
||||||
$o .= $header;
|
$o .= $header;
|
||||||
|
|
||||||
|
$plaintext = true;
|
||||||
|
if( local_user() && feature_enabled(local_user(),'richtext') )
|
||||||
|
$plaintext = false;
|
||||||
|
|
||||||
$r = q("SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb`
|
$r = q("SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb`
|
||||||
FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
|
FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
|
||||||
WHERE `mail`.`uid` = %d AND `mail`.`id` = %d LIMIT 1",
|
WHERE `mail`.`uid` = %d AND `mail`.`id` = %d LIMIT 1",
|
||||||
|
@ -408,14 +423,18 @@ function message_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('msg-header.tpl');
|
$tpl = get_markup_template('msg-header.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||||
|
'$baseurl' => $a->get_baseurl(true),
|
||||||
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$nickname' => $a->user['nickname'],
|
'$nickname' => $a->user['nickname'],
|
||||||
'$baseurl' => $a->get_baseurl(true)
|
'$linkurl' => t('Please enter a link URL:')
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl = get_markup_template('msg-end.tpl');
|
$tpl = get_markup_template('msg-end.tpl');
|
||||||
$a->page['end'] .= replace_macros($tpl, array(
|
$a->page['end'] .= replace_macros($tpl, array(
|
||||||
|
'$baseurl' => $a->get_baseurl(true),
|
||||||
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$nickname' => $a->user['nickname'],
|
'$nickname' => $a->user['nickname'],
|
||||||
'$baseurl' => $a->get_baseurl(true)
|
'$linkurl' => t('Please enter a link URL:')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -440,16 +459,29 @@ function message_content(&$a) {
|
||||||
if($extracted['images'])
|
if($extracted['images'])
|
||||||
$message['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $message['contact-id']);
|
$message['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $message['contact-id']);
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$from_name_e = template_escape($message['from-name']);
|
||||||
|
$subject_e = template_escape($message['title']);
|
||||||
|
$body_e = template_escape(smilies(bbcode($message['body'])));
|
||||||
|
$to_name_e = template_escape($message['name']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$from_name_e = $message['from-name'];
|
||||||
|
$subject_e = $message['title'];
|
||||||
|
$body_e = smilies(bbcode($message['body']));
|
||||||
|
$to_name_e = $message['name'];
|
||||||
|
}
|
||||||
|
|
||||||
$mails[] = array(
|
$mails[] = array(
|
||||||
'id' => $message['id'],
|
'id' => $message['id'],
|
||||||
'from_name' => template_escape($message['from-name']),
|
'from_name' => $from_name_e,
|
||||||
'from_url' => $from_url,
|
'from_url' => $from_url,
|
||||||
'sparkle' => $sparkle,
|
'sparkle' => $sparkle,
|
||||||
'from_photo' => $message['from-photo'],
|
'from_photo' => $message['from-photo'],
|
||||||
'subject' => template_escape($message['title']),
|
'subject' => $subject_e,
|
||||||
'body' => template_escape(smilies(bbcode($message['body']))),
|
'body' => $body_e,
|
||||||
'delete' => t('Delete message'),
|
'delete' => t('Delete message'),
|
||||||
'to_name' => template_escape($message['name']),
|
'to_name' => $to_name_e,
|
||||||
'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'],'D, d M Y - g:i A'),
|
'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'],'D, d M Y - g:i A'),
|
||||||
'ago' => relative_date($message['created']),
|
'ago' => relative_date($message['created']),
|
||||||
);
|
);
|
||||||
|
@ -462,6 +494,14 @@ function message_content(&$a) {
|
||||||
$parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />';
|
$parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />';
|
||||||
|
|
||||||
$tpl = get_markup_template('mail_display.tpl');
|
$tpl = get_markup_template('mail_display.tpl');
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$subjtxt_e = template_escape($message['title']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$subjtxt_e = $message['title'];
|
||||||
|
}
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$thread_id' => $a->argv[1],
|
'$thread_id' => $a->argv[1],
|
||||||
'$thread_subject' => $message['title'],
|
'$thread_subject' => $message['title'],
|
||||||
|
|
|
@ -53,8 +53,9 @@ function nogroup_content(&$a) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = get_markup_template("nogroup-template.tpl");
|
$tpl = get_markup_template("nogroup-template.tpl");
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$header' => t('Contacts who are not members of a group'),
|
'$header' => t('Contacts who are not members of a group'),
|
||||||
'$contacts' => $contacts,
|
'$contacts' => $contacts,
|
||||||
'$paginate' => paginate($a),
|
'$paginate' => paginate($a),
|
||||||
|
|
|
@ -144,7 +144,8 @@ function notifications_content(&$a) {
|
||||||
if($rr['fid']) {
|
if($rr['fid']) {
|
||||||
|
|
||||||
$return_addr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
$return_addr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
||||||
$notif_content .= replace_macros($sugg,array(
|
|
||||||
|
$notif_content .= replace_macros($sugg, array(
|
||||||
'$str_notifytype' => t('Notification type: '),
|
'$str_notifytype' => t('Notification type: '),
|
||||||
'$notify_type' => t('Friend Suggestion'),
|
'$notify_type' => t('Friend Suggestion'),
|
||||||
'$intro_id' => $rr['intro_id'],
|
'$intro_id' => $rr['intro_id'],
|
||||||
|
@ -161,7 +162,7 @@ function notifications_content(&$a) {
|
||||||
'$note' => $rr['note'],
|
'$note' => $rr['note'],
|
||||||
'$request' => $rr['frequest'] . '?addr=' . $return_addr,
|
'$request' => $rr['frequest'] . '?addr=' . $return_addr,
|
||||||
'$ignore' => t('Ignore'),
|
'$ignore' => t('Ignore'),
|
||||||
'$discard' => t('Discard')
|
'$discard' => t('Discard'),
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -190,7 +191,7 @@ function notifications_content(&$a) {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$notif_content .= replace_macros($tpl,array(
|
$notif_content .= replace_macros($tpl, array(
|
||||||
'$str_notifytype' => t('Notification type: '),
|
'$str_notifytype' => t('Notification type: '),
|
||||||
'$notify_type' => (($rr['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')),
|
'$notify_type' => (($rr['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')),
|
||||||
'$dfrn_text' => $dfrn_text,
|
'$dfrn_text' => $dfrn_text,
|
||||||
|
@ -207,7 +208,7 @@ function notifications_content(&$a) {
|
||||||
'$approve' => t('Approve'),
|
'$approve' => t('Approve'),
|
||||||
'$note' => $rr['note'],
|
'$note' => $rr['note'],
|
||||||
'$ignore' => t('Ignore'),
|
'$ignore' => t('Ignore'),
|
||||||
'$discard' => t('Discard')
|
'$discard' => t('Discard'),
|
||||||
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -215,7 +216,7 @@ function notifications_content(&$a) {
|
||||||
else
|
else
|
||||||
info( t('No introductions.') . EOL);
|
info( t('No introductions.') . EOL);
|
||||||
|
|
||||||
$o .= replace_macros($notif_tpl,array(
|
$o .= replace_macros($notif_tpl, array(
|
||||||
'$notif_header' => t('Notifications'),
|
'$notif_header' => t('Notifications'),
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
'$notif_content' => $notif_content,
|
'$notif_content' => $notif_content,
|
||||||
|
@ -301,7 +302,7 @@ function notifications_content(&$a) {
|
||||||
$notif_content = t('No more network notifications.');
|
$notif_content = t('No more network notifications.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros($notif_tpl,array(
|
$o .= replace_macros($notif_tpl, array(
|
||||||
'$notif_header' => t('Network Notifications'),
|
'$notif_header' => t('Network Notifications'),
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
'$notif_content' => $notif_content,
|
'$notif_content' => $notif_content,
|
||||||
|
@ -331,7 +332,7 @@ function notifications_content(&$a) {
|
||||||
$notif_content .= t('No more system notifications.');
|
$notif_content .= t('No more system notifications.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros($notif_tpl,array(
|
$o .= replace_macros($notif_tpl, array(
|
||||||
'$notif_header' => t('System Notifications'),
|
'$notif_header' => t('System Notifications'),
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
'$notif_content' => $notif_content,
|
'$notif_content' => $notif_content,
|
||||||
|
@ -426,7 +427,7 @@ function notifications_content(&$a) {
|
||||||
$notif_content = t('No more personal notifications.');
|
$notif_content = t('No more personal notifications.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros($notif_tpl,array(
|
$o .= replace_macros($notif_tpl, array(
|
||||||
'$notif_header' => t('Personal Notifications'),
|
'$notif_header' => t('Personal Notifications'),
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
'$notif_content' => $notif_content,
|
'$notif_content' => $notif_content,
|
||||||
|
@ -507,7 +508,7 @@ function notifications_content(&$a) {
|
||||||
$notif_content = t('No more home notifications.');
|
$notif_content = t('No more home notifications.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros($notif_tpl,array(
|
$o .= replace_macros($notif_tpl, array(
|
||||||
'$notif_header' => t('Home Notifications'),
|
'$notif_header' => t('Home Notifications'),
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
'$notif_content' => $notif_content,
|
'$notif_content' => $notif_content,
|
||||||
|
|
|
@ -61,7 +61,7 @@ function notify_content(&$a) {
|
||||||
$notif_content .= t('No more system notifications.');
|
$notif_content .= t('No more system notifications.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros($notif_tpl,array(
|
$o .= replace_macros($notif_tpl, array(
|
||||||
'$notif_header' => t('System Notifications'),
|
'$notif_header' => t('System Notifications'),
|
||||||
'$tabs' => '', // $tabs,
|
'$tabs' => '', // $tabs,
|
||||||
'$notif_content' => $notif_content,
|
'$notif_content' => $notif_content,
|
||||||
|
|
109
mod/photos.php
109
mod/photos.php
|
@ -1039,6 +1039,16 @@ function photos_content(&$a) {
|
||||||
|
|
||||||
|
|
||||||
$tpl = get_markup_template('photos_upload.tpl');
|
$tpl = get_markup_template('photos_upload.tpl');
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$albumselect_e = template_escape($albumselect);
|
||||||
|
$aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user, $celeb)));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$albumselect_e = $albumselect;
|
||||||
|
$aclselect_e = (($visitor) ? '' : populate_acl($a->user, $celeb));
|
||||||
|
}
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
'$pagename' => t('Upload Photos'),
|
'$pagename' => t('Upload Photos'),
|
||||||
'$sessid' => session_id(),
|
'$sessid' => session_id(),
|
||||||
|
@ -1047,9 +1057,9 @@ function photos_content(&$a) {
|
||||||
'$newalbum' => t('New album name: '),
|
'$newalbum' => t('New album name: '),
|
||||||
'$existalbumtext' => t('or existing album name: '),
|
'$existalbumtext' => t('or existing album name: '),
|
||||||
'$nosharetext' => t('Do not show a status post for this upload'),
|
'$nosharetext' => t('Do not show a status post for this upload'),
|
||||||
'$albumselect' => template_escape($albumselect),
|
'$albumselect' => $albumselect_e,
|
||||||
'$permissions' => t('Permissions'),
|
'$permissions' => t('Permissions'),
|
||||||
'$aclselect' => (($visitor) ? '' : template_escape(populate_acl($a->user, $celeb))),
|
'$aclselect' => $aclselect_e,
|
||||||
'$uploader' => $ret['addon_text'],
|
'$uploader' => $ret['addon_text'],
|
||||||
'$default' => (($ret['default_upload']) ? $default_upload : ''),
|
'$default' => (($ret['default_upload']) ? $default_upload : ''),
|
||||||
'$uploadurl' => $ret['post_url']
|
'$uploadurl' => $ret['post_url']
|
||||||
|
@ -1092,10 +1102,18 @@ function photos_content(&$a) {
|
||||||
if(($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) {
|
if(($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) {
|
||||||
if($can_post) {
|
if($can_post) {
|
||||||
$edit_tpl = get_markup_template('album_edit.tpl');
|
$edit_tpl = get_markup_template('album_edit.tpl');
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$album_e = template_escape($album);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$album_e = $album;
|
||||||
|
}
|
||||||
|
|
||||||
$o .= replace_macros($edit_tpl,array(
|
$o .= replace_macros($edit_tpl,array(
|
||||||
'$nametext' => t('New album name: '),
|
'$nametext' => t('New album name: '),
|
||||||
'$nickname' => $a->data['user']['nickname'],
|
'$nickname' => $a->data['user']['nickname'],
|
||||||
'$album' => template_escape($album),
|
'$album' => $album_e,
|
||||||
'$hexalbum' => bin2hex($album),
|
'$hexalbum' => bin2hex($album),
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
'$dropsubmit' => t('Delete Album')
|
'$dropsubmit' => t('Delete Album')
|
||||||
|
@ -1135,6 +1153,15 @@ function photos_content(&$a) {
|
||||||
|
|
||||||
$ext = $phototypes[$rr['type']];
|
$ext = $phototypes[$rr['type']];
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$imgalt_e = template_escape($rr['filename']);
|
||||||
|
$desc_e = template_escape($rr['desc']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$imgalt_e = $rr['filename'];
|
||||||
|
$desc_e = $rr['desc'];
|
||||||
|
}
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
'$id' => $rr['id'],
|
'$id' => $rr['id'],
|
||||||
'$twist' => ' ' . $twist . rand(2,4),
|
'$twist' => ' ' . $twist . rand(2,4),
|
||||||
|
@ -1142,8 +1169,8 @@ function photos_content(&$a) {
|
||||||
. (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''),
|
. (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''),
|
||||||
'$phototitle' => t('View Photo'),
|
'$phototitle' => t('View Photo'),
|
||||||
'$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.' .$ext,
|
'$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.' .$ext,
|
||||||
'$imgalt' => template_escape($rr['filename']),
|
'$imgalt' => $imgalt_e,
|
||||||
'$desc'=> template_escape($rr['desc'])
|
'$desc'=> $desc_e
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1344,20 +1371,32 @@ function photos_content(&$a) {
|
||||||
$edit = Null;
|
$edit = Null;
|
||||||
if(($cmd === 'edit') && ($can_post)) {
|
if(($cmd === 'edit') && ($can_post)) {
|
||||||
$edit_tpl = get_markup_template('photo_edit.tpl');
|
$edit_tpl = get_markup_template('photo_edit.tpl');
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$album_e = template_escape($ph[0]['album']);
|
||||||
|
$caption_e = template_escape($ph[0]['desc']);
|
||||||
|
$aclselect_e = template_escape(populate_acl($ph[0]));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$album_e = $ph[0]['album'];
|
||||||
|
$caption_e = $ph[0]['desc'];
|
||||||
|
$aclselect_e = populate_acl($ph[0]);
|
||||||
|
}
|
||||||
|
|
||||||
$edit = replace_macros($edit_tpl, array(
|
$edit = replace_macros($edit_tpl, array(
|
||||||
'$id' => $ph[0]['id'],
|
'$id' => $ph[0]['id'],
|
||||||
'$rotatecw' => t('Rotate CW (right)'),
|
'$rotatecw' => t('Rotate CW (right)'),
|
||||||
'$rotateccw' => t('Rotate CCW (left)'),
|
'$rotateccw' => t('Rotate CCW (left)'),
|
||||||
'$album' => template_escape($ph[0]['album']),
|
'$album' => $album_e,
|
||||||
'$newalbum' => t('New album name'),
|
'$newalbum' => t('New album name'),
|
||||||
'$nickname' => $a->data['user']['nickname'],
|
'$nickname' => $a->data['user']['nickname'],
|
||||||
'$resource_id' => $ph[0]['resource-id'],
|
'$resource_id' => $ph[0]['resource-id'],
|
||||||
'$capt_label' => t('Caption'),
|
'$capt_label' => t('Caption'),
|
||||||
'$caption' => template_escape($ph[0]['desc']),
|
'$caption' => $caption_e,
|
||||||
'$tag_label' => t('Add a Tag'),
|
'$tag_label' => t('Add a Tag'),
|
||||||
'$tags' => $link_item['tag'],
|
'$tags' => $link_item['tag'],
|
||||||
'$permissions' => t('Permissions'),
|
'$permissions' => t('Permissions'),
|
||||||
'$aclselect' => template_escape(populate_acl($ph[0])),
|
'$aclselect' => $aclselect_e,
|
||||||
'$help_tags' => t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'),
|
'$help_tags' => t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'),
|
||||||
'$item_id' => ((count($linked_items)) ? $link_item['id'] : 0),
|
'$item_id' => ((count($linked_items)) ? $link_item['id'] : 0),
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
|
@ -1488,14 +1527,25 @@ function photos_content(&$a) {
|
||||||
$drop = replace_macros(get_markup_template('photo_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
|
$drop = replace_macros(get_markup_template('photo_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
|
||||||
|
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$name_e = template_escape($profile_name);
|
||||||
|
$title_e = template_escape($item['title']);
|
||||||
|
$body_e = template_escape(bbcode($item['body']));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$name_e = $profile_name;
|
||||||
|
$title_e = $item['title'];
|
||||||
|
$body_e = bbcode($item['body']);
|
||||||
|
}
|
||||||
|
|
||||||
$comments .= replace_macros($template,array(
|
$comments .= replace_macros($template,array(
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
'$name' => template_escape($profile_name),
|
'$name' => $name_e,
|
||||||
'$thumb' => $profile_avatar,
|
'$thumb' => $profile_avatar,
|
||||||
'$sparkle' => $sparkle,
|
'$sparkle' => $sparkle,
|
||||||
'$title' => template_escape($item['title']),
|
'$title' => $title_e,
|
||||||
'$body' => template_escape(bbcode($item['body'])),
|
'$body' => $body_e,
|
||||||
'$ago' => relative_date($item['created']),
|
'$ago' => relative_date($item['created']),
|
||||||
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
|
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
|
||||||
'$drop' => $drop,
|
'$drop' => $drop,
|
||||||
|
@ -1531,20 +1581,34 @@ function photos_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$photo_tpl = get_markup_template('photo_view.tpl');
|
$photo_tpl = get_markup_template('photo_view.tpl');
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$album_e = array($album_link,template_escape($ph[0]['album']));
|
||||||
|
$tags_e = template_escape($tags);
|
||||||
|
$like_e = template_escape($like);
|
||||||
|
$dislike_e = template_escape($dislike);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$album_e = array($album_link,$ph[0]['album']);
|
||||||
|
$tags_e = $tags;
|
||||||
|
$like_e = $like;
|
||||||
|
$dislike_e = $dislike;
|
||||||
|
}
|
||||||
|
|
||||||
$o .= replace_macros($photo_tpl, array(
|
$o .= replace_macros($photo_tpl, array(
|
||||||
'$id' => $ph[0]['id'],
|
'$id' => $ph[0]['id'],
|
||||||
'$album' => array($album_link,template_escape($ph[0]['album'])),
|
'$album' => $album_e,
|
||||||
'$tools' => $tools,
|
'$tools' => $tools,
|
||||||
'$lock' => $lock,
|
'$lock' => $lock,
|
||||||
'$photo' => $photo,
|
'$photo' => $photo,
|
||||||
'$prevlink' => $prevlink,
|
'$prevlink' => $prevlink,
|
||||||
'$nextlink' => $nextlink,
|
'$nextlink' => $nextlink,
|
||||||
'$desc' => $ph[0]['desc'],
|
'$desc' => $ph[0]['desc'],
|
||||||
'$tags' => template_escape($tags),
|
'$tags' => $tags_e,
|
||||||
'$edit' => $edit,
|
'$edit' => $edit,
|
||||||
'$likebuttons' => $likebuttons,
|
'$likebuttons' => $likebuttons,
|
||||||
'$like' => template_escape($like),
|
'$like' => $like_e,
|
||||||
'$dislike' => template_escape($dislike),
|
'$dislike' => $dikslike_e,
|
||||||
'$comments' => $comments,
|
'$comments' => $comments,
|
||||||
'$paginate' => $paginate,
|
'$paginate' => $paginate,
|
||||||
));
|
));
|
||||||
|
@ -1588,16 +1652,25 @@ function photos_content(&$a) {
|
||||||
$twist = 'rotright';
|
$twist = 'rotright';
|
||||||
$ext = $phototypes[$rr['type']];
|
$ext = $phototypes[$rr['type']];
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$alt_e = template_escape($rr['filename']);
|
||||||
|
$name_e = template_escape($rr['album']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$alt_e = $rr['filename'];
|
||||||
|
$name_e = $rr['album'];
|
||||||
|
}
|
||||||
|
|
||||||
$photos[] = array(
|
$photos[] = array(
|
||||||
'id' => $rr['id'],
|
'id' => $rr['id'],
|
||||||
'twist' => ' ' . $twist . rand(2,4),
|
'twist' => ' ' . $twist . rand(2,4),
|
||||||
'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'],
|
'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'],
|
||||||
'title' => t('View Photo'),
|
'title' => t('View Photo'),
|
||||||
'src' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext,
|
'src' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext,
|
||||||
'alt' => template_escape($rr['filename']),
|
'alt' => $alt_e,
|
||||||
'album' => array(
|
'album' => array(
|
||||||
'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
|
'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
|
||||||
'name' => template_escape($rr['album']),
|
'name' => $name_e,
|
||||||
'alt' => t('View Album'),
|
'alt' => t('View Album'),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -1606,7 +1679,7 @@ function photos_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = get_markup_template('photos_recent.tpl');
|
$tpl = get_markup_template('photos_recent.tpl');
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$title' => t('Recent Photos'),
|
'$title' => t('Recent Photos'),
|
||||||
'$can_post' => $can_post,
|
'$can_post' => $can_post,
|
||||||
'$upload' => array(t('Upload New Photos'), $a->get_baseurl().'/photos/'.$a->data['user']['nickname'].'/upload'),
|
'$upload' => array(t('Upload New Photos'), $a->get_baseurl().'/photos/'.$a->data['user']['nickname'].'/upload'),
|
||||||
|
|
|
@ -33,6 +33,7 @@ function profile_init(&$a) {
|
||||||
auto_redir($a, $which);
|
auto_redir($a, $which);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_template_engine($a); // reset the template engine to the default in case the user's theme doesn't specify one
|
||||||
profile_load($a,$which,$profile);
|
profile_load($a,$which,$profile);
|
||||||
|
|
||||||
$blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
|
$blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once("Photo.php");
|
require_once("include/Photo.php");
|
||||||
|
|
||||||
function profile_photo_init(&$a) {
|
function profile_photo_init(&$a) {
|
||||||
|
|
||||||
|
@ -313,8 +313,8 @@ function profile_photo_crop_ui_head(&$a, $ph){
|
||||||
$a->config['imagecrop'] = $hash;
|
$a->config['imagecrop'] = $hash;
|
||||||
$a->config['imagecrop_resolution'] = $smallest;
|
$a->config['imagecrop_resolution'] = $smallest;
|
||||||
$a->config['imagecrop_ext'] = $ph->getExt();
|
$a->config['imagecrop_ext'] = $ph->getExt();
|
||||||
$a->page['htmlhead'] .= get_markup_template("crophead.tpl");
|
$a->page['htmlhead'] .= replace_macros(get_markup_template("crophead.tpl"), array());
|
||||||
$a->page['end'] .= get_markup_template("cropend.tpl");
|
$a->page['end'] .= replace_macros(get_markup_template("cropend.tpl"), array());
|
||||||
return;
|
return;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
@ -668,7 +668,6 @@ function settings_content(&$a) {
|
||||||
'$title' => t('Additional Features'),
|
'$title' => t('Additional Features'),
|
||||||
'$features' => $arr,
|
'$features' => $arr,
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
'$field_yesno' => 'field_yesno.tpl',
|
|
||||||
));
|
));
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
@ -715,6 +714,7 @@ function settings_content(&$a) {
|
||||||
$mail_disabled_message = (($mail_disabled) ? t('Email access is disabled on this site.') : '');
|
$mail_disabled_message = (($mail_disabled) ? t('Email access is disabled on this site.') : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$form_security_token' => get_form_security_token("settings_connectors"),
|
'$form_security_token' => get_form_security_token("settings_connectors"),
|
||||||
|
|
||||||
|
@ -891,7 +891,7 @@ function settings_content(&$a) {
|
||||||
|
|
||||||
|
|
||||||
$pageset_tpl = get_markup_template('pagetypes.tpl');
|
$pageset_tpl = get_markup_template('pagetypes.tpl');
|
||||||
$pagetype = replace_macros($pageset_tpl,array(
|
$pagetype = replace_macros($pageset_tpl, array(
|
||||||
'$page_normal' => array('page-flags', t('Normal Account Page'), PAGE_NORMAL,
|
'$page_normal' => array('page-flags', t('Normal Account Page'), PAGE_NORMAL,
|
||||||
t('This account is a normal personal profile'),
|
t('This account is a normal personal profile'),
|
||||||
($a->user['page-flags'] == PAGE_NORMAL)),
|
($a->user['page-flags'] == PAGE_NORMAL)),
|
||||||
|
@ -1012,7 +1012,7 @@ function settings_content(&$a) {
|
||||||
require_once('include/group.php');
|
require_once('include/group.php');
|
||||||
$group_select = mini_group_select(local_user(),$a->user['def_gid']);
|
$group_select = mini_group_select(local_user(),$a->user['def_gid']);
|
||||||
|
|
||||||
$o .= replace_macros($stpl,array(
|
$o .= replace_macros($stpl, array(
|
||||||
'$ptitle' => t('Account Settings'),
|
'$ptitle' => t('Account Settings'),
|
||||||
|
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
function share_init(&$a) {
|
function share_init(&$a) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
function tagrm_post(&$a) {
|
function tagrm_post(&$a) {
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,9 @@ function uimport_content(&$a) {
|
||||||
'$regbutt' => t('Import'),
|
'$regbutt' => t('Import'),
|
||||||
'$import' => array(
|
'$import' => array(
|
||||||
'title' => t("Move account"),
|
'title' => t("Move account"),
|
||||||
'text' => t("You can import an account from another Friendica server. <br>
|
'intro' => t("You can import an account from another Friendica server."),
|
||||||
You need to export your account from the old server and upload it here. We will recreate your old account here with all your contacts. We will try also to inform your friends that you moved here.<br>
|
'instruct' => t("You need to export your account from the old server and upload it here. We will recreate your old account here with all your contacts. We will try also to inform your friends that you moved here."),
|
||||||
<b>This feature is experimental. We can't import contacts from the OStatus network (statusnet/identi.ca) or from diaspora"),
|
'warn' => t("This feature is experimental. We can't import contacts from the OStatus network (statusnet/identi.ca) or from Diaspora"),
|
||||||
'field' => array('accountfile', t('Account file'),'<input id="id_accountfile" name="accountfile" type="file">', t('To export your accont, go to "Settings->Export your porsonal data" and select "Export account"')),
|
'field' => array('accountfile', t('Account file'),'<input id="id_accountfile" name="accountfile" type="file">', t('To export your accont, go to "Settings->Export your porsonal data" and select "Export account"')),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('Photo.php');
|
require_once('include/Photo.php');
|
||||||
|
|
||||||
function wall_upload_post(&$a) {
|
function wall_upload_post(&$a) {
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,8 @@ function xrd_init(&$a) {
|
||||||
header("Content-type: text/xml");
|
header("Content-type: text/xml");
|
||||||
|
|
||||||
if(get_config('system','diaspora_enabled')) {
|
if(get_config('system','diaspora_enabled')) {
|
||||||
$tpl = file_get_contents('view/xrd_diaspora.tpl');
|
//$tpl = file_get_contents('view/xrd_diaspora.tpl');
|
||||||
|
$tpl = get_markup_template('xrd_diaspora.tpl');
|
||||||
$dspr = replace_macros($tpl,array(
|
$dspr = replace_macros($tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$dspr_guid' => $r[0]['guid'],
|
'$dspr_guid' => $r[0]['guid'],
|
||||||
|
@ -38,7 +39,8 @@ function xrd_init(&$a) {
|
||||||
else
|
else
|
||||||
$dspr = '';
|
$dspr = '';
|
||||||
|
|
||||||
$tpl = file_get_contents('view/xrd_person.tpl');
|
//$tpl = file_get_contents('view/xrd_person.tpl');
|
||||||
|
$tpl = get_markup_template('xrd_person.tpl');
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$nick' => $r[0]['nickname'],
|
'$nick' => $r[0]['nickname'],
|
||||||
|
|
198
mods/friendica-to-smarty-tpl.py
Executable file
198
mods/friendica-to-smarty-tpl.py
Executable file
|
@ -0,0 +1,198 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
#
|
||||||
|
# Script to convert Friendica internal template files into Smarty template files
|
||||||
|
# Copyright 2012 Zach Prezkuta
|
||||||
|
# Licensed under GPL v3
|
||||||
|
|
||||||
|
import os, re, string
|
||||||
|
|
||||||
|
ldelim = '{{'
|
||||||
|
rdelim = '}}'
|
||||||
|
|
||||||
|
def fToSmarty(matches):
|
||||||
|
match = matches.group(0)
|
||||||
|
if match == '$j':
|
||||||
|
return match
|
||||||
|
match = string.replace(match, '[', '')
|
||||||
|
match = string.replace(match, ']', '')
|
||||||
|
|
||||||
|
ldel = ldelim
|
||||||
|
rdel = rdelim
|
||||||
|
if match.find("'") > -1:
|
||||||
|
match = string.replace(match, "'", '')
|
||||||
|
ldel = "'" + ldel
|
||||||
|
rdel = rdel + "'"
|
||||||
|
elif match.find('"') > -1:
|
||||||
|
match = string.replace(match, '"', '')
|
||||||
|
ldel = '"' + ldel
|
||||||
|
rdel = rdel + '"'
|
||||||
|
|
||||||
|
return ldel + match + rdel
|
||||||
|
|
||||||
|
|
||||||
|
def fix_element(element):
|
||||||
|
# Much of the positioning here is important, e.g. if you do element.find('if ') before you do
|
||||||
|
# element.find('endif'), then you may get some multiply-replaced delimiters
|
||||||
|
|
||||||
|
if element.find('endif') > -1:
|
||||||
|
element = ldelim + '/if' + rdelim
|
||||||
|
return element
|
||||||
|
|
||||||
|
if element.find('if ') > -1:
|
||||||
|
element = string.replace(element, '{{ if', ldelim + 'if')
|
||||||
|
element = string.replace(element, '{{if', ldelim + 'if')
|
||||||
|
element = string.replace(element, ' }}', rdelim)
|
||||||
|
element = string.replace(element, '}}', rdelim)
|
||||||
|
return element
|
||||||
|
|
||||||
|
if element.find('else') > -1:
|
||||||
|
element = ldelim + 'else' + rdelim
|
||||||
|
return element
|
||||||
|
|
||||||
|
if element.find('endfor') > -1:
|
||||||
|
element = ldelim + '/foreach' + rdelim
|
||||||
|
return element
|
||||||
|
|
||||||
|
if element.find('for ') > -1:
|
||||||
|
element = string.replace(element, '{{ for ', ldelim + 'foreach ')
|
||||||
|
element = string.replace(element, '{{for ', ldelim + 'foreach ')
|
||||||
|
element = string.replace(element, ' }}', rdelim)
|
||||||
|
element = string.replace(element, '}}', rdelim)
|
||||||
|
return element
|
||||||
|
|
||||||
|
if element.find('endinc') > -1:
|
||||||
|
element = ''
|
||||||
|
return element
|
||||||
|
|
||||||
|
if element.find('inc ') > -1:
|
||||||
|
parts = element.split(' ')
|
||||||
|
element = ldelim + 'include file="'
|
||||||
|
|
||||||
|
# We need to find the file name. It'll either be in parts[1] if the element was written as {{ inc file.tpl }}
|
||||||
|
# or it'll be in parts[2] if the element was written as {{inc file.tpl}}
|
||||||
|
if parts[0].find('inc') > -1:
|
||||||
|
first = 0
|
||||||
|
else:
|
||||||
|
first = 1
|
||||||
|
|
||||||
|
if parts[first+1][0] == '$':
|
||||||
|
# This takes care of elements where the filename is a variable, e.g. {{ inc $file }}
|
||||||
|
element += 'file:' + ldelim + parts[first+1].rstrip('}') + rdelim
|
||||||
|
else:
|
||||||
|
# This takes care of elements where the filename is a path, e.g. {{ inc file.tpl }}
|
||||||
|
element += parts[first+1].rstrip('}')
|
||||||
|
|
||||||
|
element += '"'
|
||||||
|
|
||||||
|
if len(parts) > first + 1 and parts[first+2] == 'with':
|
||||||
|
# Take care of variable substitutions, e.g. {{ inc file.tpl with $var=this_var }}
|
||||||
|
element += ' ' + parts[first+3].rstrip('}')[1:]
|
||||||
|
|
||||||
|
element += rdelim
|
||||||
|
return element
|
||||||
|
|
||||||
|
|
||||||
|
def convert(filename, tofilename, php_tpl):
|
||||||
|
for line in filename:
|
||||||
|
newline = ''
|
||||||
|
st_pos = 0
|
||||||
|
brack_pos = line.find('{{')
|
||||||
|
|
||||||
|
if php_tpl:
|
||||||
|
# If php_tpl is True, this script will only convert variables in quotes, like '$variable'
|
||||||
|
# or "$variable". This is for .tpl files that produce PHP scripts, where you don't want
|
||||||
|
# all the PHP variables converted into Smarty variables
|
||||||
|
pattern1 = re.compile(r"""
|
||||||
|
([\'\"]\$\[[a-zA-Z]\w*
|
||||||
|
(\.
|
||||||
|
(\d+|[a-zA-Z][\w-]*)
|
||||||
|
)*
|
||||||
|
(\|[\w\$:\.]*)*
|
||||||
|
\][\'\"])
|
||||||
|
""", re.VERBOSE)
|
||||||
|
pattern2 = re.compile(r"""
|
||||||
|
([\'\"]\$[a-zA-Z]\w*
|
||||||
|
(\.
|
||||||
|
(\d+|[a-zA-Z][\w-]*)
|
||||||
|
)*
|
||||||
|
(\|[\w\$:\.]*)*
|
||||||
|
[\'\"])
|
||||||
|
""", re.VERBOSE)
|
||||||
|
else:
|
||||||
|
# Compile the pattern for bracket-style variables, e.g. $[variable.key|filter:arg1:arg2|filter2:arg1:arg2]
|
||||||
|
# Note that dashes are only allowed in array keys if the key doesn't start
|
||||||
|
# with a number, e.g. $[variable.key-id] is ok but $[variable.12-id] isn't
|
||||||
|
#
|
||||||
|
# Doesn't currently process the argument position key 'x', i.e. filter:arg1:x:arg2 doesn't get
|
||||||
|
# changed to arg1|filter:variable:arg2 like Smarty requires
|
||||||
|
#
|
||||||
|
# Filter arguments can be variables, e.g. $variable, but currently can't have array keys with dashes
|
||||||
|
# like filter:$variable.key-name
|
||||||
|
pattern1 = re.compile(r"""
|
||||||
|
(\$\[[a-zA-Z]\w*
|
||||||
|
(\.
|
||||||
|
(\d+|[a-zA-Z][\w-]*)
|
||||||
|
)*
|
||||||
|
(\|[\w\$:\.]*)*
|
||||||
|
\])
|
||||||
|
""", re.VERBOSE)
|
||||||
|
|
||||||
|
# Compile the pattern for normal style variables, e.g. $variable.key
|
||||||
|
pattern2 = re.compile(r"""
|
||||||
|
(\$[a-zA-Z]\w*
|
||||||
|
(\.
|
||||||
|
(\d+|[a-zA-Z][\w-]*)
|
||||||
|
)*
|
||||||
|
(\|[\w\$:\.]*)*
|
||||||
|
)
|
||||||
|
""", re.VERBOSE)
|
||||||
|
|
||||||
|
while brack_pos > -1:
|
||||||
|
if brack_pos > st_pos:
|
||||||
|
line_segment = line[st_pos:brack_pos]
|
||||||
|
line_segment = pattern2.sub(fToSmarty, line_segment)
|
||||||
|
newline += pattern1.sub(fToSmarty, line_segment)
|
||||||
|
|
||||||
|
end_brack_pos = line.find('}}', brack_pos)
|
||||||
|
if end_brack_pos < 0:
|
||||||
|
print "Error: no matching bracket found"
|
||||||
|
|
||||||
|
newline += fix_element(line[brack_pos:end_brack_pos + 2])
|
||||||
|
st_pos = end_brack_pos + 2
|
||||||
|
|
||||||
|
brack_pos = line.find('{{', st_pos)
|
||||||
|
|
||||||
|
line_segment = line[st_pos:]
|
||||||
|
line_segment = pattern2.sub(fToSmarty, line_segment)
|
||||||
|
newline += pattern1.sub(fToSmarty, line_segment)
|
||||||
|
newline = newline.replace("{#", ldelim + "*")
|
||||||
|
newline = newline.replace("#}", "*" + rdelim)
|
||||||
|
tofilename.write(newline)
|
||||||
|
|
||||||
|
|
||||||
|
path = raw_input('Path to template folder to convert: ')
|
||||||
|
if path[-1:] != '/':
|
||||||
|
path = path + '/'
|
||||||
|
|
||||||
|
outpath = path + 'smarty3/'
|
||||||
|
|
||||||
|
if not os.path.exists(outpath):
|
||||||
|
os.makedirs(outpath)
|
||||||
|
|
||||||
|
files = os.listdir(path)
|
||||||
|
for a_file in files:
|
||||||
|
if a_file == 'htconfig.tpl':
|
||||||
|
php_tpl = True
|
||||||
|
else:
|
||||||
|
php_tpl = False
|
||||||
|
|
||||||
|
filename = os.path.join(path,a_file)
|
||||||
|
ext = a_file.split('.')[-1]
|
||||||
|
if os.path.isfile(filename) and ext == 'tpl':
|
||||||
|
with open(filename, 'r') as f:
|
||||||
|
newfilename = os.path.join(outpath,a_file)
|
||||||
|
with open(newfilename, 'w') as outf:
|
||||||
|
print "Converting " + filename + " to " + newfilename
|
||||||
|
convert(f, outf, php_tpl)
|
||||||
|
|
||||||
|
|
|
@ -221,6 +221,23 @@ class Item extends BaseObject {
|
||||||
|
|
||||||
list($categories, $folders) = get_cats_and_terms($item);
|
list($categories, $folders) = get_cats_and_terms($item);
|
||||||
|
|
||||||
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
|
$body_e = template_escape($body);
|
||||||
|
$text_e = strip_tags(template_escape($body));
|
||||||
|
$name_e = template_escape($profile_name);
|
||||||
|
$title_e = template_escape($item['title']);
|
||||||
|
$location_e = template_escape($location);
|
||||||
|
$owner_name_e = template_escape($this->get_owner_name());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$body_e = $body;
|
||||||
|
$text_e = strip_tags($body);
|
||||||
|
$name_e = $profile_name;
|
||||||
|
$title_e = $item['title'];
|
||||||
|
$location_e = $location;
|
||||||
|
$owner_name_e = $this->get_owner_name();
|
||||||
|
}
|
||||||
|
|
||||||
$tmp_item = array(
|
$tmp_item = array(
|
||||||
'template' => $this->get_template(),
|
'template' => $this->get_template(),
|
||||||
|
|
||||||
|
@ -234,8 +251,8 @@ class Item extends BaseObject {
|
||||||
'has_folders' => ((count($folders)) ? 'true' : ''),
|
'has_folders' => ((count($folders)) ? 'true' : ''),
|
||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
'folders' => $folders,
|
'folders' => $folders,
|
||||||
'body' => template_escape($body),
|
'body' => $body_e,
|
||||||
'text' => strip_tags(template_escape($body)),
|
'text' => $text_e,
|
||||||
'id' => $this->get_id(),
|
'id' => $this->get_id(),
|
||||||
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
||||||
'olinktitle' => sprintf( t('View %s\'s profile @ %s'), $this->get_owner_name(), ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])),
|
'olinktitle' => sprintf( t('View %s\'s profile @ %s'), $this->get_owner_name(), ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])),
|
||||||
|
@ -245,20 +262,20 @@ class Item extends BaseObject {
|
||||||
'vwall' => t('via Wall-To-Wall:'),
|
'vwall' => t('via Wall-To-Wall:'),
|
||||||
'profile_url' => $profile_link,
|
'profile_url' => $profile_link,
|
||||||
'item_photo_menu' => item_photo_menu($item),
|
'item_photo_menu' => item_photo_menu($item),
|
||||||
'name' => template_escape($profile_name),
|
'name' => $name_e,
|
||||||
'thumb' => $profile_avatar,
|
'thumb' => $profile_avatar,
|
||||||
'osparkle' => $osparkle,
|
'osparkle' => $osparkle,
|
||||||
'sparkle' => $sparkle,
|
'sparkle' => $sparkle,
|
||||||
'title' => template_escape($item['title']),
|
'title' => $title_e,
|
||||||
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
|
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
|
||||||
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
||||||
'lock' => $lock,
|
'lock' => $lock,
|
||||||
'location' => template_escape($location),
|
'location' => $location_e,
|
||||||
'indent' => $indent,
|
'indent' => $indent,
|
||||||
'shiny' => $shiny,
|
'shiny' => $shiny,
|
||||||
'owner_url' => $this->get_owner_url(),
|
'owner_url' => $this->get_owner_url(),
|
||||||
'owner_photo' => $this->get_owner_photo(),
|
'owner_photo' => $this->get_owner_photo(),
|
||||||
'owner_name' => template_escape($this->get_owner_name()),
|
'owner_name' => $owner_name_e,
|
||||||
'plink' => get_plink($item),
|
'plink' => get_plink($item),
|
||||||
'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
|
'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
|
||||||
'isstarred' => $isstarred,
|
'isstarred' => $isstarred,
|
||||||
|
@ -473,11 +490,20 @@ class Item extends BaseObject {
|
||||||
* Set template
|
* Set template
|
||||||
*/
|
*/
|
||||||
private function set_template($name) {
|
private function set_template($name) {
|
||||||
|
$a = get_app();
|
||||||
|
|
||||||
if(!x($this->available_templates, $name)) {
|
if(!x($this->available_templates, $name)) {
|
||||||
logger('[ERROR] Item::set_template : Template not available ("'. $name .'").', LOGGER_DEBUG);
|
logger('[ERROR] Item::set_template : Template not available ("'. $name .'").', LOGGER_DEBUG);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->template = $this->available_templates[$name];
|
|
||||||
|
if($a->theme['template_engine'] === 'smarty3') {
|
||||||
|
$template_file = get_template_file($a, 'smarty3/' . $this->available_templates[$name]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$template_file = $this->available_templates[$name];
|
||||||
|
}
|
||||||
|
$this->template = $template_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,7 +14,7 @@ $a = new App;
|
||||||
$lang = get_browser_language();
|
$lang = get_browser_language();
|
||||||
load_translation_table($lang);
|
load_translation_table($lang);
|
||||||
|
|
||||||
require_once("dba.php");
|
require_once("include/dba.php");
|
||||||
$db = new dba($db_host, $db_user, $db_pass, $db_data, false);
|
$db = new dba($db_host, $db_user, $db_pass, $db_data, false);
|
||||||
unset($db_host, $db_user, $db_pass, $db_data);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
|
|
||||||
|
|
1895
util/messages.po
1895
util/messages.po
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="acl-list-item" rel="acl-template" style="display:none">
|
<div class="acl-list-item" rel="acl-template" style="display:none">
|
||||||
<img src="{0}"><p>{1}</p>
|
<img data-src="{0}"><p>{1}</p>
|
||||||
<a href="#" class='acl-button-show'>$show</a>
|
<a href="#" class='acl-button-show'>$show</a>
|
||||||
<a href="#" class='acl-button-hide'>$hide</a>
|
<a href="#" class='acl-button-hide'>$hide</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
{{ inc field_select.tpl with $field=$ssl_policy }}{{ endinc }}
|
{{ inc field_select.tpl with $field=$ssl_policy }}{{ endinc }}
|
||||||
{{ inc field_checkbox.tpl with $field=$new_share }}{{ endinc }}
|
{{ inc field_checkbox.tpl with $field=$new_share }}{{ endinc }}
|
||||||
|
|
||||||
|
|
||||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||||
|
|
||||||
<h3>$registration</h3>
|
<h3>$registration</h3>
|
||||||
|
@ -100,6 +101,7 @@
|
||||||
{{ inc field_input.tpl with $field=$itemcache }}{{ endinc }}
|
{{ inc field_input.tpl with $field=$itemcache }}{{ endinc }}
|
||||||
{{ inc field_input.tpl with $field=$itemcache_duration }}{{ endinc }}
|
{{ inc field_input.tpl with $field=$itemcache_duration }}{{ endinc }}
|
||||||
|
|
||||||
|
|
||||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
<td class='register_date'>$u.register_date</td>
|
<td class='register_date'>$u.register_date</td>
|
||||||
<td class='login_date'>$u.login_date</td>
|
<td class='login_date'>$u.login_date</td>
|
||||||
<td class='lastitem_date'>$u.lastitem_date</td>
|
<td class='lastitem_date'>$u.lastitem_date</td>
|
||||||
<td class='login_date'>$u.page-flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td>
|
<td class='login_date'>$u.page_flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td>
|
||||||
<td class="checkbox">
|
<td class="checkbox">
|
||||||
{{ if $u.is_admin }}
|
{{ if $u.is_admin }}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
<!-- TEMPLATE APPEARS UNUSED -->
|
||||||
|
|
||||||
<users type="array">
|
<users type="array">
|
||||||
{{for $users as $user }}
|
{{for $users as $u }}
|
||||||
{{inc api_user_xml.tpl }}{{endinc}}
|
{{inc api_user_xml.tpl with $user=$u }}{{endinc}}
|
||||||
{{endfor}}
|
{{endfor}}
|
||||||
</users>
|
</users>
|
||||||
|
|
18
view/ca/smarty3/cmnt_received_eml.tpl
Normal file
18
view/ca/smarty3/cmnt_received_eml.tpl
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$username}},
|
||||||
|
|
||||||
|
'{{$from}}' ha comentat un element/conversació que estàs seguint.
|
||||||
|
|
||||||
|
-----
|
||||||
|
{{$body}}
|
||||||
|
-----
|
||||||
|
|
||||||
|
Accedeix a {{$siteurl}} per a veure la conversa completa:
|
||||||
|
|
||||||
|
{{$display}}
|
||||||
|
|
||||||
|
|
||||||
|
{{$sitename}}
|
||||||
|
|
||||||
|
|
||||||
|
|
13
view/ca/smarty3/follow_notify_eml.tpl
Normal file
13
view/ca/smarty3/follow_notify_eml.tpl
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$myname}},
|
||||||
|
|
||||||
|
Tens un nou seguidor en {{$sitename}} - '{{$requestor}}'.
|
||||||
|
|
||||||
|
Pots visitar el seu perfil en {{$url}}.
|
||||||
|
|
||||||
|
Iniciï sessió en el seu lloc per a aprovar o rebutjar/cancelar la sol·licitud.
|
||||||
|
|
||||||
|
{{$siteurl}}
|
||||||
|
|
||||||
|
|
||||||
|
{{$sitename}}
|
19
view/ca/smarty3/friend_complete_eml.tpl
Normal file
19
view/ca/smarty3/friend_complete_eml.tpl
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$username}},
|
||||||
|
|
||||||
|
Grans noticies... '{{$fn}}' a '{{$dfrn_url}}' ha acceptat la teva sol·licitud de connexió en '{{$sitename}}'.
|
||||||
|
|
||||||
|
Ara sous amics mutus i podreu intercanviar actualizacions de estatus, fotos, i correu electrónic
|
||||||
|
sense cap restricció.
|
||||||
|
|
||||||
|
Visita la teva pàgina de 'Contactes' en {{$sitename}} si desitja realizar qualsevol canvi en aquesta relació.
|
||||||
|
|
||||||
|
{{$siteurl}}
|
||||||
|
|
||||||
|
[Per exemple, pots crear un perfil independent amb informació que no esta disponible al públic en general
|
||||||
|
- i assignar drets de visualització a '{{$fn}}'].
|
||||||
|
|
||||||
|
|
||||||
|
{{$sitename}}
|
||||||
|
|
||||||
|
|
68
view/ca/smarty3/htconfig.tpl
Normal file
68
view/ca/smarty3/htconfig.tpl
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
<?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'] = 'http://pubsubhubbub.appspot.com';
|
||||||
|
|
||||||
|
// 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';
|
||||||
|
|
21
view/ca/smarty3/intro_complete_eml.tpl
Normal file
21
view/ca/smarty3/intro_complete_eml.tpl
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$username}},
|
||||||
|
|
||||||
|
'{{$fn}}' en '{{$dfrn_url}}' ha acceptat la teva petició
|
||||||
|
connexió a '{{$sitename}}'.
|
||||||
|
|
||||||
|
'{{$fn}}' ha optat per acceptar-te com a "fan", que restringeix certes
|
||||||
|
formes de comunicació, com missatges privats i algunes interaccions
|
||||||
|
amb el perfil. Si ets una "celebritat" o una pàgina de comunitat,
|
||||||
|
aquests ajustos s'aplican automàticament
|
||||||
|
|
||||||
|
'{{$fn}}' pot optar per extendre aixó en una relació més permisiva
|
||||||
|
en el futur.
|
||||||
|
|
||||||
|
Començaràs a rebre les actualizacions públiques de estatus de '{{$fn}}',
|
||||||
|
que apareixeran a la teva pàgina "Xarxa" en
|
||||||
|
|
||||||
|
{{$siteurl}}
|
||||||
|
|
||||||
|
|
||||||
|
{{$sitename}}
|
35
view/ca/smarty3/lostpass_eml.tpl
Normal file
35
view/ca/smarty3/lostpass_eml.tpl
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$username}},
|
||||||
|
|
||||||
|
S'ha rebut una sol·licitud en {{$sitename}} recentment per restablir
|
||||||
|
la teva contrasenya. Per confirmar aquesta sol·licitud, per favor seleccioni l'enllaç de
|
||||||
|
verificació sota o copia-ho i pega-ho en la barra d'adreces del teu navegador.
|
||||||
|
|
||||||
|
Si NO has sol·licitat aquest canvi, per favor NO segueixis l'enllaç indicat i ignora
|
||||||
|
i/o elimina aquest missatge.
|
||||||
|
|
||||||
|
La teva contrasenya no es canviarà tret que puguem verificar que ets la teva qui
|
||||||
|
va emetre aquesta sol·licitud.
|
||||||
|
|
||||||
|
Segueix aquest enllaç per verificar la teva identitat:
|
||||||
|
|
||||||
|
{{$reset_link}}
|
||||||
|
|
||||||
|
A continuació rebràs un missatge amb la nova contrasenya.
|
||||||
|
|
||||||
|
Després de accedir, podràs canviar la contrasenya del teu compte a la pàgina de
|
||||||
|
configuració.
|
||||||
|
|
||||||
|
Les dades d'accés són els següents:
|
||||||
|
|
||||||
|
|
||||||
|
Lloc: {{$siteurl}}
|
||||||
|
Nom: {{$email}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Salutacions,
|
||||||
|
L'administració de {{$sitename}}
|
||||||
|
|
||||||
|
|
24
view/ca/smarty3/mail_received_html_body_eml.tpl
Normal file
24
view/ca/smarty3/mail_received_html_body_eml.tpl
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mensaje de Friendica</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table style="border:1px solid #ccc">
|
||||||
|
<tbody>
|
||||||
|
<tr><td colspan="2" style="background:#3b5998; color:#FFFFFF; font-weight:bold; font-family:'lucida grande', tahoma, verdana,arial, sans-serif; padding: 4px 8px; vertical-align: middle; font-size:16px; letter-spacing: -0.03em; text-align: left;"><img style="width:32px;height:32px;" src='{{$siteurl}}/images/friendica-32.png'><span style="padding:7px;">Friendica</span></td></tr>
|
||||||
|
|
||||||
|
<tr><td style="padding-top:22px;" colspan="2">Has rebut un nou missatge privat de '{{$from}}' en {{$siteName}}.</td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="{{$url}}"><img style="border:0px;width:48px;height:48px;" src="{{$thumb}}"></a></td>
|
||||||
|
<td style="padding-top:22px;"><a href="{{$url}}">{{$from}}</a></td></tr>
|
||||||
|
<tr><td style="font-weight:bold;padding-bottom:5px;">{{$title}}</td></tr>
|
||||||
|
<tr><td style="padding-right:22px;">{{$htmlversion}}</td></tr>
|
||||||
|
<tr><td style="padding-top:11px;padding-bottom:11px;" colspan="2">Accedeix a <a href="{{$siteurl}}">{{$siteurl}}</a> per a llegir i respondre als teus missatges privats.</td></tr>
|
||||||
|
<tr><td></td><td>{{$siteName}}</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
9
view/ca/smarty3/mail_received_text_body_eml.tpl
Normal file
9
view/ca/smarty3/mail_received_text_body_eml.tpl
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
Has rebut un nou missatge privat de '{{$from}}' en {{$siteName}}.
|
||||||
|
|
||||||
|
{{$title}}
|
||||||
|
|
||||||
|
{{$textversion}}
|
||||||
|
|
||||||
|
Accedeix a {{$siteurl}} per a llegir i respondre als teus missatges privats.
|
||||||
|
|
||||||
|
{{$siteName}}
|
19
view/ca/smarty3/passchanged_eml.tpl
Normal file
19
view/ca/smarty3/passchanged_eml.tpl
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$username}},
|
||||||
|
|
||||||
|
La teva contrasenya ha estat modificada com has sol·licitat. Pren nota d'aquesta informació
|
||||||
|
(o canvía immediatament la contrasenya amb quelcom que recordis).
|
||||||
|
|
||||||
|
|
||||||
|
Les teves dades d'accés son les següents:
|
||||||
|
|
||||||
|
Lloc: {{$siteurl}}
|
||||||
|
Nom: {{$email}}
|
||||||
|
Contrasenya: {{$new_password}}
|
||||||
|
|
||||||
|
Després d'accedir pots canviar la contrasenya des de la pàgina de configuració del teu perfil.
|
||||||
|
|
||||||
|
|
||||||
|
{{$sitename}}
|
||||||
|
|
||||||
|
|
22
view/ca/smarty3/register_open_eml.tpl
Normal file
22
view/ca/smarty3/register_open_eml.tpl
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$username}},
|
||||||
|
|
||||||
|
Gràcies per registrar-te en {{$sitename}}. El teu compte ha estat creat.
|
||||||
|
|
||||||
|
|
||||||
|
Les dades d'accés són les següents:
|
||||||
|
|
||||||
|
|
||||||
|
Lloc: {{$siteurl}}
|
||||||
|
Nom: {{$email}}
|
||||||
|
Contrasenya: {{$password}}
|
||||||
|
|
||||||
|
|
||||||
|
Després d'accedir pots canviar la teva contrasenya a la pàgina de "Configuració".
|
||||||
|
|
||||||
|
Pren un moment per revisar les altres configuracions del compte en aquesta pàgina.
|
||||||
|
|
||||||
|
|
||||||
|
Gràcies i benvingut/da {{$sitename}}.
|
||||||
|
|
||||||
|
|
23
view/ca/smarty3/register_verify_eml.tpl
Normal file
23
view/ca/smarty3/register_verify_eml.tpl
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
S'ha rebut la sol·licitud de registre d'un nou usuari en
|
||||||
|
{{$sitename}} que requereix la teva aprovació.
|
||||||
|
|
||||||
|
Les dades d'accés són els següents:
|
||||||
|
|
||||||
|
Nom Complet: {{$username}}
|
||||||
|
Lloc: {{$siteurl}}
|
||||||
|
Nom: {{$email}}
|
||||||
|
|
||||||
|
|
||||||
|
Per aprovar aquesta sol·licitud, visita el següent enllaç:
|
||||||
|
|
||||||
|
{{$siteurl}}/regmod/allow/{{$hash}}
|
||||||
|
|
||||||
|
Per denegar la sol·licitud i eliminar el compte, per favor visita:
|
||||||
|
|
||||||
|
{{$siteurl}}/regmod/deny/{{$hash}}
|
||||||
|
|
||||||
|
|
||||||
|
Gràcies.
|
||||||
|
|
||||||
|
|
13
view/ca/smarty3/request_notify_eml.tpl
Normal file
13
view/ca/smarty3/request_notify_eml.tpl
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$myname}},
|
||||||
|
|
||||||
|
Acabes de rebre una sol·licitud de connexió de '{{$requestor}}' en {{$sitename}}.
|
||||||
|
|
||||||
|
Pots visitar el seu perfil en {{$url}}.
|
||||||
|
|
||||||
|
Accedeix al teu lloc per a veure la presentació completa i acceptar o ignorar/cancel·lar la sol·licitud.
|
||||||
|
|
||||||
|
{{$siteurl}}
|
||||||
|
|
||||||
|
|
||||||
|
{{$sitename}}
|
18
view/ca/smarty3/wall_received_eml.tpl
Normal file
18
view/ca/smarty3/wall_received_eml.tpl
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
Apreciat/da {{$username}},
|
||||||
|
|
||||||
|
'{{$from}}' ha escrit quelcom en el mur del teu perfil.
|
||||||
|
|
||||||
|
-----
|
||||||
|
{{$body}}
|
||||||
|
-----
|
||||||
|
|
||||||
|
Accedeix a {{$siteurl}} per a veure o esborrar l'element:
|
||||||
|
|
||||||
|
{{$display}}
|
||||||
|
|
||||||
|
|
||||||
|
{{$sitename}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
$tabs
|
$tabs
|
||||||
|
|
||||||
|
|
||||||
{{ for $contacts as $contact }}
|
{{ for $contacts as $c }}
|
||||||
{{ inc contact_template.tpl }}{{ endinc }}
|
{{ inc contact_template.tpl with $contact=$c }}{{ endinc }}
|
||||||
{{ endfor }}
|
{{ endfor }}
|
||||||
<div id="contact-edit-end"></div>
|
<div id="contact-edit-end"></div>
|
||||||
|
|
||||||
|
|
2336
view/cs/messages.po
2336
view/cs/messages.po
File diff suppressed because it is too large
Load diff
14
view/cs/smarty3/cmnt_received_eml.tpl
Normal file
14
view/cs/smarty3/cmnt_received_eml.tpl
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
Milý/Milá {{$username}},
|
||||||
|
|
||||||
|
'{{$from}}' okommentoval položku/konverzaci, kterou následujete.
|
||||||
|
|
||||||
|
-----
|
||||||
|
{{$body}}
|
||||||
|
-----
|
||||||
|
|
||||||
|
Přihlaste se na {{$siteurl}} pro zobrazení kompletní konverzace:
|
||||||
|
|
||||||
|
{{$display}}
|
||||||
|
|
||||||
|
Díky,
|
||||||
|
{{$sitename}} administrátor
|
25
view/cs/smarty3/cmnt_received_html_body_eml.tpl
Normal file
25
view/cs/smarty3/cmnt_received_html_body_eml.tpl
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Friendica zpráva</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table style="border:1px solid #ccc">
|
||||||
|
<tbody>
|
||||||
|
<tr><td colspan="2" style="background:#084769; color:#FFFFFF; font-weight:bold; font-family:'lucida grande', tahoma, verdana,arial, sans-serif; padding: 4px 8px; vertical-align: middle; font-size:16px; letter-spacing: -0.03em; text-align: left;"><img style="width:32px;height:32px; float:left;" src='{{$siteurl}}/images/friendica-32.png'><div style="padding:7px; margin-left: 5px; float:left; font-size:18px;letter-spacing:1px;">Friendica</div><div style="clear: both;"></div></td></tr>
|
||||||
|
|
||||||
|
<tr><td style="padding-top:22px;" colspan="2">{{$from}} okomentoval položku/konverzaci, kterou následujete.</td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="{{$url}}"><img style="border:0px;width:48px;height:48px;" src="{{$thumb}}"></a></td>
|
||||||
|
<td style="padding-top:22px;"><a href="{{$url}}">{{$from}}</a></td></tr>
|
||||||
|
<tr><td style="padding-bottom:5px;"></td></tr>
|
||||||
|
<tr><td style="padding-right:22px;">{{$body}}</td></tr>
|
||||||
|
<tr><td style="padding-top:11px;padding-bottom:11px;" colspan="2">Přihlaste se na <a href="{{$display}}">pro zobrazení kompletní konverzace</a>.</td></tr>
|
||||||
|
<tr><td></td><td>Díky,</td></tr>
|
||||||
|
<tr><td></td><td>{{$sitename}} administrátor</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
14
view/cs/smarty3/cmnt_received_text_body_eml.tpl
Normal file
14
view/cs/smarty3/cmnt_received_text_body_eml.tpl
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
Milý/Milá {{$username}},
|
||||||
|
|
||||||
|
'{{$from}}' okommentoval položku/konverzaci, kterou následujete.
|
||||||
|
|
||||||
|
-----
|
||||||
|
{{$body}}
|
||||||
|
-----
|
||||||
|
|
||||||
|
Přihlaste se na {{$siteurl}} pro zobrazení kompletní konverzace:
|
||||||
|
|
||||||
|
{{$display}}
|
||||||
|
|
||||||
|
Díky,
|
||||||
|
{{$sitename}} administrátor
|
14
view/cs/smarty3/follow_notify_eml.tpl
Normal file
14
view/cs/smarty3/follow_notify_eml.tpl
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
Milý/Milá {{$username}},
|
||||||
|
|
||||||
|
Máte nového následovatele na {{$sitename}} - '{{$requestor}}'.
|
||||||
|
|
||||||
|
Můžete si prohlédnout jeho/její profil na {{$url}}.
|
||||||
|
|
||||||
|
Přihlaste se na váš server k odsouhlasení nebo ignorování/zrušení žádosti.
|
||||||
|
|
||||||
|
{{$siteurl}}
|
||||||
|
|
||||||
|
S pozdravem,
|
||||||
|
|
||||||
|
{{$sitename}} administrátor
|
17
view/cs/smarty3/friend_complete_eml.tpl
Normal file
17
view/cs/smarty3/friend_complete_eml.tpl
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
Milý/Milá {{$username}},
|
||||||
|
|
||||||
|
Skvělé zprávy... '{{$fn}}' na '{{$dfrn_url}}' odsouhlasil Váš požadavek na spojení na '{{$sitename}}'.
|
||||||
|
|
||||||
|
Jste nyní přátelé a můžete si vyměňovat aktualizace statusu, fotek a e-mailů bez omezení.
|
||||||
|
|
||||||
|
Pokud budete chtít tento vztah jakkoliv upravit, navštivte Vaši stránku "Kontakty" na {{$sitename}}.
|
||||||
|
|
||||||
|
{{$siteurl}}
|
||||||
|
|
||||||
|
(Nyní můžete například vytvořit separátní profil s informacemi, které nebudou viditelné veřejně, a nastavit právo pro zobrazení tohoto profilu pro '{{$fn}}').
|
||||||
|
|
||||||
|
S pozdravem,
|
||||||
|
|
||||||
|
{{$sitename}} administrátor
|
||||||
|
|
73
view/cs/smarty3/htconfig.tpl
Normal file
73
view/cs/smarty3/htconfig.tpl
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
<?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'] = 'http://pubsubhubbub.appspot.com';
|
||||||
|
|
||||||
|
// 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';
|
||||||
|
|
||||||
|
|
17
view/cs/smarty3/intro_complete_eml.tpl
Normal file
17
view/cs/smarty3/intro_complete_eml.tpl
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
Milý/Milá {{$username}},
|
||||||
|
|
||||||
|
|
||||||
|
'{{$fn}}' na '{{$dfrn_url}}' odsouhlasil Váš požadavek na spojení na '{{$sitename}}'.
|
||||||
|
|
||||||
|
'{{$fn}}' Vás označil za svého "fanouška", což jistým způsobem omezuje komunikaci (například v oblasti soukromých zpráv a některých profilových interakcí. Pokud je toto celebritní nebo komunitní stránka, bylo toto nastavení byla přijato automaticky.
|
||||||
|
|
||||||
|
'{{$fn}}' může v budoucnu rozšířit toto spojení na oboustranné nebo jinak méně restriktivní.
|
||||||
|
|
||||||
|
Nyní začnete dostávat veřejné aktualizace statusu od '{{$fn}}', které se objeví ve Vaší stránce "Síť" na webu
|
||||||
|
|
||||||
|
{{$siteurl}}
|
||||||
|
|
||||||
|
S pozdravem,
|
||||||
|
|
||||||
|
{{$sitename}} administrátor
|
23
view/cs/smarty3/lostpass_eml.tpl
Normal file
23
view/cs/smarty3/lostpass_eml.tpl
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
Milý/Milá {{$username}},
|
||||||
|
Na webu {{$sitename}} byl zaregistrován požadavek na znovunastavení hesla k Vašemu účtu. Pro potvrzení této žádosti prosím klikněte na potvrzovací odkaz níže, nebo si tento odkaz zkopírujte do adresního řádku prohlížeče.
|
||||||
|
Pokud jste o znovunastavení hesla NEŽÁDALI, prosím NEKLIKEJTE na tento odkaz a ignorujte tento e-mail nebo ho rovnou smažte.
|
||||||
|
|
||||||
|
Vaše heslo nebude změněno, dokud nebudeme mít potvrzení, že jste o tento požadavek zažádali právě Vy.
|
||||||
|
|
||||||
|
Klikněte na tento odkaz pro prověření Vaší identity:
|
||||||
|
|
||||||
|
{{$reset_link}}
|
||||||
|
|
||||||
|
Poté obdržíte další zprávu obsahující nové heslo.
|
||||||
|
|
||||||
|
Následně si toto heslo můžete změnit z vašeho účtu na stránce Nastavení.
|
||||||
|
|
||||||
|
Přihlašovací údaje jsou tato:
|
||||||
|
|
||||||
|
Adresa webu: {{$siteurl}}
|
||||||
|
Přihlašovací jméno: {{$email}}
|
||||||
|
|
||||||
|
S pozdravem,
|
||||||
|
|
||||||
|
{{$sitename}} administrátor
|
25
view/cs/smarty3/mail_received_html_body_eml.tpl
Normal file
25
view/cs/smarty3/mail_received_html_body_eml.tpl
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Friendica Zpráva</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table style="border:1px solid #ccc">
|
||||||
|
<tbody>
|
||||||
|
<tr><td colspan="2" style="background:#084769; color:#FFFFFF; font-weight:bold; font-family:'lucida grande', tahoma, verdana,arial, sans-serif; padding: 4px 8px; vertical-align: middle; font-size:16px; letter-spacing: -0.03em; text-align: left;"><img style="width:32px;height:32px; float:left;" src='{{$siteurl}}/images/friendica-32.png'><div style="padding:7px; margin-left: 5px; float:left; font-size:18px;letter-spacing:1px;">Friendica</div><div style="clear: both;"></div></td></tr>
|
||||||
|
|
||||||
|
<tr><td style="padding-top:22px;" colspan="2">{{$from}} Vám poslal(a) novou soukromou zprávu na {{$siteName}}.</td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="{{$url}}"><img style="border:0px;width:48px;height:48px;" src="{{$thumb}}"></a></td>
|
||||||
|
<td style="padding-top:22px;"><a href="{{$url}}">{{$from}}</a></td></tr>
|
||||||
|
<tr><td style="font-weight:bold;padding-bottom:5px;">{{$title}}</td></tr>
|
||||||
|
<tr><td style="padding-right:22px;">{{$htmlversion}}</td></tr>
|
||||||
|
<tr><td style="padding-top:11px;padding-bottom:11px;" colspan="2">Přihlaste se na <a href="{{$siteurl}}">{{$siteurl}}<a/> pro čtení a zaslání odpovědí na Vaše soukromé zprávy.</td></tr>
|
||||||
|
<tr><td></td><td>Díky,</td></tr>
|
||||||
|
<tr><td></td><td>{{$siteName}} administrátor</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
10
view/cs/smarty3/mail_received_text_body_eml.tpl
Normal file
10
view/cs/smarty3/mail_received_text_body_eml.tpl
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{{$from}} Vám poslal(a) novou soukromou zprávu na {{$siteName}}.
|
||||||
|
|
||||||
|
{{$title}}
|
||||||
|
|
||||||
|
{{$textversion}}
|
||||||
|
|
||||||
|
Přihlaste se na {{$siteurl}} pro čtení a zaslání odpovědí na Vaše soukromé zprávy.
|
||||||
|
|
||||||
|
Díky,
|
||||||
|
{{$siteName}} administrátor
|
14
view/cs/smarty3/passchanged_eml.tpl
Normal file
14
view/cs/smarty3/passchanged_eml.tpl
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
Milý/Milá {{$username}},
|
||||||
|
Vaše heslo bylo na Vaši žádost změněno. Prosím zaznamenejte si tuto informaci (nebo si Vaše heslo změňte na nějaké, které si budete pamatovat).
|
||||||
|
|
||||||
|
Vaše přihlašovací údaje jsou tato:
|
||||||
|
|
||||||
|
Adresa webu: {{$siteurl}}
|
||||||
|
Přihlašovací jméno: {{$email}}
|
||||||
|
Heslo: {{$new_password}}
|
||||||
|
|
||||||
|
Toto heslo si můžete změnit z vašeho účtu na stránce Nastavení poté, co se přihlásíte.
|
||||||
|
|
||||||
|
S pozdravem,
|
||||||
|
{{$sitename}} administrátor
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue