Merge branch '3.6-rc'

pull/558/merge^2^2
Tobias Diekershoff 2018-03-23 08:00:37 +01:00
commit 39dd3dffe0
733 changed files with 10943 additions and 8237 deletions

2
.gitignore vendored
View File

@ -15,7 +15,7 @@ report/
.buildpath
.externalToolBuilders
.settings
#ignore OSX .DS_Store files
#ignore OSX .DS_Store files
.DS_Store
/nbproject/private/

View File

@ -1,12 +1,6 @@
[main]
host = https://www.transifex.com
[friendica.addon_appnet_messagespo]
file_filter = appnet/lang/<lang>/messages.po
source_file = appnet/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_blackout_messagespo]
file_filter = blackout/lang/<lang>/messages.po
source_file = blackout/lang/C/messages.po
@ -37,12 +31,6 @@ source_file = buglink/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_cal_messagespo]
file_filter = cal/lang/<lang>/messages.po
source_file = cal/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_communityhome_messagespo]
file_filter = communityhome/lang/<lang>/messages.po
source_file = communityhome/lang/C/messages.po
@ -73,24 +61,12 @@ source_file = dwpost/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_editplain_messagespo]
file_filter = editplain/lang/<lang>/messages.po
source_file = editplain/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_forumdirectory_messagespo]
file_filter = forumdirectory/lang/<lang>/messages.po
source_file = forumdirectory/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_forumlist_messagespo]
file_filter = forumlist/lang/<lang>/messages.po
source_file = forumlist/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_fromapp_messagespo]
file_filter = fromapp/lang/<lang>/messages.po
source_file = fromapp/lang/C/messages.po
@ -115,12 +91,6 @@ source_file = gnot/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_gpluspost_messagespo]
file_filter = gpluspost/lang/<lang>/messages.po
source_file = gpluspost/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_gravatar_messagespo]
file_filter = gravatar/lang/<lang>/messages.po
source_file = gravatar/lang/C/messages.po
@ -301,6 +271,12 @@ source_file = rendertime/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_securemail_messagespo]
file_filter = securemail/lang/<lang>/messages.po
source_file = securemail/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_showmore_messagespo]
file_filter = showmore/lang/<lang>/messages.po
source_file = showmore/lang/C/messages.po
@ -313,12 +289,6 @@ source_file = smileybutton/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_snautofollow_messagespo]
file_filter = snautofollow/lang/<lang>/messages.po
source_file = snautofollow/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_startpage_messagespo]
file_filter = startpage/lang/<lang>/messages.po
source_file = startpage/lang/C/messages.po
@ -361,9 +331,9 @@ source_file = twitter/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_uhremotestorage_messagespo]
file_filter = uhremotestorage/lang/<lang>/messages.po
source_file = uhremotestorage/lang/C/messages.po
[friendica.addon_viewsrc_messagespo]
file_filter = viewsrc/lang/<lang>/messages.po
source_file = viewsrc/lang/C/messages.po
source_lang = en
type = PO
@ -385,6 +355,12 @@ source_file = wppost/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_xmpp_messagespo]
file_filter = xmpp/lang/<lang>/messages.po
source_file = xmpp/lang/C/messages.po
source_lang = en
type = PO
[friendica.addon_yourls_messagespo]
file_filter = yourls/lang/<lang>/messages.po
source_file = yourls/lang/C/messages.po

View File

@ -4,9 +4,10 @@
To install all addons using git, cd into your top level Friendica directory and
git clone https://github.com/friendica/friendica-addons.git addon
git clone https://github.com/friendica/friendica-addons.git addon
util/composer.phar install -d addon
This will clone the entire repository in a directory called addon. They can now be activated in the plugins section of your admin panel.
This will clone the entire repository in a directory called addon. They can now be activated in the addons section of your admin panel.
********************
* Install Manually *
@ -15,4 +16,4 @@ This will clone the entire repository in a directory called addon. They can now
1. Download the archive (Download ZIP button) containing the addons.
2. Unzip the contents of the archive to your harddrive.
3. Upload the extracted directory and all it's contents to /path/to/friendica/addon. You will need to create the addon directory if this is the first addon you have installed.
4. Activate the addon in the plugins section of your admin panel.
4. Activate the addon in the addons section of your admin panel.

View File

@ -1,8 +1,8 @@
Addons for Friendica
====================
This repository is a collection of plugins for the [Friendica Social Communications Server](https://github.com/friendica/friendica).
You can add these plugins to the /addon directory of your Friendica installation
This repository is a collection of addons for the [Friendica Social Communications Server](https://github.com/friendica/friendica).
You can add these addons to the /addon directory of your Friendica installation
do extend the functionality of your node.
After uploading the addons to your server, you need to activate the desired addons
@ -14,7 +14,7 @@ in cases the addon developers have choosen not to include them here.
Connectors
----------
Among these plugins there are also the [connectors](https://github.com/friendica/friendica/blob/master/doc/Connectors.md) for various other networks
Among these addons there are also the [connectors](https://github.com/friendica/friendica/blob/master/doc/Connectors.md) for various other networks
(e.g. Twitter, pump.io, Google+) that are needed for communication when the
protocoll is not supported by Friendica core (DFRN, OStatus and Diaspora).
@ -28,7 +28,7 @@ Development
The addon interface of Friendica is very flexible and powerful, so if you are
missing functionality, your chances are high it may be added with an addon.
See the [documentation](https://github.com/friendica/friendica/blob/master/doc/Plugins.md) for more informations on the plugin development.
See the [documentation](https://github.com/friendica/friendica/blob/master/doc/Addons.md) for more informations on the addon development.
Addons can be translated like any other part of Friendica. Translations for the
addons included in this repository are done at the [Transifex project](https://www.transifex.com/projects/p/friendica/) for Friendica.

View File

@ -8,12 +8,12 @@ blackout addon
About
-----
This plugin will allow you to enter a date/time period during which
This addon will allow you to enter a date/time period during which
all your ~friendica visitors from the web will be redirected to a page
you can configure in the admin panel as well.
Calls to the API and the communication with other ~friendica nodes is
not effected from this plugin.
not effected from this addon.
If you enter a period the current date would be affected none of the
currently logged in users will be effected as well. But if they log

View File

@ -9,12 +9,12 @@
* About
* =====
*
* This plugin will allow you to enter a date/time period during which
* This addon will allow you to enter a date/time period during which
* all your ~friendica visitors from the web will be redirected to a page
* you can configure in the admin panel as well.
*
* Calls to the API and the communication with other ~friendica nodes is
* not effected from this plugin.
* not effected from this addon.
*
* If you enter a period the current date would be affected none of the
* currently logged in users will be effected as well. But if they log
@ -49,13 +49,16 @@
* THE SOFTWARE.
*/
use Friendica\Core\Config;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
function blackout_install() {
register_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
function blackout_uninstall() {
unregister_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
Addon::unregisterHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
function blackout_redirect ($a, $b) {
// if we have a logged in user, don't throw her out
@ -86,20 +89,20 @@ function blackout_redirect ($a, $b) {
}
}
function blackout_plugin_admin(&$a, &$o) {
$mystart = get_config('blackout','begindate');
function blackout_addon_admin(&$a, &$o) {
$mystart = Config::get('blackout','begindate');
if (! is_string($mystart)) { $mystart = "YYYY-MM-DD:hhmm"; }
$myend = get_config('blackout','enddate');
if (! is_string($myend)) { $myend = "YYYY-MM-DD:hhmm"; }
$myurl = get_config('blackout','url');
if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
$t = get_markup_template( "admin.tpl", "addon/blackout/" );
$o = replace_macros($t, array(
'$submit' => t('Save Settings'),
'$rurl' => array("rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"),
'$startdate' => array("startdate", "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)", $mystart, "format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"),
'$enddate' => array("enddate", "End of the Blackout<br />(YYYY-MM-DD hh:mm)", $myend, ""),
$o = replace_macros($t, [
'$submit' => L10n::t('Save Settings'),
'$rurl' => ["rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"],
'$startdate' => ["startdate", "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)", $mystart, "format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"],
'$enddate' => ["enddate", "End of the Blackout<br />(YYYY-MM-DD hh:mm)", $myend, ""],
));
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
@ -110,7 +113,7 @@ function blackout_plugin_admin(&$a, &$o) {
$o = '<p>Please double check that the current settings for the blackout. Begin will be <strong>'.$mystart.'</strong> and it will end <strong>'.$myend.'</strong>.</p>' . $o;
}
}
function blackout_plugin_admin_post (&$a) {
function blackout_addon_admin_post (&$a) {
$begindate = trim($_POST['startdate']);
$enddate = trim($_POST['enddate']);
$url = trim($_POST['rurl']);

View File

@ -4,13 +4,13 @@
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2014
# fabrixxm <fabrix.xm@gmail.com>, 2014,2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2014-09-10 10:22+0000\n"
"PO-Revision-Date: 2018-03-19 19:50+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"

View File

@ -1,41 +1,39 @@
<?php
/**
* Name: blockem
* Description: block people
* Description: Allows users to hide content by collapsing posts and replies.
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function blockem_install() {
register_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
register_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
register_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
register_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
function blockem_install()
{
Addon::registerHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
Addon::registerHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
Addon::registerHook('addon_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Addon::registerHook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
Addon::registerHook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Addon::registerHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store');
}
function blockem_uninstall() {
unregister_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
unregister_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
unregister_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
function blockem_uninstall()
{
Addon::unregisterHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
Addon::unregisterHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
Addon::unregisterHook('addon_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Addon::unregisterHook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
Addon::unregisterHook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Addon::unregisterHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store');
}
function blockem_addon_settings(&$a,&$s) {
function blockem_addon_settings(&$a, &$s)
{
if(! local_user())
return;
@ -45,24 +43,25 @@ function blockem_addon_settings(&$a,&$s) {
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/blockem/blockem.css' . '" media="all" />' . "\r\n";
$words = get_pconfig(local_user(),'blockem','words');
$words = PConfig::get(local_user(), 'blockem', 'words');
if(! $words)
$words = '';
$s .= '<span id="settings_blockem_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_blockem_expanded\'); openClose(\'settings_blockem_inflated\');">';
$s .= '<h3>' . t('"Blockem"') . '</h3>';
$s .= '<h3>' . L10n::t('"Blockem"') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_blockem_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_blockem_expanded\'); openClose(\'settings_blockem_inflated\');">';
$s .= '<h3>' . t('"Blockem"') . '</h3>';
$s .= '<h3>' . L10n::t('"Blockem"') . '</h3>';
$s .= '</span>';
$s .= '<div id="blockem-wrapper">';
$s .= '<label id="blockem-label" for="blockem-words">' . t('Comma separated profile URLS to block') . ' </label>';
$s .= '<div id="blockem-desc">'. L10n::t("Hides user's content by collapsing posts. Also replaces their avatar with generic image.") . ' </div>';
$s .= '<label id="blockem-label" for="blockem-words">' . L10n::t('Comma separated profile URLS:') . ' </label>';
$s .= '<textarea id="blockem-words" type="text" name="blockem-words" >' . htmlspecialchars($words) . '</textarea>';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blockem-submit" name="blockem-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blockem-submit" name="blockem-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
return;
@ -74,12 +73,11 @@ function blockem_addon_settings_post(&$a,&$b) {
return;
if($_POST['blockem-submit']) {
set_pconfig(local_user(),'blockem','words',trim($_POST['blockem-words']));
info( t('BLOCKEM Settings saved.') . EOL);
PConfig::set(local_user(),'blockem','words',trim($_POST['blockem-words']));
info(L10n::t('BLOCKEM Settings saved.') . EOL);
}
}
function blockem_enotify_store(&$a,&$b) {
$words = get_pconfig($b['uid'],'blockem','words');
@ -139,17 +137,15 @@ function blockem_prepare_body(&$a,&$b) {
}
if($found) {
$rnd = random_string(8);
$b['html'] = '<div id="blockem-wrap-' . $rnd . '" class="fakelink" onclick=openClose(\'blockem-' . $rnd . '\'); >' . sprintf( t('Blocked %s - Click to open/close'),$word ) . '</div><div id="blockem-' . $rnd . '" style="display: none; " >' . $b['html'] . '</div>';
$b['html'] = '<div id="blockem-wrap-' . $rnd . '" class="fakelink" onclick=openClose(\'blockem-' . $rnd . '\'); >' . L10n::t('Hidden content by %s - Click to open/close', $word) . '</div><div id="blockem-' . $rnd . '" style="display: none; " >' . $b['html'] . '</div>';
}
}
function blockem_display_item(&$a,&$b) {
if(strstr($b['output']['body'],'id="blockem-wrap-'))
$b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg";
}
function blockem_conversation_start(&$a,&$b) {
if(! local_user())
@ -194,9 +190,9 @@ function blockem_item_photo_menu(&$a,&$b) {
}
}
if($blocked)
$b['menu'][ t('Unblock Author')] = 'javascript:blockemUnblock(\'' . $author . '\');';
$b['menu'][L10n::t('Unblock Author')] = 'javascript:blockemUnblock(\'' . $author . '\');';
else
$b['menu'][ t('Block Author')] = 'javascript:blockemBlock(\'' . $author . '\');';
$b['menu'][L10n::t('Block Author')] = 'javascript:blockemBlock(\'' . $author . '\');';
}
function blockem_module() {}
@ -227,7 +223,7 @@ function blockem_init(&$a) {
$words = implode(',',$newarr);
}
set_pconfig(local_user(),'blockem','words',$words);
info( t('blockem settings updated') . EOL );
PConfig::set(local_user(),'blockem','words',$words);
info(L10n::t('blockem settings updated') . EOL );
killme();
}

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"POT-Creation-Date: 2018-02-09 13:00+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,35 +17,41 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: blockem.php:53 blockem.php:57
#: blockem.php:51 blockem.php:55
msgid "\"Blockem\""
msgstr ""
#: blockem.php:61
msgid "Comma separated profile URLS to block"
#: blockem.php:59
msgid ""
"Hides user's content by collapsing posts. Also replaces their avatar with "
"generic image."
msgstr ""
#: blockem.php:65
#: blockem.php:60
msgid "Comma separated profile URLS:"
msgstr ""
#: blockem.php:64
msgid "Save Settings"
msgstr ""
#: blockem.php:78
#: blockem.php:77
msgid "BLOCKEM Settings saved."
msgstr ""
#: blockem.php:142
#: blockem.php:140
#, php-format
msgid "Blocked %s - Click to open/close"
msgid "Hidden content by %s - Click to open/close"
msgstr ""
#: blockem.php:197
#: blockem.php:193
msgid "Unblock Author"
msgstr ""
#: blockem.php:199
#: blockem.php:195
msgid "Block Author"
msgstr ""
#: blockem.php:231
#: blockem.php:227
msgid "blockem settings updated"
msgstr ""

View File

@ -4,50 +4,57 @@
#
#
# Translators:
# bavatar <tobias.diekershoff@gmx.net>, 2014-2015
# Tobias Diekershoff <tobias.diekershoff@gmx.net>, 2014
# Tobias Diekershoff <tobias.diekershoff@gmx.net>, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-07-27 05:29+0000\n"
"Last-Translator: bavatar <tobias.diekershoff@gmx.net>\n"
"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n"
"POT-Creation-Date: 2018-02-09 13:00+0100\n"
"PO-Revision-Date: 2018-02-10 17:32+0000\n"
"Last-Translator: Tobias Diekershoff <tobias.diekershoff@gmx.net>\n"
"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: blockem.php:51
msgid "\"Blockem\" Settings"
msgstr "\"Blockem\"-Einstellungen"
#: blockem.php:51 blockem.php:55
msgid "\"Blockem\""
msgstr "\"Blockem\""
#: blockem.php:53
msgid "Comma separated profile URLS to block"
msgstr "Profil-URLs, die geblockt werden sollen (durch Kommas getrennt)"
#: blockem.php:59
msgid ""
"Hides user's content by collapsing posts. Also replaces their avatar with "
"generic image."
msgstr "Verbirgt Inhalte von Kontakten durch kollabieren der Beiträge. Des weiteren wird das Profilbild durch einen generischen Avatar ersetzt."
#: blockem.php:57
msgid "Submit"
msgstr "Senden"
#: blockem.php:60
msgid "Comma separated profile URLS:"
msgstr "Komma separierte Liste von Profil URLs"
#: blockem.php:70
#: blockem.php:64
msgid "Save Settings"
msgstr "Einstellungen speichern"
#: blockem.php:77
msgid "BLOCKEM Settings saved."
msgstr "BLOCKEM-Einstellungen gesichert."
#: blockem.php:105
#: blockem.php:140
#, php-format
msgid "Blocked %s - Click to open/close"
msgstr "%s blockiert - Zum Öffnen/Schließen klicken"
msgid "Hidden content by %s - Click to open/close"
msgstr "Verborgene Inhalte von %s - Zum Öffnen/Schließen klicken"
#: blockem.php:160
#: blockem.php:193
msgid "Unblock Author"
msgstr "Autor freischalten"
#: blockem.php:162
#: blockem.php:195
msgid "Block Author"
msgstr "Autor blockieren"
#: blockem.php:194
#: blockem.php:227
msgid "blockem settings updated"
msgstr "blockem Einstellungen aktualisiert"

View File

@ -5,11 +5,12 @@ function string_plural_select_de($n){
return ($n != 1);;
}}
;
$a->strings["\"Blockem\" Settings"] = "\"Blockem\"-Einstellungen";
$a->strings["Comma separated profile URLS to block"] = "Profil-URLs, die geblockt werden sollen (durch Kommas getrennt)";
$a->strings["Submit"] = "Senden";
$a->strings["\"Blockem\""] = "\"Blockem\"";
$a->strings["Hides user's content by collapsing posts. Also replaces their avatar with generic image."] = "Verbirgt Inhalte von Kontakten durch kollabieren der Beiträge. Des weiteren wird das Profilbild durch einen generischen Avatar ersetzt.";
$a->strings["Comma separated profile URLS:"] = "Komma separierte Liste von Profil URLs";
$a->strings["Save Settings"] = "Einstellungen speichern";
$a->strings["BLOCKEM Settings saved."] = "BLOCKEM-Einstellungen gesichert.";
$a->strings["Blocked %s - Click to open/close"] = "%s blockiert - Zum Öffnen/Schließen klicken";
$a->strings["Hidden content by %s - Click to open/close"] = "Verborgene Inhalte von %s - Zum Öffnen/Schließen klicken";
$a->strings["Unblock Author"] = "Autor freischalten";
$a->strings["Block Author"] = "Autor blockieren";
$a->strings["blockem settings updated"] = "blockem Einstellungen aktualisiert";

View File

@ -0,0 +1,59 @@
# ADDON blockem
# Copyright (C)
# This file is distributed under the same license as the Friendica blockem addon package.
#
#
# Translators:
# Andy H3 <andy@hubup.pro>, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-09 13:00+0100\n"
"PO-Revision-Date: 2018-03-15 14:10+0000\n"
"Last-Translator: Andy H3 <andy@hubup.pro>\n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/Friendica/friendica/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: blockem.php:51 blockem.php:55
msgid "\"Blockem\""
msgstr "\"Blockem\""
#: blockem.php:59
msgid ""
"Hides user's content by collapsing posts. Also replaces their avatar with "
"generic image."
msgstr "Hides user's content by collapsing posts. Also replaces their avatar with generic image."
#: blockem.php:60
msgid "Comma separated profile URLS:"
msgstr "Comma separated profile URLs:"
#: blockem.php:64
msgid "Save Settings"
msgstr "Save settings"
#: blockem.php:77
msgid "BLOCKEM Settings saved."
msgstr "Blockem settings saved."
#: blockem.php:140
#, php-format
msgid "Hidden content by %s - Click to open/close"
msgstr "Hidden content by %s - Reveal/hide"
#: blockem.php:193
msgid "Unblock Author"
msgstr "Unblock author"
#: blockem.php:195
msgid "Block Author"
msgstr "Block author"
#: blockem.php:227
msgid "blockem settings updated"
msgstr "Blockem settings updated"

View File

@ -0,0 +1,16 @@
<?php
if(! function_exists("string_plural_select_en_gb")) {
function string_plural_select_en_gb($n){
return ($n != 1);;
}}
;
$a->strings["\"Blockem\""] = "\"Blockem\"";
$a->strings["Hides user's content by collapsing posts. Also replaces their avatar with generic image."] = "Hides user's content by collapsing posts. Also replaces their avatar with generic image.";
$a->strings["Comma separated profile URLS:"] = "Comma separated profile URLs:";
$a->strings["Save Settings"] = "Save settings";
$a->strings["BLOCKEM Settings saved."] = "Blockem settings saved.";
$a->strings["Hidden content by %s - Click to open/close"] = "Hidden content by %s - Reveal/hide";
$a->strings["Unblock Author"] = "Unblock author";
$a->strings["Block Author"] = "Block author";
$a->strings["blockem settings updated"] = "Blockem settings updated";

View File

@ -0,0 +1,59 @@
# ADDON blockem
# Copyright (C)
# This file is distributed under the same license as the Friendica blockem addon package.
#
#
# Translators:
# Andy H3 <andy@hubup.pro>, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-09 13:00+0100\n"
"PO-Revision-Date: 2018-03-15 14:14+0000\n"
"Last-Translator: Andy H3 <andy@hubup.pro>\n"
"Language-Team: English (United States) (http://www.transifex.com/Friendica/friendica/language/en_US/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_US\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: blockem.php:51 blockem.php:55
msgid "\"Blockem\""
msgstr "\"Blockem\""
#: blockem.php:59
msgid ""
"Hides user's content by collapsing posts. Also replaces their avatar with "
"generic image."
msgstr "Hides user's content by collapsing posts. Also replaces their avatar with generic image."
#: blockem.php:60
msgid "Comma separated profile URLS:"
msgstr "Comma separated profile URLs:"
#: blockem.php:64
msgid "Save Settings"
msgstr "Save settings"
#: blockem.php:77
msgid "BLOCKEM Settings saved."
msgstr "Blockem settings saved."
#: blockem.php:140
#, php-format
msgid "Hidden content by %s - Click to open/close"
msgstr "Hidden content by %s - Reveal/hide"
#: blockem.php:193
msgid "Unblock Author"
msgstr "Unblock author"
#: blockem.php:195
msgid "Block Author"
msgstr "Block author"
#: blockem.php:227
msgid "blockem settings updated"
msgstr "Blockem settings updated"

View File

@ -0,0 +1,16 @@
<?php
if(! function_exists("string_plural_select_en_us")) {
function string_plural_select_en_us($n){
return ($n != 1);;
}}
;
$a->strings["\"Blockem\""] = "\"Blockem\"";
$a->strings["Hides user's content by collapsing posts. Also replaces their avatar with generic image."] = "Hides user's content by collapsing posts. Also replaces their avatar with generic image.";
$a->strings["Comma separated profile URLS:"] = "Comma separated profile URLs:";
$a->strings["Save Settings"] = "Save settings";
$a->strings["BLOCKEM Settings saved."] = "Blockem settings saved.";
$a->strings["Hidden content by %s - Click to open/close"] = "Hidden content by %s - Reveal/hide";
$a->strings["Unblock Author"] = "Unblock author";
$a->strings["Block Author"] = "Block author";
$a->strings["blockem settings updated"] = "Blockem settings updated";

View File

@ -4,13 +4,13 @@
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2014
# fabrixxm <fabrix.xm@gmail.com>, 2014,2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2014-09-10 10:23+0000\n"
"POT-Creation-Date: 2018-02-09 13:00+0100\n"
"PO-Revision-Date: 2018-03-19 13:14+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
@ -19,35 +19,41 @@ msgstr ""
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: blockem.php:53 blockem.php:57
#: blockem.php:51 blockem.php:55
msgid "\"Blockem\""
msgstr "\"Blockem\""
#: blockem.php:61
msgid "Comma separated profile URLS to block"
msgstr "Lista, separata da virgola, di indirizzi da bloccare"
#: blockem.php:59
msgid ""
"Hides user's content by collapsing posts. Also replaces their avatar with "
"generic image."
msgstr "Nascondi il contenuto degli utenti collassando i messaggi. Sostituisce anche gli avatar con un'immagine generica."
#: blockem.php:65
#: blockem.php:60
msgid "Comma separated profile URLS:"
msgstr "URL profili separati da virgola:"
#: blockem.php:64
msgid "Save Settings"
msgstr "Salva Impostazioni"
#: blockem.php:78
#: blockem.php:77
msgid "BLOCKEM Settings saved."
msgstr "Impostazioni BLOCKEM salvate."
#: blockem.php:142
#: blockem.php:140
#, php-format
msgid "Blocked %s - Click to open/close"
msgstr "%s bloccato - Clicca per aprire/chiudere"
msgid "Hidden content by %s - Click to open/close"
msgstr "Contenuto di %s nascosto - Clicca per aprire/chiudere"
#: blockem.php:197
#: blockem.php:193
msgid "Unblock Author"
msgstr "Sblocca autore"
#: blockem.php:199
#: blockem.php:195
msgid "Block Author"
msgstr "Blocca autore"
#: blockem.php:231
#: blockem.php:227
msgid "blockem settings updated"
msgstr "Impostazioni 'blockem' aggiornate."

View File

@ -6,10 +6,11 @@ function string_plural_select_it($n){
}}
;
$a->strings["\"Blockem\""] = "\"Blockem\"";
$a->strings["Comma separated profile URLS to block"] = "Lista, separata da virgola, di indirizzi da bloccare";
$a->strings["Hides user's content by collapsing posts. Also replaces their avatar with generic image."] = "Nascondi il contenuto degli utenti collassando i messaggi. Sostituisce anche gli avatar con un'immagine generica.";
$a->strings["Comma separated profile URLS:"] = "URL profili separati da virgola:";
$a->strings["Save Settings"] = "Salva Impostazioni";
$a->strings["BLOCKEM Settings saved."] = "Impostazioni BLOCKEM salvate.";
$a->strings["Blocked %s - Click to open/close"] = "%s bloccato - Clicca per aprire/chiudere";
$a->strings["Hidden content by %s - Click to open/close"] = "Contenuto di %s nascosto - Clicca per aprire/chiudere";
$a->strings["Unblock Author"] = "Sblocca autore";
$a->strings["Block Author"] = "Blocca autore";
$a->strings["blockem settings updated"] = "Impostazioni 'blockem' aggiornate.";

View File

@ -1,5 +1,4 @@
<?php
/**
* Name: Blogger Post Connector
* Description: Post to Blogger (or anything else which uses blogger XMLRPC API)
@ -7,47 +6,57 @@
*
*/
function blogger_install() {
register_hook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
register_hook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
register_hook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
register_hook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
register_hook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Network;
function blogger_install()
{
Addon::registerHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::registerHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::registerHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Addon::registerHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::registerHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
}
function blogger_uninstall() {
unregister_hook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
unregister_hook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
unregister_hook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
unregister_hook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
unregister_hook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
function blogger_uninstall()
{
Addon::unregisterHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::unregisterHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::unregisterHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::unregisterHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
// obsolete - remove
unregister_hook('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
unregister_hook('plugin_settings', 'addon/blogger/blogger.php', 'blogger_settings');
unregister_hook('plugin_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
Addon::unregisterHook('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
Addon::unregisterHook('addon_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::unregisterHook('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
}
function blogger_jot_nets(&$a,&$b) {
if(! local_user())
return;
function blogger_jot_nets(&$a, &$b)
{
if (!local_user()) {
return;
}
$bl_post = get_pconfig(local_user(),'blogger','post');
if(intval($bl_post) == 1) {
$bl_defpost = get_pconfig(local_user(),'blogger','post_by_default');
$selected = ((intval($bl_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="blogger_enable" ' . $selected . ' value="1" /> '
. t('Post to blogger') . '</div>';
}
$bl_post = PConfig::get(local_user(), 'blogger', 'post');
if (intval($bl_post) == 1) {
$bl_defpost = PConfig::get(local_user(), 'blogger', 'post_by_default');
$selected = ((intval($bl_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="blogger_enable" ' . $selected . ' value="1" /> '
. L10n::t('Post to blogger') . '</div>';
}
}
function blogger_settings(&$a,&$s) {
if(! local_user())
return;
function blogger_settings(&$a, &$s)
{
if (! local_user()) {
return;
}
/* Add our stylesheet to the page so we can make our settings look nice */
@ -55,11 +64,11 @@ function blogger_settings(&$a,&$s) {
/* Get the current state of our config variables */
$enabled = get_pconfig(local_user(),'blogger','post');
$checked = (($enabled) ? ' checked="checked" ' : '');
$css = (($enabled) ? '' : '-disabled');
$enabled = PConfig::get(local_user(), 'blogger', 'post');
$checked = (($enabled) ? ' checked="checked" ' : '');
$css = (($enabled) ? '' : '-disabled');
$def_enabled = get_pconfig(local_user(),'blogger','post_by_default');
$def_enabled = PConfig::get(local_user(), 'blogger', 'post_by_default');
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
@ -67,65 +76,59 @@ function blogger_settings(&$a,&$s) {
$bl_password = get_pconfig(local_user(), 'blogger', 'bl_password');
$bl_blog = get_pconfig(local_user(), 'blogger', 'bl_blog');
/* Add some HTML to the existing form */
$s .= '<span id="settings_blogger_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_blogger_expanded\'); openClose(\'settings_blogger_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. L10n::t('Blogger Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_blogger_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_blogger_expanded\'); openClose(\'settings_blogger_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. L10n::t('Blogger Export').'</h3>';
$s .= '</span>';
/* Add some HTML to the existing form */
$s .= '<div id="blogger-enable-wrapper">';
$s .= '<label id="blogger-enable-label" for="blogger-checkbox">' . L10n::t('Enable Blogger Post Addon') . '</label>';
$s .= '<input id="blogger-checkbox" type="checkbox" name="blogger" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<span id="settings_blogger_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_blogger_expanded\'); openClose(\'settings_blogger_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. t('Blogger Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_blogger_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_blogger_expanded\'); openClose(\'settings_blogger_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. t('Blogger Export').'</h3>';
$s .= '</span>';
$s .= '<div id="blogger-username-wrapper">';
$s .= '<label id="blogger-username-label" for="blogger-username">' . L10n::t('Blogger username') . '</label>';
$s .= '<input id="blogger-username" type="text" name="bl_username" value="' . $bl_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-enable-wrapper">';
$s .= '<label id="blogger-enable-label" for="blogger-checkbox">' . t('Enable Blogger Post Plugin') . '</label>';
$s .= '<input id="blogger-checkbox" type="checkbox" name="blogger" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-password-wrapper">';
$s .= '<label id="blogger-password-label" for="blogger-password">' . L10n::t('Blogger password') . '</label>';
$s .= '<input id="blogger-password" type="password" name="bl_password" value="' . $bl_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-username-wrapper">';
$s .= '<label id="blogger-username-label" for="blogger-username">' . t('Blogger username') . '</label>';
$s .= '<input id="blogger-username" type="text" name="bl_username" value="' . $bl_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-blog-wrapper">';
$s .= '<label id="blogger-blog-label" for="blogger-blog">' . L10n::t('Blogger API URL') . '</label>';
$s .= '<input id="blogger-blog" type="text" name="bl_blog" value="' . $bl_blog . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-password-wrapper">';
$s .= '<label id="blogger-password-label" for="blogger-password">' . t('Blogger password') . '</label>';
$s .= '<input id="blogger-password" type="password" name="bl_password" value="' . $bl_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-blog-wrapper">';
$s .= '<label id="blogger-blog-label" for="blogger-blog">' . t('Blogger API URL') . '</label>';
$s .= '<input id="blogger-blog" type="text" name="bl_blog" value="' . $bl_blog . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-bydefault-wrapper">';
$s .= '<label id="blogger-bydefault-label" for="blogger-bydefault">' . t('Post to Blogger by default') . '</label>';
$s .= '<input id="blogger-bydefault" type="checkbox" name="bl_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blogger-submit" name="blogger-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
$s .= '<div id="blogger-bydefault-wrapper">';
$s .= '<label id="blogger-bydefault-label" for="blogger-bydefault">' . L10n::t('Post to Blogger by default') . '</label>';
$s .= '<input id="blogger-bydefault" type="checkbox" name="bl_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blogger-submit" name="blogger-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
}
function blogger_settings_post(&$a,&$b) {
if(x($_POST,'blogger-submit')) {
set_pconfig(local_user(),'blogger','post',intval($_POST['blogger']));
set_pconfig(local_user(),'blogger','post_by_default',intval($_POST['bl_bydefault']));
set_pconfig(local_user(),'blogger','bl_username',trim($_POST['bl_username']));
set_pconfig(local_user(),'blogger','bl_password',trim($_POST['bl_password']));
set_pconfig(local_user(),'blogger','bl_blog',trim($_POST['bl_blog']));
function blogger_settings_post(&$a, &$b)
{
if (x($_POST, 'blogger-submit')) {
PConfig::set(local_user(), 'blogger', 'post', intval($_POST['blogger']));
PConfig::set(local_user(), 'blogger', 'post_by_default', intval($_POST['bl_bydefault']));
PConfig::set(local_user(), 'blogger', 'bl_username', trim($_POST['bl_username']));
PConfig::set(local_user(), 'blogger', 'bl_password', trim($_POST['bl_password']));
PConfig::set(local_user(), 'blogger', 'bl_blog', trim($_POST['bl_blog']));
}
}
function blogger_post_local(&$a,&$b) {
function blogger_post_local(&$a, &$b)
{
// This can probably be changed to allow editing by pointing to a different API endpoint
if($b['edit'])
@ -137,11 +140,11 @@ function blogger_post_local(&$a,&$b) {
if($b['private'] || $b['parent'])
return;
$bl_post = intval(get_pconfig(local_user(),'blogger','post'));
$bl_post = intval(PConfig::get(local_user(), 'blogger', 'post'));
$bl_enable = (($bl_post && x($_REQUEST,'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0);
$bl_enable = (($bl_post && x($_REQUEST, 'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0);
if($b['api_source'] && intval(get_pconfig(local_user(),'blogger','post_by_default')))
if ($b['api_source'] && intval(PConfig::get(local_user(), 'blogger', 'post_by_default'))) {
$bl_enable = 1;
if(! $bl_enable)
@ -155,28 +158,24 @@ function blogger_post_local(&$a,&$b) {
function blogger_send(&$a,&$b) {
function blogger_send(&$a, &$b)
{
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return;
}
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
return;
if(! strstr($b['postopts'],'blogger'))
return;
if($b['parent'] != $b['id'])
return;
if (! strstr($b['postopts'], 'blogger')) {
return;
}
$bl_username = xmlify(get_pconfig($b['uid'],'blogger','bl_username'));
$bl_password = xmlify(get_pconfig($b['uid'],'blogger','bl_password'));
$bl_blog = get_pconfig($b['uid'],'blogger','bl_blog');
$bl_username = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_username'));
$bl_password = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_password'));
$bl_blog = PConfig::get($b['uid'], 'blogger', 'bl_blog');
if($bl_username && $bl_password && $bl_blog) {
require_once('include/bbcode.php');
$title = '<title>' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . '</title>';
$post = $title . bbcode($b['body']);
if ($bl_username && $bl_password && $bl_blog) {
$title = '<title>' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . '</title>';
$post = $title . BBCode::convert($b['body']);
$post = xmlify($post);
$xml = <<< EOT
@ -197,10 +196,11 @@ EOT;
logger('blogger: data: ' . $xml, LOGGER_DATA);
if($bl_blog !== 'test')
$x = post_url($bl_blog,$xml);
if ($bl_blog !== 'test') {
$x = Network::post($bl_blog, $xml);
}
logger('posted to blogger: ' . (($x) ? $x : ''), LOGGER_DEBUG);
}
}

View File

@ -26,7 +26,7 @@ msgid "Blogger Export"
msgstr ""
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgid "Enable Blogger Post Addon"
msgstr ""
#: blogger.php:87

View File

@ -2,7 +2,7 @@
$a->strings["Post to blogger"] = "Enviament a blogger";
$a->strings["Blogger Post Settings"] = "Ajustos d'enviament a blogger";
$a->strings["Enable Blogger Post Plugin"] = "Habilita el Plugin d'Enviaments a Blogger";
$a->strings["Enable Blogger Post Addon"] = "Habilita el Addon d'Enviaments a Blogger";
$a->strings["Blogger username"] = "Nom d'usuari a blogger";
$a->strings["Blogger password"] = "Contrasenya a blogger";
$a->strings["Blogger API URL"] = "Blogger API URL";

View File

@ -28,8 +28,8 @@ msgid "Blogger Export"
msgstr "Blogger Export"
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgstr "Povolit Blogger Post Plugin"
msgid "Enable Blogger Post Addon"
msgstr "Povolit Blogger Post Addon"
#: blogger.php:87
msgid "Blogger username"

View File

@ -28,8 +28,8 @@ msgid "Blogger Export"
msgstr "Blogger Export"
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgstr "Blogger-Post-Plugin aktivieren"
msgid "Enable Blogger Post Addon"
msgstr "Blogger-Post-Addon aktivieren"
#: blogger.php:87
msgid "Blogger username"

View File

@ -7,7 +7,7 @@ function string_plural_select_de($n){
;
$a->strings["Post to blogger"] = "Auf Blogger posten";
$a->strings["Blogger Export"] = "Blogger Export";
$a->strings["Enable Blogger Post Plugin"] = "Blogger-Post-Plugin aktivieren";
$a->strings["Enable Blogger Post Addon"] = "Blogger-Post-Addon aktivieren";
$a->strings["Blogger username"] = "Blogger-Benutzername";
$a->strings["Blogger password"] = "Blogger-Passwort";
$a->strings["Blogger API URL"] = "Blogger-API-URL";

View File

@ -2,7 +2,7 @@
$a->strings["Post to blogger"] = "Afiŝi al blogger";
$a->strings["Blogger Post Settings"] = "Agordo pri Blogger Afiŝoj";
$a->strings["Enable Blogger Post Plugin"] = "Ŝalti la Blogger afiŝo kromprogramon";
$a->strings["Enable Blogger Post Addon"] = "Ŝalti la Blogger afiŝo kromprogramon";
$a->strings["Blogger username"] = "Blogger uzantonomo";
$a->strings["Blogger password"] = "Blogger pasvorto";
$a->strings["Blogger API URL"] = "Blogger API URL";

View File

@ -27,8 +27,8 @@ msgid "Blogger Export"
msgstr "Esportar Blogger"
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgstr "Activar plugin de entrada de Blogger"
msgid "Enable Blogger Post Addon"
msgstr "Activar addon de entrada de Blogger"
#: blogger.php:87
msgid "Blogger username"

View File

@ -7,7 +7,7 @@ function string_plural_select_es($n){
;
$a->strings["Post to blogger"] = "Entrada para blogger";
$a->strings["Blogger Export"] = "Esportar Blogger";
$a->strings["Enable Blogger Post Plugin"] = "Activar plugin de entrada de Blogger";
$a->strings["Enable Blogger Post Addon"] = "Activar addon de entrada de Blogger";
$a->strings["Blogger username"] = "Nombre de usuario de Blogger";
$a->strings["Blogger password"] = "Contraseña de Blogger";
$a->strings["Blogger API URL"] = "URL API de Blogger";

View File

@ -28,7 +28,7 @@ msgid "Blogger Export"
msgstr ""
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgid "Enable Blogger Post Addon"
msgstr "Activer le connecteur Blogger"
#: blogger.php:87

View File

@ -7,7 +7,7 @@ function string_plural_select_fr($n){
;
$a->strings["Post to blogger"] = "Poster sur Blogger";
$a->strings["Blogger Export"] = "";
$a->strings["Enable Blogger Post Plugin"] = "Activer le connecteur Blogger";
$a->strings["Enable Blogger Post Addon"] = "Activer le connecteur Blogger";
$a->strings["Blogger username"] = "Nom d'utilisateur Blogger";
$a->strings["Blogger password"] = "Mot de passe Blogger";
$a->strings["Blogger API URL"] = "URL de l'API de Blogger";

View File

@ -28,7 +28,7 @@ msgid "Blogger Export"
msgstr "Flytja út blogg"
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgid "Enable Blogger Post Addon"
msgstr "Virkja sendiviðbót fyrir blogg"
#: blogger.php:87

View File

@ -7,7 +7,7 @@ function string_plural_select_is($n){
;
$a->strings["Post to blogger"] = "Senda færslu á bloggara";
$a->strings["Blogger Export"] = "Flytja út blogg";
$a->strings["Enable Blogger Post Plugin"] = "Virkja sendiviðbót fyrir blogg";
$a->strings["Enable Blogger Post Addon"] = "Virkja sendiviðbót fyrir blogg";
$a->strings["Blogger username"] = "Notandanafn bloggara";
$a->strings["Blogger password"] = "Aðgangsorð bloggara";
$a->strings["Blogger API URL"] = "API slóð bloggs";

View File

@ -4,13 +4,13 @@
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2014
# fabrixxm <fabrix.xm@gmail.com>, 2014,2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2014-09-10 10:24+0000\n"
"PO-Revision-Date: 2018-03-19 13:21+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
@ -28,8 +28,8 @@ msgid "Blogger Export"
msgstr "Esporta Blogger"
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgstr "Abilita il plugin di invio a Blogger"
msgid "Enable Blogger Post Addon"
msgstr "Abilita il componente aggiuntivo di invio a Blogger"
#: blogger.php:87
msgid "Blogger username"

View File

@ -7,7 +7,7 @@ function string_plural_select_it($n){
;
$a->strings["Post to blogger"] = "Invia a Blogger";
$a->strings["Blogger Export"] = "Esporta Blogger";
$a->strings["Enable Blogger Post Plugin"] = "Abilita il plugin di invio a Blogger";
$a->strings["Enable Blogger Post Addon"] = "Abilita il componente aggiuntivo di invio a Blogger";
$a->strings["Blogger username"] = "Nome utente Blogger";
$a->strings["Blogger password"] = "Password Blogger";
$a->strings["Blogger API URL"] = "Indirizzo API Blogger";

View File

@ -2,7 +2,7 @@
$a->strings["Post to blogger"] = "";
$a->strings["Blogger Post Settings"] = "";
$a->strings["Enable Blogger Post Plugin"] = "";
$a->strings["Enable Blogger Post Addon"] = "";
$a->strings["Blogger username"] = "";
$a->strings["Blogger password"] = "";
$a->strings["Blogger API URL"] = "";

View File

@ -2,7 +2,7 @@
$a->strings["Post to blogger"] = "Post na blogger";
$a->strings["Blogger Post Settings"] = "Ustawienia postów na Blogger";
$a->strings["Enable Blogger Post Plugin"] = "";
$a->strings["Enable Blogger Post Addon"] = "";
$a->strings["Blogger username"] = "Nazwa użytkownika na Blogger";
$a->strings["Blogger password"] = "Hasło do Blogger";
$a->strings["Blogger API URL"] = "";

View File

@ -29,7 +29,7 @@ msgid "Blogger Export"
msgstr "Exportador Blogger"
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgid "Enable Blogger Post Addon"
msgstr "Habilitar plug-in para publicar no Blogger"
#: blogger.php:87

View File

@ -7,7 +7,7 @@ function string_plural_select_pt_br($n){
;
$a->strings["Post to blogger"] = "Publicar no Blogger";
$a->strings["Blogger Export"] = "Exportador Blogger";
$a->strings["Enable Blogger Post Plugin"] = "Habilitar plug-in para publicar no Blogger";
$a->strings["Enable Blogger Post Addon"] = "Habilitar plug-in para publicar no Blogger";
$a->strings["Blogger username"] = "Nome de usuário no Blogger";
$a->strings["Blogger password"] = "Senha do Blogger";
$a->strings["Blogger API URL"] = "URL da API do Blogger";

View File

@ -27,7 +27,7 @@ msgid "Blogger Export"
msgstr "Export pe Blogger "
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgid "Enable Blogger Post Addon"
msgstr "Activare Modul Postare pe Blogger "
#: blogger.php:87

View File

@ -7,7 +7,7 @@ function string_plural_select_ro($n){
;
$a->strings["Post to blogger"] = "Postați pe Blogger";
$a->strings["Blogger Export"] = "Export pe Blogger ";
$a->strings["Enable Blogger Post Plugin"] = "Activare Modul Postare pe Blogger ";
$a->strings["Enable Blogger Post Addon"] = "Activare Modul Postare pe Blogger ";
$a->strings["Blogger username"] = "Utilizator Blogger";
$a->strings["Blogger password"] = "Parolă Blogger ";
$a->strings["Blogger API URL"] = "URL Cheie API Blogger ";

View File

@ -28,7 +28,7 @@ msgid "Blogger Export"
msgstr "Экспорт в Blogger"
#: blogger.php:82
msgid "Enable Blogger Post Plugin"
msgid "Enable Blogger Post Addon"
msgstr "Включить плагин Blogger"
#: blogger.php:87

View File

@ -7,7 +7,7 @@ function string_plural_select_ru($n){
;
$a->strings["Post to blogger"] = "Написать в Blogger";
$a->strings["Blogger Export"] = "Экспорт в Blogger";
$a->strings["Enable Blogger Post Plugin"] = "Включить плагин Blogger";
$a->strings["Enable Blogger Post Addon"] = "Включить плагин Blogger";
$a->strings["Blogger username"] = "Имя пользователя Blogger";
$a->strings["Blogger password"] = "Пароль Blogger";
$a->strings["Blogger API URL"] = "Blogger API URL";

View File

@ -2,7 +2,7 @@
$a->strings["Post to blogger"] = "转播到blogger";
$a->strings["Blogger Post Settings"] = "Blogger转播设置";
$a->strings["Enable Blogger Post Plugin"] = "使Blogger转播插件可用";
$a->strings["Enable Blogger Post Addon"] = "使Blogger转播插件可用";
$a->strings["Blogger username"] = "Blogger用户名";
$a->strings["Blogger password"] = "Blogger密码";
$a->strings["Blogger API URL"] = "Blogger API URL";

View File

@ -5,4 +5,4 @@ Please register an app at [http://bufferapp.com/developers/api](http://bufferapp
Please use (your server address)/buffer/connect as Callback URL.
After the registration please enter the values for "Client ID" and "Client Secret" in the
[administration](admin/plugins/buffer).
[administration](admin/addons/buffer).

View File

@ -5,22 +5,30 @@
* Version: 0.2
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*/
require('addon/buffer/bufferapp.php');
require 'addon/buffer/bufferapp.php';
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function buffer_install() {
register_hook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
register_hook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
register_hook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
register_hook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
register_hook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
Addon::registerHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::registerHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::registerHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Addon::registerHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Addon::registerHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
}
function buffer_uninstall() {
unregister_hook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
unregister_hook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
unregister_hook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
unregister_hook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
unregister_hook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
Addon::unregisterHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::unregisterHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::unregisterHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Addon::unregisterHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
}
function buffer_module() {}
@ -28,7 +36,7 @@ function buffer_module() {}
function buffer_content(&$a) {
if(! local_user()) {
notice( t('Permission denied.') . EOL);
notice(L10n::t('Permission denied.') . EOL);
return '';
}
@ -50,28 +58,30 @@ function buffer_content(&$a) {
return $o;
}
function buffer_plugin_admin(&$a, &$o){
$t = get_markup_template( "admin.tpl", "addon/buffer/" );
function buffer_addon_admin(&$a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/buffer/");
$o = replace_macros($t, array(
'$submit' => t('Save Settings'),
// name, label, value, help, [extra values]
'$client_id' => array('client_id', t('Client ID'), get_config('buffer', 'client_id' ), ''),
'$client_secret' => array('client_secret', t('Client Secret'), get_config('buffer', 'client_secret' ), ''),
));
$o = replace_macros($t, [
'$submit' => L10n::t('Save Settings'),
// name, label, value, help, [extra values]
'$client_id' => ['client_id', L10n::t('Client ID'), Config::get('buffer', 'client_id'), ''],
'$client_secret' => ['client_secret', L10n::t('Client Secret'), Config::get('buffer', 'client_secret'), ''],
]);
}
function buffer_plugin_admin_post(&$a){
$client_id = ((x($_POST,'client_id')) ? notags(trim($_POST['client_id'])) : '');
$client_secret = ((x($_POST,'client_secret')) ? notags(trim($_POST['client_secret'])): '');
set_config('buffer','client_id',$client_id);
set_config('buffer','client_secret',$client_secret);
info( t('Settings updated.'). EOL );
function buffer_addon_admin_post(&$a)
{
$client_id = ((x($_POST, 'client_id')) ? notags(trim($_POST['client_id'])) : '');
$client_secret = ((x($_POST, 'client_secret')) ? notags(trim($_POST['client_secret'])): '');
Config::set('buffer', 'client_id', $client_id);
Config::set('buffer', 'client_secret', $client_secret);
info(L10n::t('Settings updated.'). EOL);
}
function buffer_connect(&$a) {
if (isset($_REQUEST["error"])) {
$o = t('Error when registering buffer connection:')." ".$_REQUEST["error"];
$o = L10n::t('Error when registering buffer connection:')." ".$_REQUEST["error"];
return $o;
}
// Start a session. This is necessary to hold on to a few keys the callback script will also need
@ -90,9 +100,9 @@ function buffer_connect(&$a) {
$o .= '<a href="' . $buffer->get_login_url() . '">Connect to Buffer!</a>';
} else {
logger("buffer_connect: authenticated");
$o .= t("You are now authenticated to buffer. ");
$o .= '<br /><a href="'.$a->get_baseurl().'/settings/connectors">'.t("return to the connector page").'</a>';
set_pconfig(local_user(), 'buffer','access_token', $buffer->access_token);
$o .= L10n::t("You are now authenticated to buffer. ");
$o .= '<br /><a href="'.$a->get_baseurl().'/settings/connectors">'.L10n::t("return to the connector page").'</a>';
PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token);
}
return($o);
@ -107,7 +117,7 @@ function buffer_jot_nets(&$a,&$b) {
$buffer_defpost = get_pconfig(local_user(),'buffer','post_by_default');
$selected = ((intval($buffer_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="buffer_enable"' . $selected . ' value="1" /> '
. t('Post to Buffer') . '</div>';
. L10n::t('Post to Buffer') . '</div>';
}
}
@ -132,11 +142,11 @@ function buffer_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<span id="settings_buffer_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_buffer_expanded\'); openClose(\'settings_buffer_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/buffer.png" /><h3 class="connector">'. t('Buffer Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/buffer.png" /><h3 class="connector">'. L10n::t('Buffer Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_buffer_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_buffer_expanded\'); openClose(\'settings_buffer_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/buffer.png" /><h3 class="connector">'. t('Buffer Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/buffer.png" /><h3 class="connector">'. L10n::t('Buffer Export').'</h3>';
$s .= '</span>';
$client_id = get_config("buffer", "client_id");
@ -146,21 +156,21 @@ function buffer_settings(&$a,&$s) {
$s .= '<div id="buffer-password-wrapper">';
if ($access_token == "") {
$s .= '<div id="buffer-authenticate-wrapper">';
$s .= '<a href="'.$a->get_baseurl().'/buffer/connect">'.t("Authenticate your Buffer connection").'</a>';
$s .= '<a href="'.$a->get_baseurl().'/buffer/connect">'.L10n::t("Authenticate your Buffer connection").'</a>';
$s .= '</div><div class="clear"></div>';
} else {
$s .= '<div id="buffer-enable-wrapper">';
$s .= '<label id="buffer-enable-label" for="buffer-checkbox">' . t('Enable Buffer Post Plugin') . '</label>';
$s .= '<label id="buffer-enable-label" for="buffer-checkbox">' . L10n::t('Enable Buffer Post Addon') . '</label>';
$s .= '<input id="buffer-checkbox" type="checkbox" name="buffer" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="buffer-bydefault-wrapper">';
$s .= '<label id="buffer-bydefault-label" for="buffer-bydefault">' . t('Post to Buffer by default') . '</label>';
$s .= '<label id="buffer-bydefault-label" for="buffer-bydefault">' . L10n::t('Post to Buffer by default') . '</label>';
$s .= '<input id="buffer-bydefault" type="checkbox" name="buffer_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="buffer-delete-wrapper">';
$s .= '<label id="buffer-delete-label" for="buffer-delete">' . t('Check to delete this preset') . '</label>';
$s .= '<label id="buffer-delete-label" for="buffer-delete">' . L10n::t('Check to delete this preset') . '</label>';
$s .= '<input id="buffer-delete" type="checkbox" name="buffer_delete" value="1" />';
$s .= '</div><div class="clear"></div>';
@ -169,7 +179,7 @@ function buffer_settings(&$a,&$s) {
$profiles = $buffer->go('/profiles');
if (is_array($profiles)) {
$s .= '<div id="buffer-accounts-wrapper">';
$s .= t("Posts are going to all accounts that are enabled by default:");
$s .= L10n::t("Posts are going to all accounts that are enabled by default:");
$s .= "<ul>";
foreach ($profiles as $profile) {
if (!$profile->default)
@ -189,7 +199,7 @@ function buffer_settings(&$a,&$s) {
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="buffer-submit" name="buffer-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="buffer-submit" name="buffer-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
}
@ -252,12 +262,9 @@ function buffer_send(&$a,&$b) {
$client_secret = get_config("buffer", "client_secret");
$access_token = get_pconfig($b['uid'], "buffer","access_token");
if($access_token) {
if ($access_token) {
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
require_once("include/plaintext.php");
require_once("include/network.php");
$profiles = $buffer->go('/profiles');
if (is_array($profiles)) {
logger("Will send these parameter ".print_r($b, true), LOGGER_DEBUG);
@ -321,7 +328,7 @@ function buffer_send(&$a,&$b) {
$item["body"] = preg_replace("(\[s\](.*?)\[\/s\])ism",'-$1-',$item["body"]);
}
$post = plaintext($a, $item, $limit, $includedlinks, $htmlmode);
$post = BBCode::toPlaintext($item, $limit, $includedlinks, $htmlmode);
logger("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG);
// The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures
@ -334,11 +341,11 @@ function buffer_send(&$a,&$b) {
//if ($includedlinks) {
// if (isset($post["url"]))
// $post["url"] = short_link($post["url"]);
// $post["url"] = Network::shortenUrl($post["url"]);
// if (isset($post["image"]))
// $post["image"] = short_link($post["image"]);
// $post["image"] = Network::shortenUrl($post["image"]);
// if (isset($post["preview"]))
// $post["preview"] = short_link($post["preview"]);
// $post["preview"] = Network::shortenUrl($post["preview"]);
//}
// Seems like a bug to me
@ -347,8 +354,8 @@ function buffer_send(&$a,&$b) {
if (($profile->service == "twitter") && isset($post["url"]) && ($post["type"] != "photo"))
$post["text"] .= " ".$post["url"];
elseif (($profile->service == "appdotnet") && isset($post["url"]) && isset($post["title"]) && ($post["type"] != "photo")) {
$post["title"] = shortenmsg($post["title"], 90);
$post["text"] = shortenmsg($post["text"], $limit - (24 + strlen($post["title"])));
$post["title"] = Plaintext::shorten($post["title"], 90);
$post["text"] = Plaintext::shorten($post["text"], $limit - (24 + strlen($post["title"])));
$post["text"] .= "\n[".$post["title"]."](".$post["url"].")";
} elseif (($profile->service == "appdotnet") && isset($post["url"]) && ($post["type"] != "photo"))
$post["text"] .= " ".$post["url"];

View File

@ -58,7 +58,7 @@ msgid "Authenticate your Buffer connection"
msgstr ""
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgid "Enable Buffer Post Addon"
msgstr ""
#: buffer.php:151

View File

@ -60,8 +60,8 @@ msgid "Authenticate your Buffer connection"
msgstr "Přihlásit ke spojení na Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgstr "Povolit Buffer Post Plugin"
msgid "Enable Buffer Post Addon"
msgstr "Povolit Buffer Post Addon"
#: buffer.php:151
msgid "Post to Buffer by default"

View File

@ -15,7 +15,7 @@ $a->strings["return to the connector page"] = "návrat ke stránce konektor";
$a->strings["Post to Buffer"] = "Příspěvek na Buffer";
$a->strings["Buffer Export"] = "Buffer Export";
$a->strings["Authenticate your Buffer connection"] = "Přihlásit ke spojení na Buffer";
$a->strings["Enable Buffer Post Plugin"] = "Povolit Buffer Post Plugin";
$a->strings["Enable Buffer Post Addon"] = "Povolit Buffer Post Addon";
$a->strings["Post to Buffer by default"] = "Defaultně zaslat na Buffer";
$a->strings["Check to delete this preset"] = "Zaškrtnout pro smazání tohoto nastavení";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Příspěvky jsou zasílány na všechny účty, které jsou defaultně povoleny:";

View File

@ -60,8 +60,8 @@ msgid "Authenticate your Buffer connection"
msgstr "Authentifiziere deine Verbindung zu buffer"
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgstr "Buffer Post-Plugin aktivieren"
msgid "Enable Buffer Post Addon"
msgstr "Buffer Post-Addon aktivieren"
#: buffer.php:151
msgid "Post to Buffer by default"

View File

@ -15,7 +15,7 @@ $a->strings["return to the connector page"] = "zurück zur Connector Seite";
$a->strings["Post to Buffer"] = "Auf buffer veröffentlichen";
$a->strings["Buffer Export"] = "Buffer Export";
$a->strings["Authenticate your Buffer connection"] = "Authentifiziere deine Verbindung zu buffer";
$a->strings["Enable Buffer Post Plugin"] = "Buffer Post-Plugin aktivieren";
$a->strings["Enable Buffer Post Addon"] = "Buffer Post-Addon aktivieren";
$a->strings["Post to Buffer by default"] = "Standardmäßig auf buffer veröffentlichen";
$a->strings["Check to delete this preset"] = "Markieren um dieses Preset zu löschen";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Beiträge werden an alle Accounts geschickt, die Standardmäßig aktiviert sind.";

View File

@ -59,8 +59,8 @@ msgid "Authenticate your Buffer connection"
msgstr "Autenticar su conexión de Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgstr "Active el plugin de publicación de Buffer"
msgid "Enable Buffer Post Addon"
msgstr "Active el addon de publicación de Buffer"
#: buffer.php:151
msgid "Post to Buffer by default"

View File

@ -15,7 +15,7 @@ $a->strings["return to the connector page"] = "Vuelva a la página de conexión"
$a->strings["Post to Buffer"] = "Publique en Buffer";
$a->strings["Buffer Export"] = "Exportar Buffer";
$a->strings["Authenticate your Buffer connection"] = "Autenticar su conexión de Buffer";
$a->strings["Enable Buffer Post Plugin"] = "Active el plugin de publicación de Buffer";
$a->strings["Enable Buffer Post Addon"] = "Active el addon de publicación de Buffer";
$a->strings["Post to Buffer by default"] = "Publicar en Buffer por defecto";
$a->strings["Check to delete this preset"] = "Verificar para eliminar este preajuste";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Las publicaciones van a todas las cuentas que estén habilitadas por defecto";

View File

@ -62,7 +62,7 @@ msgid "Authenticate your Buffer connection"
msgstr "Authentifier votre connexion à Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgid "Enable Buffer Post Addon"
msgstr "Activer le connecteur Buffer"
#: buffer.php:151

View File

@ -15,7 +15,7 @@ $a->strings["return to the connector page"] = "revenir à la page du connecteur"
$a->strings["Post to Buffer"] = "Publier sur Buffer";
$a->strings["Buffer Export"] = "Export Buffer";
$a->strings["Authenticate your Buffer connection"] = "Authentifier votre connexion à Buffer";
$a->strings["Enable Buffer Post Plugin"] = "Activer le connecteur Buffer";
$a->strings["Enable Buffer Post Addon"] = "Activer le connecteur Buffer";
$a->strings["Post to Buffer by default"] = "Publier sur Buffer par défaut";
$a->strings["Check to delete this preset"] = "Cocher pour supprimer ce préréglage";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Les posts sont envoyés à tous les comptes activés par défault:";

View File

@ -4,15 +4,15 @@
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2014
# fabrixxm <fabrix.xm@gmail.com>, 2014,2018
# Sandro Santilli <strk@kbt.io>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2015-11-01 11:05+0000\n"
"Last-Translator: Sandro Santilli <strk@kbt.io>\n"
"PO-Revision-Date: 2018-03-19 13:21+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -61,8 +61,8 @@ msgid "Authenticate your Buffer connection"
msgstr "Autentica la tua connessione a Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgstr "Abilita il plugin di invio a Buffer"
msgid "Enable Buffer Post Addon"
msgstr "Abilita il componente aggiuntivo di invio a Buffer"
#: buffer.php:151
msgid "Post to Buffer by default"

View File

@ -15,7 +15,7 @@ $a->strings["return to the connector page"] = "ritorna alla pagina del connettor
$a->strings["Post to Buffer"] = "Invia a Buffer";
$a->strings["Buffer Export"] = "Esporta Buffer";
$a->strings["Authenticate your Buffer connection"] = "Autentica la tua connessione a Buffer";
$a->strings["Enable Buffer Post Plugin"] = "Abilita il plugin di invio a Buffer";
$a->strings["Enable Buffer Post Addon"] = "Abilita il componente aggiuntivo di invio a Buffer";
$a->strings["Post to Buffer by default"] = "Invia sempre a Buffer";
$a->strings["Check to delete this preset"] = "Seleziona per eliminare questo preset";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "I messaggi andranno a tutti gli account che sono abilitati:";

View File

@ -61,8 +61,8 @@ msgid "Authenticate your Buffer connection"
msgstr "Autenticar sua conexão de Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgstr "Habilita plugin para publicar no Buffer"
msgid "Enable Buffer Post Addon"
msgstr "Habilita addon para publicar no Buffer"
#: buffer.php:151
msgid "Post to Buffer by default"

View File

@ -15,7 +15,7 @@ $a->strings["return to the connector page"] = "Volte a página de conectores.";
$a->strings["Post to Buffer"] = "Publicar no Buffer";
$a->strings["Buffer Export"] = "Exportar Buffer";
$a->strings["Authenticate your Buffer connection"] = "Autenticar sua conexão de Buffer";
$a->strings["Enable Buffer Post Plugin"] = "Habilita plugin para publicar no Buffer";
$a->strings["Enable Buffer Post Addon"] = "Habilita addon para publicar no Buffer";
$a->strings["Post to Buffer by default"] = "Publica no Buffer por padrão";
$a->strings["Check to delete this preset"] = "Marque para excluir este perfil";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "";

View File

@ -59,7 +59,7 @@ msgid "Authenticate your Buffer connection"
msgstr "Autentificați-vă conectarea la Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgid "Enable Buffer Post Addon"
msgstr "Activare Modul Postare pe Buffer"
#: buffer.php:151

View File

@ -15,7 +15,7 @@ $a->strings["return to the connector page"] = "revenire la pagina de conectare";
$a->strings["Post to Buffer"] = "Postați pe Buffer";
$a->strings["Buffer Export"] = "Export pe Buffer ";
$a->strings["Authenticate your Buffer connection"] = "Autentificați-vă conectarea la Buffer";
$a->strings["Enable Buffer Post Plugin"] = "Activare Modul Postare pe Buffer";
$a->strings["Enable Buffer Post Addon"] = "Activare Modul Postare pe Buffer";
$a->strings["Post to Buffer by default"] = "Postați implicit pe Buffer";
$a->strings["Check to delete this preset"] = "Bifați pentru a șterge această presetare";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Posturile merg către toate conturile care sunt activate implicit:";

View File

@ -60,7 +60,7 @@ msgid "Authenticate your Buffer connection"
msgstr "Аутентифицируйте свое соединение с Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Plugin"
msgid "Enable Buffer Post Addon"
msgstr "Включить плагин Buffer"
#: buffer.php:151

View File

@ -15,7 +15,7 @@ $a->strings["return to the connector page"] = "вернуться на стра
$a->strings["Post to Buffer"] = "Написать в Buffer";
$a->strings["Buffer Export"] = "Экспорт в Buffer";
$a->strings["Authenticate your Buffer connection"] = "Аутентифицируйте свое соединение с Buffer";
$a->strings["Enable Buffer Post Plugin"] = "Включить плагин Buffer";
$a->strings["Enable Buffer Post Addon"] = "Включить плагин Buffer";
$a->strings["Post to Buffer by default"] = "Отправлять в Buffer по умолчанию";
$a->strings["Check to delete this preset"] = "Отметьте для удаления этих настроек";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Сообщения уходят во все учетные записи по умолчанию:";

View File

@ -5,11 +5,20 @@
* Version: 1.0
* Author: Mike Macgirvin <mike@macgirvin.com>
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
function buglink_install()
{
Addon::registerHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
}
function buglink_install() { register_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_uninstall()
{
Addon::unregisterHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
}
function buglink_uninstall() { unregister_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_active(&$a,&$b) { $b .= '<div id="buglink_wrapper" style="position: fixed; bottom: 5px; left: 5px;"><a href="https://github.com/friendica/friendica/issues" target="_blank" title="' . t('Report Bug') . '"><img src="addon/buglink/bug-x.gif" alt="' . t('Report Bug') . '" /></a></div>'; }
function buglink_active(&$a, &$b)
{
$b .= '<div id="buglink_wrapper" style="position: fixed; bottom: 5px; left: 5px;"><a href="https://github.com/friendica/friendica/issues" target="_blank" title="' . L10n::t('Report Bug') . '"><img src="addon/buglink/bug-x.gif" alt="' . L10n::t('Report Bug') . '" /></a></div>';
}

View File

@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2014-09-10 10:27+0000\n"
"PO-Revision-Date: 2017-09-20 06:07+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"

View File

@ -5,14 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
function calc_install() {
register_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
Addon::registerHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_uninstall() {
unregister_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
Addon::unregisterHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}

View File

@ -1,34 +1,17 @@
Community Home
--------------
This plugin overwrites the default home page shown to not logged users.
On sidebar there are the login form, last ten users (if they have
choosed to be in site directory), last ten public photos and last ten
"likes" sent by a site user or about a site user's item
This addon overwrites the default home page shown to anonymous users.
On the sidebar there are the login form, last ten users (if they chose
to be in the site directory), last ten public photos and last ten
"likes" sent by a site user or about a site user's item.
In main content is shown the community stream. This plugin doesn't
honour your community page visibility site setting: the community
In the main content is shown the community stream. This addon doesn't
honor your community page visibility site setting: the community
stream is shown also if you have choose to not show the community page.
If 'home.html' is found in your friendica root, its content is inserted
If 'home.html' is found in your friendica root, its content is inserted
before community stream
Each elements can be show or not. At the moment, there is no admin page
for settings, so this settings must be added to yout .htconfig.php
$a->config['communityhome']['showcommunitystream'] = true;
$a->config['communityhome']['showlastlike'] = true;
$a->config['communityhome']['showlastphotos'] = true;
$a->config['communityhome']['showactiveusers'] = true;
$a->config['communityhome']['showlastusers'] = true;
If you don't want to show something, set it to false.
Note:
-----
- Default is "false". With no settings in .htconfig.php, nothing is
shown, except login form and content of 'home.html'
- Active users query can be heavy for db, and on some system don't work
By default no features are enabled, you can edit this addon's settings
through the admin panel.

View File

@ -41,3 +41,8 @@ aside #likes { margin: 0px; padding: 0px; list-style: none; }
aside #div_id_remember { overflow: auto; width: 100%; padding-top:120px;}
#login_openid input { width: 160px; }
/* frio fix */
body.mod-home .navbar.navbar-fixed-top ul.nav.navbar-nav #nav-login {
display: block;
}

View File

@ -1,67 +1,114 @@
<?php
/**
* Name: Community home
* Description: Show last community activity in homepage
* Version: 2.0
* Author: Fabio Comuni <http://kirgroup.com/profile/fabrixxm>
* Status: Unsupported
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Module\Login;
require_once('mod/community.php');
require_once 'mod/community.php';
function communityhome_install() {
register_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
function communityhome_install()
{
Addon::registerHook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
logger("installed communityhome");
}
function communityhome_uninstall() {
unregister_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
function communityhome_uninstall()
{
Addon::unregisterHook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
logger("removed communityhome");
}
function communityhome_home(&$a, &$o){
// custom css
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/communityhome/communityhome.css" media="all" />';
function communityhome_getopts()
{
return [
'hidelogin' => L10n::t('Hide login form'),
'showlastusers' => L10n::t('Show last new users'),
'showlastphotos' => L10n::t('Show last photos'),
'showlastlike' => L10n::t('Show last liked items'),
'showcommunitystream' => L10n::t('Show community stream')
];
}
if (!get_config('communityhome','hidelogin')){
$aside = array(
'$tab_1' => t('Login'),
'$tab_2' => t('OpenID'),
'$noOid' => get_config('system','no_openid'),
);
function communityhome_addon_admin(App $a, &$o)
{
$tpl = get_markup_template('settings.tpl', 'addon/communityhome/');
$opts = communityhome_getopts();
$ctx = [
'$submit' => L10n::t("Submit"),
'$fields' => [],
];
foreach ($opts as $k => $v) {
$ctx['fields'][] = ['communityhome_' . $k, $v, Config::get('communityhome', $k)];
}
$o = replace_macros($tpl, $ctx);
}
function communityhome_addon_admin_post(App $a)
{
if (x($_POST, 'communityhome-submit')) {
$opts = communityhome_getopts();
foreach ($opts as $k => $v) {
Config::set('communityhome', $k, x($_POST, 'communityhome_' . $k));
}
}
}
function communityhome_home(App $a, &$o)
{
// custom css
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/communityhome/communityhome.css" media="all" />';
if (!Config::get('communityhome', 'hidelogin')) {
$aside = [
'$tab_1' => L10n::t('Login'),
'$tab_2' => L10n::t('OpenID'),
'$noOid' => Config::get('system', 'no_openid'),
];
// login form
$aside['$login_title'] = t('Login');
$aside['$login_form'] = login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);
} else
$aside = array(
//'$tab_1' => t('Login'),
//'$tab_2' => t('OpenID'),
//'$noOid' => get_config('system','no_openid'),
);
$aside['$login_title'] = L10n::t('Login');
$aside['$login_form'] = Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? false : true);
} else {
$aside = [
//'$tab_1' => L10n::t('Login'),
//'$tab_2' => L10n::t('OpenID'),
//'$noOid' => Config::get('system','no_openid'),
];
}
// last 12 users
if (get_config('communityhome','showlastusers')===true){
$aside['$lastusers_title'] = t('Latest users');
$aside['$lastusers_items'] = array();
if (Config::get('communityhome', 'showlastusers')) {
$aside['$lastusers_title'] = L10n::t('Latest users');
$aside['$lastusers_items'] = [];
$sql_extra = "";
$publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " );
$publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 " );
$order = " ORDER BY `register_date` DESC ";
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`
FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ",
FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d, %d ",
0,
12
);
# $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl');
$tpl = get_markup_template( 'directory_item.tpl', 'addon/communityhome/' );
if(count($r)) {
# $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl');
$tpl = get_markup_template('directory_item.tpl', 'addon/communityhome/');
if (count($r)) {
$photo = 'thumb';
foreach($r as $rr) {
foreach ($r as $rr) {
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
$entry = replace_macros($tpl,array(
$entry = replace_macros($tpl, [
'$id' => $rr['id'],
'$profile_link' => $profile_link,
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
@ -71,45 +118,13 @@ function communityhome_home(&$a, &$o){
}
}
}
// 12 most active users (by posts and contacts)
// this query don't work on some mysql versions
if (get_config('communityhome','showactiveusers')===true){
$r = q("SELECT `uni`.`contacts`,`uni`.`items`, `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` FROM
(SELECT COUNT(*) as `contacts`, `uid` FROM `contact` WHERE `self`=0 GROUP BY `uid`) AS `con`,
(SELECT COUNT(*) as `items`, `uid` FROM `item` WHERE `item`.`changed` > DATE(NOW() - INTERVAL 1 MONTH) AND `item`.`wall` = 1 GROUP BY `uid`) AS `ite`,
(
SELECT `contacts`,`items`,`ite`.`uid` FROM `con` RIGHT OUTER JOIN `ite` ON `con`.`uid`=`ite`.`uid`
UNION ALL
SELECT `contacts`,`items`,`con`.`uid` FROM `con` LEFT OUTER JOIN `ite` ON `con`.`uid`=`ite`.`uid`
) AS `uni`, `user`, `profile`
WHERE `uni`.`uid`=`user`.`uid`
AND `uni`.`uid`=`profile`.`uid` AND `profile`.`publish`=1
GROUP BY `uid`
ORDER BY `items` DESC,`contacts` DESC
LIMIT 0,10");
if($r && count($r)) {
$aside['$activeusers_title'] = t('Most active users');
$aside['$activeusers_items'] = array();
$photo = 'thumb';
foreach($r as $rr) {
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
$entry = replace_macros($tpl,array(
'$id' => $rr['id'],
'$profile_link' => $profile_link,
'$photo' => $rr[$photo],
'$alt_text' => sprintf("%s (%s posts, %s contacts)",$rr['name'], ($rr['items']?$rr['items']:'0'), ($rr['contacts']?$rr['contacts']:'0'))
));
$aside['$activeusers_items'][] = $entry;
}
}
}
// last 12 photos
if (get_config('communityhome','showlastphotos')===true){
$aside['$photos_title'] = t('Latest photos');
$aside['$photos_items'] = array();
$r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM
(SELECT `resource-id`, MAX(`scale`) as maxscale FROM `photo`
if (Config::get('communityhome', 'showlastphotos')) {
$aside['$photos_title'] = L10n::t('Latest photos');
$aside['$photos_items'] = [];
$r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM
(SELECT `resource-id`, MAX(`scale`) as maxscale FROM `photo`
WHERE `profile`=0 AND `contact-id`=0 AND `album` NOT IN ('Contact Photos', '%s', 'Profile Photos', '%s')
AND `allow_cid`='' AND `allow_gid`='' AND `deny_cid`='' AND `deny_gid`='' GROUP BY `resource-id`) AS `t1`
INNER JOIN `photo` ON `photo`.`resource-id`=`t1`.`resource-id` AND `photo`.`scale` = `t1`.`maxscale`,
@ -119,19 +134,19 @@ function communityhome_home(&$a, &$o){
AND `user`.`hidewall` = 0
ORDER BY `photo`.`edited` DESC
LIMIT 0, 12",
dbesc(t('Contact Photos')),
dbesc(t('Profile Photos'))
);
dbesc(L10n::t('Contact Photos')),
dbesc(L10n::t('Profile Photos'))
);
if(count($r)) {
# $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl');
$tpl = get_markup_template( 'directory_item.tpl', 'addon/communityhome/' );
foreach($r as $rr) {
if (count($r)) {
# $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl');
$tpl = get_markup_template('directory_item.tpl', 'addon/communityhome/');
foreach ($r as $rr) {
$photo_page = $a->get_baseurl() . '/photos/' . $rr['nickname'] . '/image/' . $rr['resource-id'];
$photo_url = $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] .'.jpg';
$photo_url = $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.jpg';
$entry = replace_macros($tpl,array(
$entry = replace_macros($tpl, [
'$id' => $rr['id'],
'$profile_link' => $photo_page,
'$photo' => $photo_url,
@ -144,48 +159,49 @@ function communityhome_home(&$a, &$o){
}
// last 10 liked items
if (get_config('communityhome','showlastlike')===true){
$aside['$like_title'] = t('Latest likes');
$aside['$like_items'] = array();
$r = q("SELECT `T1`.`created`, `T1`.`liker`, `T1`.`liker-link`, `item`.* FROM
(SELECT `parent-uri`, `created`, `author-name` AS `liker`,`author-link` AS `liker-link`
if (Config::get('communityhome', 'showlastlike')) {
$aside['$like_title'] = L10n::t('Latest likes');
$aside['$like_items'] = [];
$r = q("SELECT `T1`.`created`, `T1`.`liker`, `T1`.`liker-link`, `item`.* FROM
(SELECT `parent-uri`, `created`, `author-name` AS `liker`,`author-link` AS `liker-link`
FROM `item` WHERE `verb`='http://activitystrea.ms/schema/1.0/like' GROUP BY `parent-uri` ORDER BY `created` DESC) AS T1
INNER JOIN `item` ON `item`.`uri`=`T1`.`parent-uri`
WHERE `T1`.`liker-link` LIKE '%s%%' OR `item`.`author-link` LIKE '%s%%'
GROUP BY `uri`
ORDER BY `T1`.`created` DESC
LIMIT 0,10",
$a->get_baseurl(),$a->get_baseurl()
);
$a->get_baseurl(),
$a->get_baseurl()
);
foreach ($r as $rr) {
$author = '<a href="' . $rr['liker-link'] . '">' . $rr['liker'] . '</a>';
$objauthor = '<a href="' . $rr['author-link'] . '">' . $rr['author-name'] . '</a>';
$author = '<a href="' . $rr['liker-link'] . '">' . $rr['liker'] . '</a>';
$objauthor = '<a href="' . $rr['author-link'] . '">' . $rr['author-name'] . '</a>';
//var_dump($rr['verb'],$rr['object-type']); killme();
switch($rr['verb']){
switch ($rr['verb']) {
case 'http://activitystrea.ms/schema/1.0/post':
switch ($rr['object-type']){
switch ($rr['object-type']) {
case 'http://activitystrea.ms/schema/1.0/event':
$post_type = t('event');
$post_type = L10n::t('event');
break;
default:
$post_type = t('status');
$post_type = L10n::t('status');
}
break;
default:
if ($rr['resource-id']){
$post_type = t('photo');
$m=array(); preg_match("/\[url=([^]]*)\]/", $rr['body'], $m);
if ($rr['resource-id']) {
$post_type = L10n::t('photo');
$m = [];
preg_match("/\[url=([^]]*)\]/", $rr['body'], $m);
$rr['plink'] = $m[1];
} else {
$post_type = t('status');
$post_type = L10n::t('status');
}
}
$plink = '<a href="' . $rr['plink'] . '">' . $post_type . '</a>';
$aside['$like_items'][] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink);
$aside['$like_items'][] = L10n::t('%1$s likes %2$s\'s %3$s', $author, $objauthor, $plink);
}
}
@ -193,19 +209,16 @@ function communityhome_home(&$a, &$o){
$tpl = get_markup_template('communityhome.tpl', 'addon/communityhome/');
$a->page['aside'] = replace_macros($tpl, $aside);
$o = '<h1>' . ((x($a->config,'sitename')) ? sprintf( t("Welcome to %s") ,$a->config['sitename']) : "" ) . '</h1>';
$o = '<h1>' . ((x($a->config, 'sitename')) ? L10n::t("Welcome to %s", $a->config['sitename']) : "" ) . '</h1>';
if(file_exists('home.html'))
$o = file_get_contents('home.html');
if (file_exists('home.html')) $o = file_get_contents('home.html');
if (get_config('communityhome','showcommunitystream')===true){
$oldset = get_config('system','community_page_style');
if ($oldset == CP_NO_COMMUNITY_PAGE)
set_config('system','community_page_style', CP_USERS_ON_SERVER);
if (Config::get('communityhome', 'showcommunitystream')) {
$oldset = Config::get('system', 'community_page_style');
if ($oldset == CP_NO_COMMUNITY_PAGE) Config::set('system', 'community_page_style', CP_USERS_ON_SERVER);
$o .= community_content($a,1);
$o .= community_content($a, 1);
if ($oldset == CP_NO_COMMUNITY_PAGE)
set_config('system','community_page_style', $oldset);
if ($oldset == CP_NO_COMMUNITY_PAGE) Config::set('system', 'community_page_style', $oldset);
}
}

View File

@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-09-10 10:30+0000\n"
"PO-Revision-Date: 2017-09-20 06:07+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"

View File

@ -15,9 +15,9 @@
$("#tab_1").removeClass("active");
e.preventDefault();
return false;
});
});
</script>
{{if $noOid}}
@ -41,15 +41,6 @@
{{/if}}
{{if $activeusers_title}}
<h3>{{$activeusers_title}}</h3>
<div class='items-wrapper'>
{{foreach $activeusers_items as $i}}
{{$i}}
{{/foreach}}
</div>
{{/if}}
{{if $photos_title}}
<h3>{{$photos_title}}</h3>
<div class='items-wrapper'>

View File

@ -5,13 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
function convert_install() {
register_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
Addon::registerHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_uninstall() {
unregister_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
Addon::unregisterHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_app_menu($a,&$b) {

View File

@ -9,9 +9,15 @@
*
*/
require_once('include/network.php');
require_once("mod/proxy.php");
require_once('include/text.php');
require_once 'mod/proxy.php';
require_once 'include/text.php';
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Network;
// get the weather data from OpenWeatherMap
function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0) {
@ -26,9 +32,9 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0)
}
}
try {
$res = new SimpleXMLElement(fetch_url($url));
$res = new SimpleXMLElement(Network::fetchUrl($url));
} catch (Exception $e) {
info(t('Error fetching weather data.\nError was: '.$e->getMessage()));
info(L10n::t('Error fetching weather data.\nError was: '.$e->getMessage()));
return false;
}
if ((string)$res->temperature['unit']==='metric') {
@ -61,16 +67,17 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0)
return $r;
}
function curweather_install() {
register_hook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
register_hook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
register_hook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
function curweather_install()
{
Addon::registerHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Addon::registerHook('addon_settings', 'addon/curweather/curweather.php', 'curweather_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
}
function curweather_uninstall() {
unregister_hook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
unregister_hook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
unregister_hook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
Addon::unregisterHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Addon::unregisterHook('addon_settings', 'addon/curweather/curweather.php', 'curweather_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
}
function curweather_network_mod_init(&$fk_app,&$b) {
@ -107,28 +114,28 @@ function curweather_network_mod_init(&$fk_app,&$b) {
if ($ok) {
$t = get_markup_template("widget.tpl", "addon/curweather/" );
$curweather = replace_macros ($t, array(
'$title' => t("Current Weather"),
$curweather = replace_macros ($t, [
'$title' => L10n::t("Current Weather"),
'$icon' => proxy_url('http://openweathermap.org/img/w/'.$res['icon'].'.png'),
'$city' => $res['city'],
'$lon' => $res['lon'],
'$lat' => $res['lat'],
'$description' => $res['descripion'],
'$temp' => $res['temperature'],
'$relhumidity' => array('caption'=>t('Relative Humidity'), 'val'=>$res['humidity']),
'$pressure' => array('caption'=>t('Pressure'), 'val'=>$res['pressure']),
'$wind' => array('caption'=>t('Wind'), 'val'=> $res['wind']),
'$lastupdate' => t('Last Updated').': '.$res['update'].'UTC',
'$databy' => t('Data by'),
'$showonmap' => t('Show on map')
));
'$relhumidity' => ['caption'=>L10n::t('Relative Humidity'), 'val'=>$res['humidity']],
'$pressure' => ['caption'=>L10n::t('Pressure'), 'val'=>$res['pressure']],
'$wind' => ['caption'=>L10n::t('Wind'), 'val'=> $res['wind']],
'$lastupdate' => L10n::t('Last Updated').': '.$res['update'].'UTC',
'$databy' => L10n::t('Data by'),
'$showonmap' => L10n::t('Show on map')
]);
} else {
$t = get_markup_template('widget-error.tpl', 'addon/curweather/');
$curweather = replace_macros( $t, array(
'$problem' => t('There was a problem accessing the weather data. But have a look'),
$curweather = replace_macros( $t, [
'$problem' => L10n::t('There was a problem accessing the weather data. But have a look'),
'$rpt' => $rpt,
'$atOWM' => t('at OpenWeatherMap')
));
'$atOWM' => L10n::t('at OpenWeatherMap')
]);
}
$fk_app->page['aside'] = $curweather.$fk_app->page['aside'];
@ -136,29 +143,29 @@ function curweather_network_mod_init(&$fk_app,&$b) {
}
function curweather_plugin_settings_post($a,$post) {
function curweather_addon_settings_post($a,$post) {
if(! local_user() || (! x($_POST,'curweather-settings-submit')))
return;
set_pconfig(local_user(),'curweather','curweather_loc',trim($_POST['curweather_loc']));
set_pconfig(local_user(),'curweather','curweather_enable',intval($_POST['curweather_enable']));
set_pconfig(local_user(),'curweather','curweather_units',trim($_POST['curweather_units']));
info( t('Current Weather settings updated.') . EOL);
info(L10n::t('Current Weather settings updated.') . EOL);
}
function curweather_plugin_settings(&$a,&$s) {
function curweather_addon_settings(&$a,&$s) {
if(! local_user())
return;
/* Get the current state of our config variable */
$curweather_loc = get_pconfig(local_user(), 'curweather', 'curweather_loc');
$curweather_units = get_pconfig(local_user(), 'curweather', 'curweather_units');
$appid = get_config('curweather','appid');
if ($appid=="") {
$noappidtext = t('No APPID found, please contact your admin to obtain one.');
$curweather_loc = PConfig::get(local_user(), 'curweather', 'curweather_loc');
$curweather_units = PConfig::get(local_user(), 'curweather', 'curweather_units');
$appid = Config::get('curweather','appid');
if ($appid=="") {
$noappidtext = L10n::t('No APPID found, please contact your admin to obtain one.');
} else {
$noappidtext = '';
}
@ -167,38 +174,38 @@ function curweather_plugin_settings(&$a,&$s) {
// load template and replace the macros
$t = get_markup_template("settings.tpl", "addon/curweather/" );
$s = replace_macros ($t, array(
'$submit' => t('Save Settings'),
'$header' => t('Current Weather').' '.t('Settings'),
$s = replace_macros ($t, [
'$submit' => L10n::t('Save Settings'),
'$header' => L10n::t('Current Weather').' '.L10n::t('Settings'),
'$noappidtext' => $noappidtext,
'$info' => t('Enter either the name of your location or the zip code.'),
'$curweather_loc' => array( 'curweather_loc', t('Your Location'), $curweather_loc, t('Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or <em>14476,DE</em>.') ),
'$curweather_units' => array( 'curweather_units', t('Units'), $curweather_units, t('select if the temperature should be displayed in &deg;C or &deg;F'), array('metric'=>'°C', 'imperial'=>'°F')),
'$enabled' => array( 'curweather_enable', t('Show weather data'), $enable, '')
));
'$info' => L10n::t('Enter either the name of your location or the zip code.'),
'$curweather_loc' => [ 'curweather_loc', L10n::t('Your Location'), $curweather_loc, L10n::t('Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or <em>14476,DE</em>.') ],
'$curweather_units' => [ 'curweather_units', L10n::t('Units'), $curweather_units, L10n::t('select if the temperature should be displayed in &deg;C or &deg;F'), ['metric'=>'°C', 'imperial'=>'°F']],
'$enabled' => [ 'curweather_enable', L10n::t('Show weather data'), $enable, '']
]);
return;
}
// Config stuff for the admin panel to let the admin of the node set a APPID
// for accessing the API of openweathermap
function curweather_plugin_admin_post (&$a) {
function curweather_addon_admin_post (&$a) {
if(! is_site_admin())
return;
if ($_POST['curweather-submit']) {
set_config('curweather','appid',trim($_POST['appid']));
set_config('curweather','cachetime',trim($_POST['cachetime']));
info( t('Curweather settings saved.'.EOL));
Config::set('curweather','appid',trim($_POST['appid']));
Config::set('curweather','cachetime',trim($_POST['cachetime']));
info(L10n::t('Curweather settings saved.'.EOL));
}
}
function curweather_plugin_admin (&$a, &$o) {
function curweather_addon_admin (&$a, &$o) {
if(! is_site_admin())
return;
$appid = get_config('curweather','appid');
$cachetime = get_config('curweather','cachetime');
$t = get_markup_template("admin.tpl", "addon/curweather/" );
$o = replace_macros ($t, array(
'$submit' => t('Save Settings'),
'$cachetime' => array('cachetime', t('Caching Interval'), $cachetime, t('For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'), array('0'=>t('no cache'), '300'=>'5 '.t('minutes'), '900'=>'15 '.t('minutes'), '1800'=>'30 '.t('minutes'), '3600'=>'60 '.t('minutes'))),
'$appid' => array('appid', t('Your APPID'), $appid, t('Your API key provided by OpenWeatherMap'))
));
$o = replace_macros ($t, [
'$submit' => L10n::t('Save Settings'),
'$cachetime' => ['cachetime', L10n::t('Caching Interval'), $cachetime, L10n::t('For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'), ['0'=>L10n::t('no cache'), '300'=>'5 '.L10n::t('minutes'), '900'=>'15 '.L10n::t('minutes'), '1800'=>'30 '.L10n::t('minutes'), '3600'=>'60 '.L10n::t('minutes')]],
'$appid' => ['appid', L10n::t('Your APPID'), $appid, L10n::t('Your API key provided by OpenWeatherMap')]
]);
}

View File

@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-25 17:17+0200\n"
"PO-Revision-Date: 2016-11-22 06:43+0000\n"
"PO-Revision-Date: 2017-09-20 06:07+0000\n"
"Last-Translator: Tobias Diekershoff <tobias.diekershoff@gmx.net>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"

View File

@ -27,8 +27,8 @@ CalDAV device compatibility:
- aCal (http://andrew.mcmillan.net.nz/projects/aCal) works, available in F-Droid and Google Play
- CalDAV-Sync (http://dmfs.org/caldav/) works, non-free
Installation
After activating, serveral tables in the database have to be created. The admin-interface of the plugin will try to do this automatically.
## Installation
After activating, serveral tables in the database have to be created. The admin-interface of the addon will try to do this automatically.
In case of errors, the SQL-statement to create the tables manually are shown in the admin-interface.
@ -61,7 +61,7 @@ MIT License
Author of this plugin (the parts that are not part of the libraries above):
Author of this addon (the parts that are not part of the libraries above):
Tobias Hößl
http://friendica.hoessl.eu/profile/cato
http://www.hoessl.eu/

View File

@ -17,7 +17,7 @@
* Changed: The Sabre_VObject library now spawned into it's own project!
* New feature: Support for caldav notifications!
* Changed: Responsibility for dealing with the calendar-query is now
moved from the CalDAV plugin to the CalDAV backends. This allows for
moved from the CalDAV addon to the CalDAV backends. This allows for
heavy optimizations.
* Changed: The CalDAV PDO backend is now a lot faster for common
calendar queries.
@ -27,7 +27,7 @@
receiving "text/x-vcard; charset=utf-8" for a contenttype.
* Added: Sabre_DAV_Client now throws more specific exceptions in cases
where we already has an exception class.
* Added: Sabre_DAV_PartialUpdate. This plugin allows you to use the
* Added: Sabre_DAV_PartialUpdate. This addon allows you to use the
PATCH method to update parts of a file.
* Added: Tons of timezone name mappings for Microsoft Exchange.
* Added: Support for an 'exception' event.
@ -69,13 +69,13 @@
* Fixed: Issue 112: Stronger validation of iCalendar objects. Now making
sure every iCalendar object only contains 1 component, and disallowing
vcards, forcing every component to have a UID.
* Fixed: Basic validation for vcards in the CardDAV plugin.
* Fixed: Basic validation for vcards in the CardDAV addon.
* Fixed: Issue 213: Workaround for an Evolution bug, that prevented it
from updating events.
* Fixed: Issue 211: A time-limit query on a non-relative alarm trigger in
a recurring event could result in an endless loop.
* Fixed: All uri fields are now a maximum of 200 characters. The Bynari
outlook plugin used much longer strings so this should improve
outlook addon used much longer strings so this should improve
compatibility.
* Fixed: Added a workaround for a bug in KDE 4.8.2 contact syncing. See
https://bugs.kde.org/show_bug.cgi?id=300047
@ -109,7 +109,7 @@
COUNT= parameter in the RRULE property.
* Added: Support for time-range filters on VALARM components.
* Fixed: Correctly filtering all-day events.
* Fixed: Sending back correct mimetypes from the browser plugin (thanks
* Fixed: Sending back correct mimetypes from the browser addon (thanks
Jürgen).
* Fixed: Issue 195: Sabre_CardDAV pear package had an incorrect dependency.
* Fixed: Calendardata would be destroyed when performing a MOVE request.
@ -134,8 +134,8 @@
* BC Break: Default Principals PDO backend now needs a new field in the
'principals' table. See the website for details.
* Added: Ability to create new calendars and addressbooks from within the
browser plugin.
* Added: Browser plugin: icons for various nodes.
browser addon.
* Added: Browser addon: icons for various nodes.
* Added: Support for FREEBUSY reports!
* Added: Support for creating principals with admin-level privileges.
* Added: Possibility to let server send out invitation emails on behalf of
@ -143,11 +143,11 @@
* Changed: beforeCreateFile event now passes data argument by reference.
* Changed: The 'propertyMap' property from Sabre_VObject_Reader, must now
be specified in Sabre_VObject_Property::$classMap.
* Added: Ability for plugins to tell the ACL plugin which principal
plugins are searchable.
* Added: Ability for addons to tell the ACL addon which principal
addons are searchable.
* Added: [DAVACL] Per-node overriding of supported privileges. This allows
for custom privileges where needed.
* Added: [DAVACL] Public 'principalSearch' method on the DAVACL plugin,
* Added: [DAVACL] Public 'principalSearch' method on the DAVACL addon,
which allows for easy searching for principals, based on their
properties.
* Added: Sabre_VObject_Component::getComponents() to return a list of only
@ -231,8 +231,8 @@
* Fixed: VObject properties are now always encoded before components.
* Fixed: Sabre_DAVACL had issues with multiple levels of privilege
aggregration.
* Changed: Added 'GuessContentType' plugin to fileserver.php example.
* Fixed: The Browser plugin will now trigger the correct events when
* Changed: Added 'GuessContentType' addon to fileserver.php example.
* Fixed: The Browser addon will now trigger the correct events when
creating files.
* Fixed: The ICSExportPlugin now considers ACL's.
* Added: Made it optional to supply carddata from an Addressbook backend
@ -251,7 +251,7 @@
files to be locked at the same time.
1.5.4-stable (2011-10-28)
* Fixed: GuessContentType plugin now supports mixed case file extensions.
* Fixed: GuessContentType addon now supports mixed case file extensions.
* Fixed: DATE-TIME encoding was wrong in VObject. (we used 'DATETIME').
* Changed: Sending back HTTP 204 after a PUT request on an existing resource
instead of HTTP 200. This should fix Evolution CardDAV client
@ -283,7 +283,7 @@
* Fixed: Issue 140: Not returning 201 Created if an event cancelled the
creation of a file.
* Fixed: Issue 150: Faster URLUtil::encodePath() implementation.
* Fixed: Issue 144: Browser plugin could interfere with
* Fixed: Issue 144: Browser addon could interfere with
TemporaryFileFilterPlugin if it was loaded first.
* Added: It's not possible to specify more 'alternate uris' in principal
backends.
@ -314,7 +314,7 @@
* Added: Clark-notation parser to XML utility.
* Added: unset() support to VObject components.
* Fixed: Refactored CalDAV property fetching to be faster and simpler.
* Added: Central string-matcher for CalDAV and CardDAV plugins.
* Added: Central string-matcher for CalDAV and CardDAV addons.
* Added: i;unicode-casemap support
* Fixed: VObject bug: wouldn't parse parameters if they weren't specified
in uppercase.
@ -322,7 +322,7 @@
* Fixed: VObject bug: Parameters with no value are now correctly parsed.
* Changed: If calendars don't specify which components they allow, 'all'
components are assumed (e.g.: VEVENT, VTODO, VJOURNAL).
* Changed: Browser plugin now uses POST variable 'sabreAction' instead of
* Changed: Browser addon now uses POST variable 'sabreAction' instead of
'action' to reduce the chance of collisions.
1.4.4-stable (2011-07-07)
@ -388,7 +388,7 @@
* Added: Ability to automatically generate full .ics feeds off calendars.
To use: Add the Sabre_CalDAV_ICSExportPlugin, and add ?export to your
calendar url.
* Added: Plugins can now specify a pluginname, for easy access using
* Added: Plugins can now specify a addonname, for easy access using
Sabre_DAV_Server::getPlugin().
* Added: beforeGetProperties event.
* Added: updateProperties event.
@ -428,7 +428,7 @@
break, so if you implement Sabre_DAV_ICollection directly, add the method.
* Changed: Almost all HTTP method implementations now take a uri argument,
including events. This allows for internal rerouting of certain calls.
If you have custom plugins, make sure they use this argument. If they
If you have custom addons, make sure they use this argument. If they
don't, they will likely still work, but it might get in the way of
future changes.
* Changed: All getETag methods MUST now surround the etag with
@ -441,7 +441,7 @@
instead.
* Removed: Sabre_DAV_IDirectory interface, use Sabre_DAV_ICollection
instead.
* Added: Browser plugin now uses {DAV:}displayname if this property is
* Added: Browser addon now uses {DAV:}displayname if this property is
available.
* Added: Cache layer in the ObjectTree.
* Added: Tree classes now have a delete and getChildren method.
@ -488,7 +488,7 @@
* Updated: Small improvements to example files.
1.2.0 (2010-05-24)
* Fixed: Browser plugin now displays international characters.
* Fixed: Browser addon now displays international characters.
* Changed: More properties in CalDAV classes are now protected instead of
private.
@ -530,7 +530,7 @@
* Update: Complete rewrite of property updating. Now easier to use and
atomic.
* Fixed: Issue 16, automatically adding trailing / to baseUri.
* Added: text/plain is used for .txt files in GuessContentType plugin.
* Added: text/plain is used for .txt files in GuessContentType addon.
* Added: support for principal-property-search and
principal-search-property-set reports.
* Added: Issue 31: Hiding exception information by default. Can be turned
@ -603,10 +603,10 @@
this.
* Added: PDO authentication backend.
* Added: Example sql for auth, caldav, locks for sqlite.
* Added: Sabre_DAV_Browser_GuessContentType plugin
* Changed: Authentication plugin refactored, making it possible to
* Added: Sabre_DAV_Browser_GuessContentType addon
* Changed: Authentication addon refactored, making it possible to
implement non-digest authentication.
* Fixed: Better error display in browser plugin.
* Fixed: Better error display in browser addon.
* Added: Support for {DAV:}supported-report-set
* Added: XML utility class with helper functions for the WebDAV protocol.
* Added: Tons of unittests
@ -706,15 +706,15 @@
Before, execution would be stopped by anything loosely evaluating to
false.
* Changed: the getPropertiesForPath method now takes a different set of
arguments, and returns a different response. This allows plugin
arguments, and returns a different response. This allows addon
developers to return statuses for properties other than 200 and 404. The
hrefs are now also always calculated relative to the baseUri, and not
the uri of the request.
* Changed: generatePropFindResponse is renamed to generateMultiStatus, and
now takes a list of properties similar to the response of
getPropertiesForPath. This was also needed to improve flexibility for
plugin development.
* Changed: Auth plugins are no longer included. They were not yet stable
addon development.
* Changed: Auth addons are no longer included. They were not yet stable
quality, so they will probably be reintroduced in a later version.
* Changed: PROPPATCH also used generateMultiStatus now.
* Removed: unknownProperties event. This is replaced by the
@ -732,7 +732,7 @@
* Fixed: Copy and Move could fail in the root directory. This is now
fixed.
* Added: Plugins can now be retrieved by their classname. This is useful
for inter-plugin communication.
for inter-addon communication.
* Added: The Auth backend can now return usernames and user-id's.
* Added: The Auth backend got a getUsers method
* Added: Sabre_DAV_FSExt_Directory now returns quota info
@ -741,7 +741,7 @@
* Fixed: UNLOCK bug. Unlock didn't work at all
0.12-beta (2009-09-10)
* Updated: Browser plugin now shows multiple {DAV:}resourcetype values
* Updated: Browser addon now shows multiple {DAV:}resourcetype values
if available.
* Added: Experimental PDO backend for Locks Manager
* Fixed: Sending Content-Length: 0 for every empty response. This
@ -766,7 +766,7 @@
* Added: Ability to choose to use auth-int, auth or both for HTTP Digest
authentication. (Issue 11)
* Changed: Made more methods in Sabre_DAV_Server public.
* Fixed: TemporaryFileFilter plugin now intercepts HTTP LOCK requests
* Fixed: TemporaryFileFilter addon now intercepts HTTP LOCK requests
to non-existent files. (Issue 12)
* Added: Central list of defined xml namespace prefixes. This can reduce
Bandwidth and legibility for xml bodies with user-defined namespaces.
@ -779,8 +779,8 @@
and IDirectory objects. If you created your own Tree objects,
this will most likely break in this release.
* Changed: Moved all the Locking logic from the Tree and Server classes
into a separate plugin.
* Changed: TemporaryFileFilter is now a plugin.
into a separate addon.
* Changed: TemporaryFileFilter is now a addon.
* Added: Comes with an autoloader script. This can be used instead of
the includer script, and is preferred by some people.
* Added: AWS Authentication class.
@ -790,7 +790,7 @@
priority. This is for example needed to ensure that the Authentication
Plugin is used before any other Plugin.
* Added: 22 new tests.
* Added: Users-manager plugin for .htdigest files. Experimental and
* Added: Users-manager addon for .htdigest files. Experimental and
subject to change.
* Added: RFC 2324 HTTP 418 status code
* Fixed: Exclusive locks could in some cases be picked up as shared locks
@ -801,7 +801,7 @@
* Changed: Renamed all exceptions! This is a compatibility break. Every
Exception now follows Sabre_DAV_Exception_FileNotFound convention
instead of Sabre_DAV_FileNotFoundException.
* Added: Browser plugin now allows uploading and creating directories
* Added: Browser addon now allows uploading and creating directories
straight from the browser.
* Added: 12 more unittests
* Fixed: Locking bug, which became prevalent on Windows Vista.
@ -815,14 +815,14 @@
* Added: support for {DAV:}supportedlock.
* Added: support for {DAV:}lockdiscovery.
* Added: 6 new tests.
* Added: New plugin system.
* Added: Simple HTML directory plugin, for browser access.
* Added: New addon system.
* Added: Simple HTML directory addon, for browser access.
* Added: Server class now sends back standard pre-condition error xml
bodies. This was new since RFC4918.
* Added: Sabre_DAV_Tree_Aggregrate, which can 'host' multiple Tree objects
into one.
* Added: simple basis for HTTP REPORT method. This method is not used yet,
but can be used by plugins to add reports.
but can be used by addons to add reports.
* Changed: ->getSize is only called for files, no longer for collections.
r303
* Changed: Sabre_DAV_FilterTree is now Sabre_DAV_Tree_Filter

View File

@ -5,7 +5,7 @@ use Sabre\VObject;
/**
* ICS Exporter
*
* This plugin adds the ability to export entire calendars as .ics files.
* This addon adds the ability to export entire calendars as .ics files.
* This is useful for clients that don't support CalDAV yet. They often do
* support ics files.
*
@ -25,7 +25,7 @@ class Sabre_CalDAV_ICSExportPlugin extends Sabre_DAV_ServerPlugin {
private $server;
/**
* Initializes the plugin and registers event handlers
* Initializes the addon and registers event handlers
*
* @param Sabre_DAV_Server $server
* @return void

View File

@ -4,7 +4,7 @@
* This node represents a list of notifications.
*
* It provides no additional functionality, but you must implement this
* interface to allow the Notifications plugin to mark the collection
* interface to allow the Notifications addon to mark the collection
* as a notifications collection.
*
* This collection should only return Sabre_CalDAV_Notifications_INode nodes as

View File

@ -4,7 +4,7 @@
* This node represents a list of notifications.
*
* It provides no additional functionality, but you must implement this
* interface to allow the Notifications plugin to mark the collection
* interface to allow the Notifications addon to mark the collection
* as a notifications collection.
*
* This collection should only return Sabre_CalDAV_Notifications_INode nodes as

View File

@ -3,9 +3,9 @@
use Sabre\VObject;
/**
* CalDAV plugin
* CalDAV addon
*
* This plugin provides functionality added by CalDAV (RFC 4791)
* This addon provides functionality added by CalDAV (RFC 4791)
* It implements new reports, and the MKCALENDAR method.
*
* @package Sabre
@ -67,7 +67,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Use this method to tell the server this plugin defines additional
* Use this method to tell the server this addon defines additional
* HTTP methods.
*
* This method is passed a uri. It should only return HTTP methods that are
@ -107,9 +107,9 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns a plugin name.
* Returns a addon name.
*
* Using this name other plugins will be able to access other plugins
* Using this name other addons will be able to access other addons
* using Sabre_DAV_Server::getPlugin
*
* @return string
@ -121,7 +121,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns a list of reports this plugin supports.
* Returns a list of reports this addon supports.
*
* This will be used in the {DAV:}supported-report-set property.
* Note that you still need to subscribe to the 'report' event to actually
@ -147,7 +147,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Initializes the plugin
* Initializes the addon
*
* @param Sabre_DAV_Server $server
* @return void
@ -631,7 +631,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
$acl = $this->server->getPlugin('acl');
if (!$acl) {
throw new Sabre_DAV_Exception('The ACL plugin must be loaded for free-busy queries to work');
throw new Sabre_DAV_Exception('The ACL addon must be loaded for free-busy queries to work');
}
$uri = $this->server->getRequestUri();
$acl->checkPrivileges($uri,'{' . self::NS_CALDAV . '}read-free-busy');
@ -665,7 +665,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
/**
* This method is triggered before a file gets updated with new content.
*
* This plugin uses this method to ensure that CalDAV objects receive
* This addon uses this method to ensure that CalDAV objects receive
* valid calendar data.
*
* @param string $path
@ -685,7 +685,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
/**
* This method is triggered before a new file is created.
*
* This plugin uses this method to ensure that newly created calendar
* This addon uses this method to ensure that newly created calendar
* objects contain valid calendar data.
*
* @param string $path
@ -1014,7 +1014,7 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin {
/**
* This method allows us to intercept the 'mkcalendar' sabreAction. This
* action enables the user to create new calendars from the browser plugin.
* action enables the user to create new calendars from the browser addon.
*
* @param string $uri
* @param string $action

View File

@ -5,7 +5,7 @@
*
* The outbox is mainly used as an endpoint in the tree for a client to do
* free-busy requests. This functionality is completely handled by the
* Scheduling plugin, so this object is actually mostly static.
* Scheduling addon, so this object is actually mostly static.
*
* @package Sabre
* @subpackage CalDAV

View File

@ -3,9 +3,9 @@
use Sabre\VObject;
/**
* CardDAV plugin
* CardDAV addon
*
* The CardDAV plugin adds CardDAV functionality to the WebDAV server
* The CardDAV addon adds CardDAV functionality to the WebDAV server
*
* @package Sabre
* @subpackage CardDAV
@ -41,7 +41,7 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
protected $server;
/**
* Initializes the plugin
* Initializes the addon
*
* @param Sabre_DAV_Server $server
* @return void
@ -91,7 +91,7 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns a list of reports this plugin supports.
* Returns a list of reports this addon supports.
*
* This will be used in the {DAV:}supported-report-set property.
* Note that you still need to subscribe to the 'report' event to actually
@ -290,7 +290,7 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
/**
* This method is triggered before a file gets updated with new content.
*
* This plugin uses this method to ensure that Card nodes receive valid
* This addon uses this method to ensure that Card nodes receive valid
* vcard data.
*
* @param string $path
@ -310,7 +310,7 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
/**
* This method is triggered before a new file is created.
*
* This plugin uses this method to ensure that Card nodes receive valid
* This addon uses this method to ensure that Card nodes receive valid
* vcard data.
*
* @param string $path
@ -671,7 +671,7 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
/**
* This method allows us to intercept the 'mkcalendar' sabreAction. This
* action enables the user to create new calendars from the browser plugin.
* action enables the user to create new calendars from the browser addon.
*
* @param string $uri
* @param string $action

View File

@ -1,7 +1,7 @@
<?php
/**
* This plugin provides Authentication for a WebDAV server.
* This addon provides Authentication for a WebDAV server.
*
* It relies on a Backend object, which provides user information.
*
@ -52,7 +52,7 @@ class Sabre_DAV_Auth_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Initializes the plugin. This function is automatically called by the server
* Initializes the addon. This function is automatically called by the server
*
* @param Sabre_DAV_Server $server
* @return void
@ -65,9 +65,9 @@ class Sabre_DAV_Auth_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns a plugin name.
* Returns a addon name.
*
* Using this name other plugins will be able to access other plugins
* Using this name other addons will be able to access other addons
* using Sabre_DAV_Server::getPlugin
*
* @return string

View File

@ -1,7 +1,7 @@
<?php
/**
* GuessContentType plugin
* GuessContentType addon
*
* A lot of the built-in File objects just return application/octet-stream
* as a content-type by default. This is a problem for some clients, because
@ -43,7 +43,7 @@ class Sabre_DAV_Browser_GuessContentType extends Sabre_DAV_ServerPlugin {
);
/**
* Initializes the plugin
* Initializes the addon
*
* @param Sabre_DAV_Server $server
* @return void

View File

@ -1,7 +1,7 @@
<?php
/**
* This is a simple plugin that will map any GET request for non-files to
* This is a simple addon that will map any GET request for non-files to
* PROPFIND allprops-requests.
*
* This should allow easy debugging of PROPFIND
@ -22,7 +22,7 @@ class Sabre_DAV_Browser_MapGetToPropFind extends Sabre_DAV_ServerPlugin {
protected $server;
/**
* Initializes the plugin and subscribes to events
* Initializes the addon and subscribes to events
*
* @param Sabre_DAV_Server $server
* @return void

View File

@ -3,7 +3,7 @@
/**
* Browser Plugin
*
* This plugin provides a html representation, so that a WebDAV server may be accessed
* This addon provides a html representation, so that a WebDAV server may be accessed
* using a browser.
*
* The class intercepts GET requests to collection resources and generates a simple
@ -60,7 +60,7 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
protected $enablePost = true;
/**
* By default the browser plugin will generate a favicon and other images.
* By default the browser addon will generate a favicon and other images.
* To turn this off, set this property to false.
*
* @var bool
@ -84,7 +84,7 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Initializes the plugin and subscribes to events
* Initializes the addon and subscribes to events
*
* @param Sabre_DAV_Server $server
* @return void
@ -122,7 +122,7 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
$node = $this->server->tree->getNodeForPath($uri);
} catch (Sabre_DAV_Exception_NotFound $e) {
// We're simply stopping when the file isn't found to not interfere
// with other plugins.
// with other addons.
return;
}
if ($node instanceof Sabre_DAV_IFile)

View File

@ -1,9 +1,9 @@
<?php
/**
* Locking plugin
* Locking addon
*
* This plugin provides locking support to a WebDAV server.
* This addon provides locking support to a WebDAV server.
* The easiest way to get started, is by hooking it up as such:
*
* $lockBackend = new Sabre_DAV_Locks_Backend_File('./mylockdb');
@ -44,7 +44,7 @@ class Sabre_DAV_Locks_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Initializes the plugin
* Initializes the addon
*
* This method is automatically called by the Server class after addPlugin.
*
@ -61,9 +61,9 @@ class Sabre_DAV_Locks_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns a plugin name.
* Returns a addon name.
*
* Using this name other plugins will be able to access other plugins
* Using this name other addons will be able to access other addons
* using Sabre_DAV_Server::getPlugin
*
* @return string
@ -78,7 +78,7 @@ class Sabre_DAV_Locks_Plugin extends Sabre_DAV_ServerPlugin {
* This method is called by the Server if the user used an HTTP method
* the server didn't recognize.
*
* This plugin intercepts the LOCK and UNLOCK methods.
* This addon intercepts the LOCK and UNLOCK methods.
*
* @param string $method
* @param string $uri
@ -134,7 +134,7 @@ class Sabre_DAV_Locks_Plugin extends Sabre_DAV_ServerPlugin {
* This method is called before the logic for any HTTP method is
* handled.
*
* This plugin uses that feature to intercept access to locked resources.
* This addon uses that feature to intercept access to locked resources.
*
* @param string $method
* @param string $uri
@ -179,7 +179,7 @@ class Sabre_DAV_Locks_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Use this method to tell the server this plugin defines additional
* Use this method to tell the server this addon defines additional
* HTTP methods.
*
* This method is passed a uri. It should only return HTTP methods that are

View File

@ -1,7 +1,7 @@
<?php
/**
* This plugin provides support for RFC4709: Mounting WebDAV servers
* This addon provides support for RFC4709: Mounting WebDAV servers
*
* Simply append ?mount to any collection to generate the davmount response.
*
@ -20,7 +20,7 @@ class Sabre_DAV_Mount_Plugin extends Sabre_DAV_ServerPlugin {
private $server;
/**
* Initializes the plugin and registers event handles
* Initializes the addon and registers event handles
*
* @param Sabre_DAV_Server $server
* @return void

View File

@ -1,8 +1,8 @@
<?php
/**
* Partial update plugin (Patch method)
* Partial update addon (Patch method)
*
* This plugin provides a way to modify only part of a target resource
* This addon provides a way to modify only part of a target resource
* It may bu used to update a file chunk, upload big a file into smaller
* chunks or resume an upload.
*
@ -25,7 +25,7 @@ class Sabre_DAV_PartialUpdate_Plugin extends Sabre_DAV_ServerPlugin {
protected $server;
/**
* Initializes the plugin
* Initializes the addon
*
* This method is automatically called by the Server class after addPlugin.
*
@ -40,9 +40,9 @@ class Sabre_DAV_PartialUpdate_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns a plugin name.
* Returns a addon name.
*
* Using this name other plugins will be able to access other plugins
* Using this name other addons will be able to access other addons
* using Sabre_DAV_Server::getPlugin
*
* @return string
@ -57,7 +57,7 @@ class Sabre_DAV_PartialUpdate_Plugin extends Sabre_DAV_ServerPlugin {
* This method is called by the Server if the user used an HTTP method
* the server didn't recognize.
*
* This plugin intercepts the PATCH methods.
* This addon intercepts the PATCH methods.
*
* @param string $method
* @param string $uri
@ -75,7 +75,7 @@ class Sabre_DAV_PartialUpdate_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Use this method to tell the server this plugin defines additional
* Use this method to tell the server this addon defines additional
* HTTP methods.
*
* This method is passed a uri. It should only return HTTP methods that are

View File

@ -60,7 +60,7 @@ class Sabre_DAV_Server {
public $httpRequest;
/**
* The list of plugins
* The list of addons
*
* @var array
*/
@ -324,7 +324,7 @@ class Sabre_DAV_Server {
}
/**
* Adds a plugin to the server
* Adds a addon to the server
*
* For more information, console the documentation of Sabre_DAV_ServerPlugin
*
@ -339,9 +339,9 @@ class Sabre_DAV_Server {
}
/**
* Returns an initialized plugin by it's name.
* Returns an initialized addon by it's name.
*
* This function returns null if the plugin was not found.
* This function returns null if the addon was not found.
*
* @param string $name
* @return Sabre_DAV_ServerPlugin
@ -361,7 +361,7 @@ class Sabre_DAV_Server {
}
/**
* Returns all plugins
* Returns all addons
*
* @return array
*/
@ -379,7 +379,7 @@ class Sabre_DAV_Server {
* It is possible to control the order of the callbacks through the
* priority argument.
*
* This is for example used to make sure that the authentication plugin
* This is for example used to make sure that the authentication addon
* is triggered before anything else. If it's not needed to change this
* number, it is recommended to ommit.
*
@ -1050,7 +1050,7 @@ class Sabre_DAV_Server {
$methods[] = 'MKCOL';
}
// We're also checking if any of the plugins register any new methods
// We're also checking if any of the addons register any new methods
foreach($this->plugins as $plugin) $methods = array_merge($methods, $plugin->getHTTPMethods($uri));
array_unique($methods);
@ -1464,7 +1464,7 @@ class Sabre_DAV_Server {
*
* Currently this is done by HTTP PUT and HTTP LOCK (in the Locks_Plugin).
* It was important to get this done through a centralized function,
* allowing plugins to intercept this using the beforeCreateFile event.
* allowing addons to intercept this using the beforeCreateFile event.
*
* This method will return true if the file was actually created
*
@ -1654,7 +1654,7 @@ class Sabre_DAV_Server {
}
if (!$hasError) {
// Allowing plugins to take care of property updating
// Allowing addons to take care of property updating
$hasError = !$this->broadcastEvent('updateProperties',array(
&$remainingProperties,
&$result,

View File

@ -1,7 +1,7 @@
<?php
/**
* The baseclass for all server plugins.
* The baseclass for all server addons.
*
* Plugins can modify or extend the servers behaviour.
*
@ -14,7 +14,7 @@
abstract class Sabre_DAV_ServerPlugin {
/**
* This initializes the plugin.
* This initializes the addon.
*
* This function is called by Sabre_DAV_Server, after
* addPlugin is called.
@ -41,7 +41,7 @@ abstract class Sabre_DAV_ServerPlugin {
}
/**
* Use this method to tell the server this plugin defines additional
* Use this method to tell the server this addon defines additional
* HTTP methods.
*
* This method is passed a uri. It should only return HTTP methods that are
@ -57,9 +57,9 @@ abstract class Sabre_DAV_ServerPlugin {
}
/**
* Returns a plugin name.
* Returns a addon name.
*
* Using this name other plugins will be able to access other plugins
* Using this name other addons will be able to access other addons
* using Sabre_DAV_Server::getPlugin
*
* @return string
@ -71,7 +71,7 @@ abstract class Sabre_DAV_ServerPlugin {
}
/**
* Returns a list of reports this plugin supports.
* Returns a list of reports this addon supports.
*
* This will be used in the {DAV:}supported-report-set property.
* Note that you still need to subscribe to the 'report' event to actually

View File

@ -45,7 +45,7 @@ class Sabre_DAV_TemporaryFileFilterPlugin extends Sabre_DAV_ServerPlugin {
);
/**
* This is the directory where this plugin
* This is the directory where this addon
* will store it's files.
*
* @var string
@ -60,7 +60,7 @@ class Sabre_DAV_TemporaryFileFilterPlugin extends Sabre_DAV_ServerPlugin {
private $server;
/**
* Creates the plugin.
* Creates the addon.
*
* Make sure you specify a directory for your files. If you don't, we
* will use PHP's directory for session-storage instead, and you might
@ -77,9 +77,9 @@ class Sabre_DAV_TemporaryFileFilterPlugin extends Sabre_DAV_ServerPlugin {
}
/**
* Initialize the plugin
* Initialize the addon
*
* This is called automatically be the Server class after this plugin is
* This is called automatically be the Server class after this addon is
* added with Sabre_DAV_Server::addPlugin()
*
* @param Sabre_DAV_Server $server

View File

@ -3,7 +3,7 @@
/**
* SabreDAV ACL Plugin
*
* This plugin provides functionality to enforce ACL permissions.
* This addon provides functionality to enforce ACL permissions.
* ACL is defined in RFC3744.
*
* In addition it also provides support for the {DAV:}current-user-principal
@ -81,7 +81,7 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
/**
* This string is prepended to the username of the currently logged in
* user. This allows the plugin to determine the principal path based on
* user. This allows the addon to determine the principal path based on
* the username.
*
* @var string
@ -111,7 +111,7 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
public $adminPrincipals = array();
/**
* Returns a list of features added by this plugin.
* Returns a list of features added by this addon.
*
* This list is used in the response of a HTTP OPTIONS request.
*
@ -136,9 +136,9 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns a plugin name.
* Returns a addon name.
*
* Using this name other plugins will be able to access other plugins
* Using this name other addons will be able to access other addons
* using Sabre_DAV_Server::getPlugin
*
* @return string
@ -150,7 +150,7 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns a list of reports this plugin supports.
* Returns a list of reports this addon supports.
*
* This will be used in the {DAV:}supported-report-set property.
* Note that you still need to subscribe to the 'report' event to actually
@ -283,7 +283,7 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Returns the supported privilege structure for this ACL plugin.
* Returns the supported privilege structure for this ACL addon.
*
* See RFC3744 for more details. Currently we default on a simple,
* standard structure.
@ -608,7 +608,7 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
}
/**
* Sets up the plugin
* Sets up the addon
*
* This method is automatically called by the server class.
*
@ -1067,7 +1067,7 @@ class Sabre_DAVACL_Plugin extends Sabre_DAV_ServerPlugin {
* there.
*
* Other rfc's, such as ACL rely on this report, so it made sense to put
* it in this plugin.
* it in this addon.
*
* @param DOMElement $dom
* @return void

View File

@ -53,7 +53,7 @@ class Sabre_DAVACL_PrincipalBackend_PDO implements Sabre_DAVACL_IPrincipalBacken
),
/**
* This property is actually used by the CardDAV plugin, where it gets
* This property is actually used by the CardDAV addon, where it gets
* mapped to {http://calendarserver.orgi/ns/}me-card.
*
* The reason we don't straight-up use that property, is because

View File

@ -9,7 +9,7 @@ For more details check the introductory blog post - http://laktek.com/2008/10/27
You can either clone [this repo](https://github.com/laktek/really-simple-color-picker) or download the latest build as a zip from here - http://github.com/laktek/really-simple-color-picker/zipball/master
Color Picker requires jQuery 1.2.6 or higher. Make sure to load it before Color Picker (there's no other dependencies!).
For default styles of the color picker load the CSS file that comes with the plugin.
For default styles of the color picker load the CSS file that comes with the addon.
```html
<script language="javascript" type="text/javascript" src=jquery.min.js"></script>

View File

@ -1,5 +1,6 @@
<?php
use Friendica\Util\DateTimeFormat;
define("DAV_ACL_READ", "{DAV:}read");
define("DAV_ACL_WRITE", "{DAV:}write");
@ -150,7 +151,7 @@ function vcard_source_compile($vcardsource)
*/
function wdcal_php2MySqlTime($phpDate)
{
return date("Y-m-d H:i:s", $phpDate);
return date(DateTimeFormat::MYSQL, $phpDate);
}
/**
@ -159,7 +160,7 @@ function wdcal_php2MySqlTime($phpDate)
*/
function wdcal_mySql2PhpTime($sqlDate)
{
$ts = DateTime::createFromFormat("Y-m-d H:i:s", $sqlDate);
$ts = DateTime::createFromFormat(DateTimeFormat::MYSQL, $sqlDate);
return $ts->format("U");
}

View File

@ -1,5 +1,6 @@
<?php
use Friendica\Util\DateTimeFormat;
/**
@ -109,15 +110,15 @@ function renderCalDavEntry_data(&$calendar, &$calendarobject)
q("INSERT INTO %s%sjqcalendar (`calendar_id`, `calendarobject_id`, `Summary`, `StartTime`, `EndTime`, `IsEditable`, `IsAllDayEvent`, `IsRecurring`, `Color`) VALUES
(%d, %d, '%s', CONVERT_TZ('%s', '$timezoneOffset', @@session.time_zone), CONVERT_TZ('%s', '$timezoneOffset', @@session.time_zone), %d, %d, %d, '%s')",
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($calendar["id"]), IntVal($calendarobject["id"]), dbesc($event["summary"]), date("Y-m-d H:i:s", $start),
date("Y-m-d H:i:s", $last_end), 1, $allday, $recurring, dbesc(substr($event["color"], 1))
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($calendar["id"]), IntVal($calendarobject["id"]), dbesc($event["summary"]), date(DateTimeFormat::MYSQL, $start),
date(DateTimeFormat::MYSQL, $last_end), 1, $allday, $recurring, dbesc(substr($event["color"], 1))
);
foreach ($alarms as $alarm) {
$alarm = renderCalDavEntry_calcalarm($alarm, $component);
$notified = ($alarm->getTimestamp() < time() ? 1 : 0);
q("INSERT INTO %s%snotifications (`calendar_id`, `calendarobject_id`, `alert_date`, `notified`) VALUES (%d, %d, CONVERT_TZ('%s', '$timezoneOffset', @@session.time_zone), %d)",
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($calendar["id"]), IntVal($calendarobject["id"]), $alarm->format("Y-m-d H:i:s"), $notified
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($calendar["id"]), IntVal($calendarobject["id"]), $alarm->format(DateTimeFormat::MYSQL), $notified
);
}

View File

@ -1,5 +1,7 @@
<?php
use Friendica\Core\L10n;
class Sabre_CalDAV_Backend_Private extends Sabre_CalDAV_Backend_Common
{
@ -36,7 +38,7 @@ class Sabre_CalDAV_Backend_Private extends Sabre_CalDAV_Backend_Common
*/
public static function getBackendTypeName()
{
return t("Private Events");
return L10n::t("Private Events");
}
/**

View File

@ -1,5 +1,7 @@
<?php
use Friendica\Core\L10n;
class Sabre_CardDAV_Backend_Std extends Sabre_CardDAV_Backend_Common
{
@ -43,7 +45,7 @@ class Sabre_CardDAV_Backend_Std extends Sabre_CardDAV_Backend_Common
*/
public static function getBackendTypeName()
{
return t("Private Addressbooks");
return L10n::t("Private Addressbooks");
}
/**

View File

@ -141,7 +141,7 @@
if ($.fn.noSelect == undefined) {
$.fn.noSelect = function (p) { //no select plugin by me :-)
$.fn.noSelect = function (p) { //no select addon by me :-)
var prevent;
if (p == null)
prevent = true;

View File

@ -1,7 +1,7 @@
<?php
use Friendica\Core\L10n;
use Friendica\Util\DateTimeFormat;
/**
* @param mixed $obj
@ -89,7 +89,7 @@ function wdcal_print_feed($base_path = "")
$cs = wdcal_print_feed_getCal($server, DAV_ACL_WRITE);
if ($cs == null) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
'Msg' => t('No access')));
'Msg' => L10n::t('No access')));
killme();
}
try {
@ -101,9 +101,9 @@ function wdcal_print_feed($base_path = "")
else $type = Sabre\VObject\Property\DateTime::LOCALTZ;
$datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
$datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarStartTime"]))), $type);
$datetime_start->setDateTime(new DateTime(date(DateTimeFormat::MYSQL, IntVal($_REQUEST["CalendarStartTime"]))), $type);
$datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
$datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarEndTime"]))), $type);
$datetime_end->setDateTime(new DateTime(date(DateTimeFormat::MYSQL, IntVal($_REQUEST["CalendarEndTime"]))), $type);
$component->add($datetime_start);
$component->add($datetime_end);
@ -163,7 +163,7 @@ function wdcal_print_feed($base_path = "")
$r = q("SELECT `calendarobject_id`, `calendar_id` FROM %s%sjqcalendar WHERE `id`=%d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($_REQUEST["jq_id"]));
if (count($r) != 1) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
'Msg' => t('No access')));
'Msg' => L10n::t('No access')));
killme();
}
try {
@ -175,7 +175,7 @@ function wdcal_print_feed($base_path = "")
if (!$component) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
'Msg' => t('No access')));
'Msg' => L10n::t('No access')));
killme();
}
@ -183,9 +183,9 @@ function wdcal_print_feed($base_path = "")
else $type = Sabre\VObject\Property\DateTime::LOCALTZ;
$datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
$datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarStartTime"]))), $type);
$datetime_start->setDateTime(new DateTime(date(DateTimeFormat::MYSQL, IntVal($_REQUEST["CalendarStartTime"]))), $type);
$datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
$datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarEndTime"]))), $type);
$datetime_end->setDateTime(new DateTime(date(DateTimeFormat::MYSQL, IntVal($_REQUEST["CalendarEndTime"]))), $type);
$component->__unset("DTSTART");
$component->__unset("DTEND");
@ -203,7 +203,7 @@ function wdcal_print_feed($base_path = "")
);
} catch (Exception $e) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
'Msg' => t('No access')));
'Msg' => L10n::t('No access')));
killme();
}
break;
@ -211,7 +211,7 @@ function wdcal_print_feed($base_path = "")
$r = q("SELECT `calendarobject_id`, `calendar_id` FROM %s%sjqcalendar WHERE `id`=%d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($_REQUEST["jq_id"]));
if (count($r) != 1) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
'Msg' => t('No access')));
'Msg' => L10n::t('No access')));
killme();
}
try {
@ -226,7 +226,7 @@ function wdcal_print_feed($base_path = "")
);
} catch (Exception $e) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
'Msg' => t('No access')));
'Msg' => L10n::t('No access')));
killme();
}

View File

@ -1,5 +1,8 @@
<?php
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
abstract class wdcal_local
{
@ -145,7 +148,7 @@ class wdcal_local_us extends wdcal_local {
* @return string
*/
static function getName() {
return t("U.S. Time Format (mm/dd/YYYY)");
return L10n::t("U.S. Time Format (mm/dd/YYYY)");
}
/**
@ -240,7 +243,7 @@ class wdcal_local_de extends wdcal_local {
* @return string
*/
static function getName() {
return t("German Time Format (dd.mm.YYYY)");
return L10n::t("German Time Format (dd.mm.YYYY)");
}
/**

View File

@ -1,5 +1,8 @@
<?php
use Friendica\Core\L10n;
use Friendica\Util\DateTimeFormat;
/**
* @param wdcal_local $localization
* @param string $baseurl
@ -27,7 +30,7 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
$vObject = dav_get_current_user_calendarobject($server, $calendar, $obj_uri["uri"], DAV_ACL_WRITE);
$component = dav_get_eventComponent($vObject);
if ($component == null) return t('Could not open component for editing');
if ($component == null) return L10n::t('Could not open component for editing');
/** @var Sabre\VObject\Property\DateTime $dtstart */
$dtstart = $component->__get("DTSTART");
@ -137,13 +140,13 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
$postto = $baseurl . "/dav/wdcal/" . ($uri == 0 ? "new/" : $calendar_id . "/" . $uri . "/edit/");
$out = "<a href='" . $baseurl . "/dav/wdcal/'>" . t("Go back to the calendar") . "</a><br><br>";
$out = "<a href='" . $baseurl . "/dav/wdcal/'>" . L10n::t("Go back to the calendar") . "</a><br><br>";
$out .= "<form method='POST' action='$postto'>
<input type='hidden' name='form_security_token' value='" . get_form_security_token('caledit') . "'>\n";
$out .= "<h2>" . t("Event data") . "</h2>";
$out .= "<h2>" . L10n::t("Event data") . "</h2>";
$out .= "<label for='calendar' class='block'>" . t("Calendar") . ":</label><select id='calendar' name='calendar' size='1'>";
$out .= "<label for='calendar' class='block'>" . L10n::t("Calendar") . ":</label><select id='calendar' name='calendar' size='1'>";
$found = false;
$cal_col = "aaaaaa";
foreach ($calendars as $cal) {
@ -160,47 +163,47 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
$out .= "</select>";
$out .= "&nbsp; &nbsp; <label class='plain'><input type='checkbox' name='color_override' id='color_override' ";
if (!is_null($event["Color"])) $out .= "checked";
$out .= "> " . t("Special color") . ":</label>";
$out .= "> " . L10n::t("Special color") . ":</label>";
$out .= "<span id='cal_color_holder' ";
if (is_null($event["Color"])) $out .= "style='display: none;'";
$out .= "><input name='color' id='cal_color' value='" . (is_null($event["Color"]) ? "#" . $cal_col : escape_tags($event["Color"])) . "'></span>";
$out .= "<br>\n";
$out .= "<label class='block' for='cal_summary'>" . t("Subject") . ":</label>
$out .= "<label class='block' for='cal_summary'>" . L10n::t("Subject") . ":</label>
<input name='summary' id='cal_summary' value=\"" . escape_tags($event["Summary"]) . "\"><br>\n";
$out .= "<label class='block' for='cal_allday'>Is All-Day event:</label><input type='checkbox' name='allday' id='cal_allday' " . ($event["IsAllDayEvent"] ? "checked" : "") . "><br>\n";
$out .= "<label class='block' for='cal_start_date'>" . t("Starts") . ":</label>";
$out .= "<label class='block' for='cal_start_date'>" . L10n::t("Starts") . ":</label>";
$out .= "<input name='start_date' value='" . $localization->dateformat_datepicker_php($event["StartTime"]) . "' id='cal_start_date'>";
$out .= "<input name='start_time' value='" . date("H:i", $event["StartTime"]) . "' id='cal_start_time'>";
$out .= "<br>\n";
$out .= "<label class='block' for='cal_end_date'>" . t("Ends") . ":</label>";
$out .= "<label class='block' for='cal_end_date'>" . L10n::t("Ends") . ":</label>";
$out .= "<input name='end_date' value='" . $localization->dateformat_datepicker_php($event["EndTime"]) . "' id='cal_end_date'>";
$out .= "<input name='end_time' value='" . date("H:i", $event["EndTime"]) . "' id='cal_end_time'>";
$out .= "<br>\n";
$out .= "<label class='block' for='cal_location'>" . t("Location") . ":</label><input name='location' id='cal_location' value=\"" . escape_tags($event["Location"]) . "\"><br>\n";
$out .= "<label class='block' for='cal_location'>" . L10n::t("Location") . ":</label><input name='location' id='cal_location' value=\"" . escape_tags($event["Location"]) . "\"><br>\n";
$out .= "<label class='block' for='event-desc-textarea'>" . t("Description") . ":</label> <textarea id='event-desc-textarea' name='wdcal_desc' style='vertical-align: top; width: 400px; height: 100px;'>" . escape_tags($event["Description"]) . "</textarea>";
$out .= "<label class='block' for='event-desc-textarea'>" . L10n::t("Description") . ":</label> <textarea id='event-desc-textarea' name='wdcal_desc' style='vertical-align: top; width: 400px; height: 100px;'>" . escape_tags($event["Description"]) . "</textarea>";
$out .= "<br style='clear: both;'>";
$out .= "<h2>" . t("Recurrence") . "</h2>";
$out .= "<h2>" . L10n::t("Recurrence") . "</h2>";
$out .= "<label class='block' for='rec_frequency'>" . t("Frequency") . ":</label> <select id='rec_frequency' name='rec_frequency' size='1'>";
$out .= "<option value=''>" . t("None") . "</option>\n";
$out .= "<label class='block' for='rec_frequency'>" . L10n::t("Frequency") . ":</label> <select id='rec_frequency' name='rec_frequency' size='1'>";
$out .= "<option value=''>" . L10n::t("None") . "</option>\n";
$out .= "<option value='daily' ";
if ($recurrence && $recurrence->frequency == "daily") $out .= "selected";
$out .= ">" . t("Daily") . "</option>\n";
$out .= ">" . L10n::t("Daily") . "</option>\n";
$out .= "<option value='weekly' ";
if ($recurrence && $recurrence->frequency == "weekly") $out .= "selected";
$out .= ">" . t("Weekly") . "</option>\n";
$out .= ">" . L10n::t("Weekly") . "</option>\n";
$out .= "<option value='monthly' ";
if ($recurrence && $recurrence->frequency == "monthly") $out .= "selected";
$out .= ">" . t("Monthly") . "</option>\n";
$out .= ">" . L10n::t("Monthly") . "</option>\n";
$out .= "<option value='yearly' ";
if ($recurrence && $recurrence->frequency == "yearly") $out .= "selected";
$out .= ">" . t("Yearly") . "</option>\n";
$out .= ">" . L10n::t("Yearly") . "</option>\n";
$out .= "</select><br>\n";
$out .= "<div id='rec_details'>";
@ -211,15 +214,15 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
$select .= ">$i</option>\n";
}
$select .= "</select>";
$time = "<span class='rec_daily'>" . t("days") . "</span>";
$time .= "<span class='rec_weekly'>" . t("weeks") . "</span>";
$time .= "<span class='rec_monthly'>" . t("months") . "</span>";
$time .= "<span class='rec_yearly'>" . t("years") . "</span>";
$out .= "<label class='block'>" . t("Interval") . ":</label> " . str_replace(array("%select%", "%time%"), array($select, $time), t("All %select% %time%")) . "<br>";
$time = "<span class='rec_daily'>" . L10n::t("days") . "</span>";
$time .= "<span class='rec_weekly'>" . L10n::t("weeks") . "</span>";
$time .= "<span class='rec_monthly'>" . L10n::t("months") . "</span>";
$time .= "<span class='rec_yearly'>" . L10n::t("years") . "</span>";
$out .= "<label class='block'>" . L10n::t("Interval") . ":</label> " . str_replace(array("%select%", "%time%"), array($select, $time), L10n::t("All %select% %time%")) . "<br>";
$out .= "<div class='rec_daily'>";
$out .= "<label class='block'>" . t("Days") . ":</label>";
$out .= "<label class='block'>" . L10n::t("Days") . ":</label>";
if ($recurrence && $recurrence->byDay) {
$byday = $recurrence->byDay;
} else {
@ -228,36 +231,36 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
if ($localization->getFirstDayOfWeek() == 0) {
$out .= "<label class='plain'><input class='rec_daily_byday' type='checkbox' name='rec_daily_byday[]' value='SU' ";
if (in_array("SU", $byday)) $out .= "checked";
$out .= ">" . t("Sunday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Sunday") . "</label> &nbsp; ";
}
$out .= "<label class='plain'><input class='rec_daily_byday' type='checkbox' name='rec_daily_byday[]' value='MO' ";
if (in_array("MO", $byday)) $out .= "checked";
$out .= ">" . t("Monday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Monday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_daily_byday' type='checkbox' name='rec_daily_byday[]' value='TU' ";
if (in_array("TU", $byday)) $out .= "checked";
$out .= ">" . t("Tuesday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Tuesday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_daily_byday' type='checkbox' name='rec_daily_byday[]' value='WE' ";
if (in_array("WE", $byday)) $out .= "checked";
$out .= ">" . t("Wednesday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Wednesday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_daily_byday' type='checkbox' name='rec_daily_byday[]' value='TH' ";
if (in_array("TH", $byday)) $out .= "checked";
$out .= ">" . t("Thursday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Thursday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_daily_byday' type='checkbox' name='rec_daily_byday[]' value='FR' ";
if (in_array("FR", $byday)) $out .= "checked";
$out .= ">" . t("Friday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Friday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_daily_byday' type='checkbox' name='rec_daily_byday[]' value='SA' ";
if (in_array("SA", $byday)) $out .= "checked";
$out .= ">" . t("Saturday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Saturday") . "</label> &nbsp; ";
if ($localization->getFirstDayOfWeek() != 0) {
$out .= "<label class='plain'><input class='rec_daily_byday' type='checkbox' name='rec_daily_byday[]' value='SU' ";
if (in_array("SU", $byday)) $out .= "checked";
$out .= ">" . t("Sunday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Sunday") . "</label> &nbsp; ";
}
$out .= "</div>";
$out .= "<div class='rec_weekly'>";
$out .= "<label class='block'>" . t("Days") . ":</label>";
$out .= "<label class='block'>" . L10n::t("Days") . ":</label>";
if ($recurrence && $recurrence->byDay) {
$byday = $recurrence->byDay;
} else {
@ -267,34 +270,34 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
if ($localization->getFirstDayOfWeek() == 0) {
$out .= "<label class='plain'><input class='rec_weekly_byday' type='checkbox' name='rec_weekly_byday[]' value='SU' ";
if (in_array("SU", $byday)) $out .= "checked";
$out .= ">" . t("Sunday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Sunday") . "</label> &nbsp; ";
}
$out .= "<label class='plain'><input class='rec_weekly_byday' type='checkbox' name='rec_weekly_byday[]' value='MO' ";
if (in_array("MO", $byday)) $out .= "checked";
$out .= ">" . t("Monday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Monday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_weekly_byday' type='checkbox' name='rec_weekly_byday[]' value='TU' ";
if (in_array("TU", $byday)) $out .= "checked";
$out .= ">" . t("Tuesday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Tuesday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_weekly_byday' type='checkbox' name='rec_weekly_byday[]' value='WE' ";
if (in_array("WE", $byday)) $out .= "checked";
$out .= ">" . t("Wednesday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Wednesday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_weekly_byday' type='checkbox' name='rec_weekly_byday[]' value='TH' ";
if (in_array("TH", $byday)) $out .= "checked";
$out .= ">" . t("Thursday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Thursday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_weekly_byday' type='checkbox' name='rec_weekly_byday[]' value='FR' ";
if (in_array("FR", $byday)) $out .= "checked";
$out .= ">" . t("Friday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Friday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input class='rec_weekly_byday' type='checkbox' name='rec_weekly_byday[]' value='SA' ";
if (in_array("SA", $byday)) $out .= "checked";
$out .= ">" . t("Saturday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Saturday") . "</label> &nbsp; ";
if ($localization->getFirstDayOfWeek() != 0) {
$out .= "<label class='plain'><input class='rec_weekly_byday' type='checkbox' name='rec_weekly_byday[]' value='SU' ";
if (in_array("SU", $byday)) $out .= "checked";
$out .= ">" . t("Sunday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Sunday") . "</label> &nbsp; ";
}
$out .= "<br>";
$out .= "<label class='block'>" . t("First day of week:") . "</label>";
$out .= "<label class='block'>" . L10n::t("First day of week:") . "</label>";
if ($recurrence && $recurrence->weekStart != "") $wkst = $recurrence->weekStart;
else {
if ($localization->getFirstDayOfWeek() == 0) $wkst = "SU";
@ -302,10 +305,10 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
}
$out .= "<label class='plain'><input type='radio' name='rec_weekly_wkst' value='SU' ";
if ($wkst == "SU") $out .= "checked";
$out .= ">" . t("Sunday") . "</label> &nbsp; ";
$out .= ">" . L10n::t("Sunday") . "</label> &nbsp; ";
$out .= "<label class='plain'><input type='radio' name='rec_weekly_wkst' value='MO' ";
if ($wkst == "MO") $out .= "checked";
$out .= ">" . t("Monday") . "</label><br>\n";
$out .= ">" . L10n::t("Monday") . "</label><br>\n";
$out .= "</div>";
@ -347,20 +350,20 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
}
$out .= "<div class='rec_monthly'>";
$out .= "<label class='block' for='rec_monthly_day'>" . t("Day of month") . ":</label>";
$out .= "<label class='block' for='rec_monthly_day'>" . L10n::t("Day of month") . ":</label>";
$out .= "<select id='rec_monthly_day' name='rec_monthly_day' size='1'>";
$out .= "<option value='bymonthday' ";
if ($monthly_rule == "bymonthday") $out .= "selected";
$out .= ">" . t("#num#th of each month") . "</option>\n";
$out .= ">" . L10n::t("#num#th of each month") . "</option>\n";
$out .= "<option value='bymonthday_neg' ";
if ($monthly_rule == "bymonthday_neg") $out .= "selected";
$out .= ">" . t("#num#th-last of each month") . "</option>\n";
$out .= ">" . L10n::t("#num#th-last of each month") . "</option>\n";
$out .= "<option value='byday' ";
if ($monthly_rule == "byday") $out .= "selected";
$out .= ">" . t("#num#th #wkday# of each month") . "</option>\n";
$out .= ">" . L10n::t("#num#th #wkday# of each month") . "</option>\n";
$out .= "<option value='byday_neg' ";
if ($monthly_rule == "byday_neg") $out .= "selected";
$out .= ">" . t("#num#th-last #wkday# of each month") . "</option>\n";
$out .= ">" . L10n::t("#num#th-last #wkday# of each month") . "</option>\n";
$out .= "</select>";
$out .= "</div>\n";
@ -369,21 +372,21 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
}
$out .= "<div class='rec_yearly'>";
$out .= "<label class='block'>" . t("Month") . ":</label> <span class='rec_month_name'>#month#</span><br>\n";
$out .= "<label class='block' for='rec_yearly_day'>" . t("Day of month") . ":</label>";
$out .= "<label class='block'>" . L10n::t("Month") . ":</label> <span class='rec_month_name'>#month#</span><br>\n";
$out .= "<label class='block' for='rec_yearly_day'>" . L10n::t("Day of month") . ":</label>";
$out .= "<select id='rec_yearly_day' name='rec_yearly_day' size='1'>";
$out .= "<option value='bymonthday' ";
if ($monthly_rule == "bymonthday") $out .= "selected";
$out .= ">" . t("#num#th of the given month") . "</option>\n";
$out .= ">" . L10n::t("#num#th of the given month") . "</option>\n";
$out .= "<option value='bymonthday_neg' ";
if ($monthly_rule == "bymonthday_neg") $out .= "selected";
$out .= ">" . t("#num#th-last of the given month") . "</option>\n";
$out .= ">" . L10n::t("#num#th-last of the given month") . "</option>\n";
$out .= "<option value='byday' ";
if ($monthly_rule == "byday") $out .= "selected";
$out .= ">" . t("#num#th #wkday# of the given month") . "</option>\n";
$out .= ">" . L10n::t("#num#th #wkday# of the given month") . "</option>\n";
$out .= "<option value='byday_neg' ";
if ($monthly_rule == "byday_neg") $out .= "selected";
$out .= ">" . t("#num#th-last #wkday# of the given month") . "</option>\n";
$out .= ">" . L10n::t("#num#th-last #wkday# of the given month") . "</option>\n";
$out .= "</select>";
$out .= "</div>\n";
@ -410,26 +413,26 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
$rule_until_date = time();
$rule_until_count = 1;
}
$out .= "<label class='block' for='rec_until_type'>" . t("Repeat until") . ":</label> ";
$out .= "<label class='block' for='rec_until_type'>" . L10n::t("Repeat until") . ":</label> ";
$out .= "<select name='rec_until_type' id='rec_until_type' size='1'>";
$out .= "<option value='infinite' ";
if ($rule_type == "infinite") $out .= "selected";
$out .= ">" . t("Infinite") . "</option>\n";
$out .= ">" . L10n::t("Infinite") . "</option>\n";
$out .= "<option value='date' ";
if ($rule_type == "date") $out .= "selected";
$out .= ">" . t("Until the following date") . ":</option>\n";
$out .= ">" . L10n::t("Until the following date") . ":</option>\n";
$out .= "<option value='count' ";
if ($rule_type == "count") $out .= "selected";
$out .= ">" . t("Number of times") . ":</option>\n";
$out .= ">" . L10n::t("Number of times") . ":</option>\n";
$out .= "</select>";
$out .= "<input name='rec_until_date' value='" . $localization->dateformat_datepicker_php($rule_until_date) . "' id='rec_until_date'>";
$out .= "<input name='rec_until_count' value='$rule_until_count' id='rec_until_count'><br>";
$out .= "<label class='block'>" . t("Exceptions") . ":</label><div class='rec_exceptions'>";
$out .= "<label class='block'>" . L10n::t("Exceptions") . ":</label><div class='rec_exceptions'>";
$out .= "<div class='rec_exceptions_none' ";
if (count($recurrentce_exdates) > 0) $out .= "style='display: none;'";
$out .= ">" . t("none") . "</div>";
$out .= ">" . L10n::t("none") . "</div>";
$out .= "<div class='rec_exceptions_holder' ";
if (count($recurrentce_exdates) == 0) $out .= "style='display: none;'";
$out .= ">";
@ -446,7 +449,7 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
$out .= "</div><br>";
$out .= "<h2>" . t("Notification") . "</h2>";
$out .= "<h2>" . L10n::t("Notification") . "</h2>";
if (!$notifications) $notifications = array();
$notifications["new"] = array(
@ -463,33 +466,33 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri)
$out .= "<div class='noti_holder' ";
if (!is_numeric($index) && $index == "new") $out .= "style='display: none;' id='noti_new_row'";
$out .= "><label class='block' for='noti_type_" . $index . "'>" . t("Notify by") . ":</label>";
$out .= "><label class='block' for='noti_type_" . $index . "'>" . L10n::t("Notify by") . ":</label>";
$out .= "<select name='noti_type[$index]' size='1' id='noti_type_" . $index . "'>";
$out .= "<option value=''>- " . t("Remove") . " -</option>\n";
$out .= "<option value='email' "; if (!$unparsable && $noti["action"] == "email") $out .= "selected"; $out .= ">" . t("E-Mail") . "</option>\n";
$out .= "<option value='display' "; if (!$unparsable && $noti["action"] == "display") $out .= "selected"; $out .= ">" . t("On Friendica / Display") . "</option>\n";
//$out .= "<option value='other' "; if ($unparsable) $out .= "selected"; $out .= ">- " . t("other (leave it untouched)") . " -</option>\n"; // @TODO
$out .= "<option value=''>- " . L10n::t("Remove") . " -</option>\n";
$out .= "<option value='email' "; if (!$unparsable && $noti["action"] == "email") $out .= "selected"; $out .= ">" . L10n::t("E-Mail") . "</option>\n";
$out .= "<option value='display' "; if (!$unparsable && $noti["action"] == "display") $out .= "selected"; $out .= ">" . L10n::t("On Friendica / Display") . "</option>\n";
//$out .= "<option value='other' "; if ($unparsable) $out .= "selected"; $out .= ">- " . L10n::t("other (leave it untouched)") . " -</option>\n"; // @TODO
$out .= "</select><br>";
$out .= "<label class='block'>" . t("Time") . ":</label>";
$out .= "<label class='block'>" . L10n::t("Time") . ":</label>";
$out .= "<input name='noti_value[$index]' size='5' style='width: 5em;' value='" . $noti["trigger_value"] . "'>";
$out .= "<select name='noti_unit[$index]' size='1'>";
$out .= "<option value='H' "; if ($noti["trigger_unit"] == "hour") $out .= "selected"; $out .= ">" . t("Hours") . "</option>\n";
$out .= "<option value='M' "; if ($noti["trigger_unit"] == "minute") $out .= "selected"; $out .= ">" . t("Minutes") . "</option>\n";
$out .= "<option value='S' "; if ($noti["trigger_unit"] == "second") $out .= "selected"; $out .= ">" . t("Seconds") . "</option>\n";
$out .= "<option value='D' "; if ($noti["trigger_unit"] == "day") $out .= "selected"; $out .= ">" . t("Days") . "</option>\n";
$out .= "<option value='W' "; if ($noti["trigger_unit"] == "week") $out .= "selected"; $out .= ">" . t("Weeks") . "</option>\n";
$out .= "<option value='H' "; if ($noti["trigger_unit"] == "hour") $out .= "selected"; $out .= ">" . L10n::t("Hours") . "</option>\n";
$out .= "<option value='M' "; if ($noti["trigger_unit"] == "minute") $out .= "selected"; $out .= ">" . L10n::t("Minutes") . "</option>\n";
$out .= "<option value='S' "; if ($noti["trigger_unit"] == "second") $out .= "selected"; $out .= ">" . L10n::t("Seconds") . "</option>\n";
$out .= "<option value='D' "; if ($noti["trigger_unit"] == "day") $out .= "selected"; $out .= ">" . L10n::t("Days") . "</option>\n";
$out .= "<option value='W' "; if ($noti["trigger_unit"] == "week") $out .= "selected"; $out .= ">" . L10n::t("Weeks") . "</option>\n";
$out .= "</select>";
$out .= " <label class='plain'>" . t("before the") . " <select name='noti_ref[$index]' size='1'>";
$out .= "<option value='start' "; if ($noti["rel"] == "start") $out .= "selected"; $out .= ">" . t("start of the event") . "</option>\n";
$out .= "<option value='end' "; if ($noti["rel"] == "end") $out .= "selected"; $out .= ">" . t("end of the event") . "</option>\n";
$out .= " <label class='plain'>" . L10n::t("before the") . " <select name='noti_ref[$index]' size='1'>";
$out .= "<option value='start' "; if ($noti["rel"] == "start") $out .= "selected"; $out .= ">" . L10n::t("start of the event") . "</option>\n";
$out .= "<option value='end' "; if ($noti["rel"] == "end") $out .= "selected"; $out .= ">" . L10n::t("end of the event") . "</option>\n";
$out .= "</select></label>\n";
$out .= "</div>";
}
$out .= "<input type='hidden' name='new_alarm' id='new_alarm' value='0'><div id='new_alarm_adder'><a href='#'>" . t("Add a notification") . "</a></div>";
$out .= "<input type='hidden' name='new_alarm' id='new_alarm' value='0'><div id='new_alarm_adder'><a href='#'>" . L10n::t("Add a notification") . "</a></div>";
$out .= "<script>\$(function() {
wdcal_edit_init('" . $localization->dateformat_datepicker_js() . "', '${baseurl}/dav/');
@ -518,9 +521,9 @@ function wdcal_set_component_date(&$component, &$localization)
$type = Sabre\VObject\Property\DateTime::LOCALTZ;
}
$datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
$datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", $ts_start)), $type);
$datetime_start->setDateTime(new DateTime(date(DateTimeFormat::MYSQL, $ts_start)), $type);
$datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
$datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", $ts_end)), $type);
$datetime_end->setDateTime(new DateTime(date(DateTimeFormat::MYSQL, $ts_end)), $type);
$component->__unset("DTSTART");
$component->__unset("DTEND");
@ -596,7 +599,7 @@ function wdcal_set_component_recurrence(&$component, &$localization)
$date = $localization->date_local2timestamp($_REQUEST["rec_until_date"]);
$part_until = ";UNTIL=" . date("Ymd", $date);
$datetime_until = new Sabre\VObject\Property\DateTime("UNTIL");
$datetime_until->setDateTime(new DateTime(date("Y-m-d H:i:s", $date)), Sabre\VObject\Property\DateTime::DATE);
$datetime_until->setDateTime(new DateTime(date(DateTimeFormat::MYSQL, $date)), Sabre\VObject\Property\DateTime::DATE);
break;
case "count":
$part_until = ";COUNT=" . IntVal($_REQUEST["rec_until_count"]);
@ -643,7 +646,7 @@ function wdcal_set_component_recurrence(&$component, &$localization)
if (isset($_REQUEST["rec_exceptions"])) {
$arr = array();
foreach ($_REQUEST["rec_exceptions"] as $except) {
$arr[] = new DateTime(date("Y-m-d H:i:s", $except));
$arr[] = new DateTime(date(DateTimeFormat::MYSQL, $except));
}
/** @var Sabre\VObject\Property\MultiDateTime $prop */
$prop = Sabre\VObject\Property::create("EXDATE");
@ -684,7 +687,7 @@ function wdcal_set_component_alerts(&$component, &$localization, $summary, $dtst
"#date#", "#name",
), array(
$localization->date_timestamp2local($dtstart), $summary,
), t("The event #name# will start at #date"));
), L10n::t("The event #name# will start at #date"));
$alarm->add(new Sabre\VObject\Property("ACTION", "EMAIL"));
$alarm->add(new Sabre\VObject\Property("SUMMARY", $summary));
@ -693,7 +696,7 @@ function wdcal_set_component_alerts(&$component, &$localization, $summary, $dtst
break;
case "display":
$alarm->add(new Sabre\VObject\Property("ACTION", "DISPLAY"));
$text = str_replace("#name#", $summary, t("#name# is about to begin."));
$text = str_replace("#name#", $summary, L10n::t("#name# is about to begin."));
$alarm->add(new Sabre\VObject\Property("DESCRIPTION", $text));
break;
default:
@ -735,7 +738,7 @@ function wdcal_postEditPage($uri, $uid = 0, $timezone = "", $goaway_url = "")
$vObject = dav_get_current_user_calendarobject($server, $calendar, $obj_uri, DAV_ACL_WRITE);
$component = dav_get_eventComponent($vObject);
if ($component == null) return array("ok" => false, "msg" => t('Could not open component for editing'));
if ($component == null) return array("ok" => false, "msg" => L10n::t('Could not open component for editing'));
} else {
$calendar = dav_get_current_user_calendar_by_id($server, $_REQUEST["calendar"], DAV_ACL_WRITE);
$vObject = dav_create_empty_vevent();
@ -766,7 +769,7 @@ function wdcal_postEditPage($uri, $uid = 0, $timezone = "", $goaway_url = "")
$obj = $calendar->getChild($obj_uri);
$obj->put($data);
}
return array("ok" => false, "msg" => t("Saved"));
return array("ok" => false, "msg" => L10n::t("Saved"));
}

Some files were not shown because too many files have changed in this diff Show More