Merge branch '3.6-rc'
This commit is contained in:
commit
39dd3dffe0
733 changed files with 10943 additions and 8237 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -15,7 +15,7 @@ report/
|
|||
.buildpath
|
||||
.externalToolBuilders
|
||||
.settings
|
||||
#ignore OSX .DS_Store files
|
||||
#ignore OSX .DS_Store files
|
||||
.DS_Store
|
||||
|
||||
/nbproject/private/
|
||||
|
|
|
|||
54
.tx/config
54
.tx/config
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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']);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ""
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
59
blockem/lang/en-gb/messages.po
Normal file
59
blockem/lang/en-gb/messages.po
Normal 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"
|
||||
16
blockem/lang/en-gb/strings.php
Normal file
16
blockem/lang/en-gb/strings.php
Normal 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";
|
||||
59
blockem/lang/en-us/messages.po
Normal file
59
blockem/lang/en-us/messages.po
Normal 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"
|
||||
16
blockem/lang/en-us/strings.php
Normal file
16
blockem/lang/en-us/strings.php
Normal 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";
|
||||
|
|
@ -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."
|
||||
|
|
|
|||
|
|
@ -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.";
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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"] = "";
|
||||
|
|
|
|||
|
|
@ -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"] = "";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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:";
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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.";
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:";
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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:";
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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:"] = "";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:"] = "Сообщения уходят во все учетные записи по умолчанию:";
|
||||
|
|
|
|||
|
|
@ -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>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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'>
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 °C or °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 °C or °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')]
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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 .= " <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> ";
|
||||
$out .= ">" . L10n::t("Sunday") . "</label> ";
|
||||
}
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Monday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Tuesday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Wednesday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Thursday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Friday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Saturday") . "</label> ";
|
||||
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> ";
|
||||
$out .= ">" . L10n::t("Sunday") . "</label> ";
|
||||
}
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Sunday") . "</label> ";
|
||||
}
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Monday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Tuesday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Wednesday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Thursday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Friday") . "</label> ";
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Saturday") . "</label> ";
|
||||
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> ";
|
||||
$out .= ">" . L10n::t("Sunday") . "</label> ";
|
||||
}
|
||||
$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> ";
|
||||
$out .= ">" . L10n::t("Sunday") . "</label> ";
|
||||
$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"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\L10n;
|
||||
|
||||
$a = get_app();
|
||||
$uri = parse_url($a->get_baseurl());
|
||||
$path = "/";
|
||||
|
|
@ -202,11 +204,11 @@ function wdcal_create_std_calendars_get_statements($user_id, $withcheck = true)
|
|||
{
|
||||
$stms = array();
|
||||
$a = get_app();
|
||||
$uris = array(
|
||||
'private' => t("Private Calendar"),
|
||||
CALDAV_FRIENDICA_MINE => t("Friendica Events: Mine"),
|
||||
CALDAV_FRIENDICA_CONTACTS => t("Friendica Events: Contacts"),
|
||||
);
|
||||
$uris = [
|
||||
'private' => L10n::t("Private Calendar"),
|
||||
CALDAV_FRIENDICA_MINE => L10n::t("Friendica Events: Mine"),
|
||||
CALDAV_FRIENDICA_CONTACTS => L10n::t("Friendica Events: Contacts"),
|
||||
];
|
||||
foreach ($uris as $uri => $name) {
|
||||
$cals = q("SELECT * FROM %s%scalendars WHERE `namespace` = %d AND `namespace_id` = %d AND `uri` = '%s'",
|
||||
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, CALDAV_NAMESPACE_PRIVATE, IntVal($user_id), dbesc($uri));
|
||||
|
|
@ -244,10 +246,10 @@ function wdcal_create_std_addressbooks_get_statements($user_id, $withcheck = tru
|
|||
{
|
||||
$stms = array();
|
||||
$a = get_app();
|
||||
$uris = array(
|
||||
'private' => t("Private Addresses"),
|
||||
CARDDAV_FRIENDICA_CONTACT => t("Friendica Contacts"),
|
||||
);
|
||||
$uris = [
|
||||
'private' => L10n::t("Private Addresses"),
|
||||
CARDDAV_FRIENDICA_CONTACT => L10n::t("Friendica Contacts"),
|
||||
];
|
||||
foreach ($uris as $uri => $name) {
|
||||
$cals = q("SELECT * FROM %s%saddressbooks WHERE `namespace` = %d AND `namespace_id` = %d AND `uri` = '%s'",
|
||||
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, CALDAV_NAMESPACE_PRIVATE, IntVal($user_id), dbesc($uri));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
|
||||
{
|
||||
|
||||
|
|
@ -33,7 +36,7 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
|
|||
* @return string
|
||||
*/
|
||||
public static function getBackendTypeName() {
|
||||
return t("Friendica-Native events");
|
||||
return L10n::t("Friendica-Native events");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -65,8 +68,8 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
|
|||
$component = dav_get_eventComponent($vevent);
|
||||
|
||||
if ($row["adjust"]) {
|
||||
$start = datetime_convert('UTC', date_default_timezone_get(), $row["start"]);
|
||||
$finish = datetime_convert('UTC', date_default_timezone_get(), $row["finish"]);
|
||||
$start = DateTimeFormat::local($row["start"]);
|
||||
$finish = DateTimeFormat::local($row["finish"]);
|
||||
} else {
|
||||
$start = $row["start"];
|
||||
$finish = $row["finish"];
|
||||
|
|
@ -85,9 +88,9 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
|
|||
$type = ($allday ? Sabre\VObject\Property\DateTime::DATE : 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->add($datetime_start);
|
||||
$component->add($datetime_end);
|
||||
|
|
@ -113,8 +116,8 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
|
|||
private function jqcal2wdcal($row, $calendar, $base_path)
|
||||
{
|
||||
if ($row["adjust"]) {
|
||||
$start = datetime_convert('UTC', date_default_timezone_get(), $row["start"]);
|
||||
$finish = datetime_convert('UTC', date_default_timezone_get(), $row["finish"]);
|
||||
$start = DateTimeFormat::local($row["start"]);
|
||||
$finish = DateTimeFormat::local($row["finish"]);
|
||||
} else {
|
||||
$start = $row["start"];
|
||||
$finish = $row["finish"];
|
||||
|
|
@ -172,11 +175,11 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
|
|||
}
|
||||
|
||||
if ($date_from != "") {
|
||||
if (is_numeric($date_from)) $sql_where .= " AND `finish` >= '" . date("Y-m-d H:i:s", $date_from) . "'";
|
||||
if (is_numeric($date_from)) $sql_where .= " AND `finish` >= '" . date(DateTimeFormat::MYSQL, $date_from) . "'";
|
||||
else $sql_where .= " AND `finish` >= '" . dbesc($date_from) . "'";
|
||||
}
|
||||
if ($date_to != "") {
|
||||
if (is_numeric($date_to)) $sql_where .= " AND `start` <= '" . date("Y-m-d H:i:s", $date_to) . "'";
|
||||
if (is_numeric($date_to)) $sql_where .= " AND `start` <= '" . date(DateTimeFormat::MYSQL, $date_to) . "'";
|
||||
else $sql_where .= " AND `start` <= '" . dbesc($date_to) . "'";
|
||||
}
|
||||
$ret = array();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\L10n;
|
||||
|
||||
class Sabre_CardDAV_Backend_Friendica extends Sabre_CardDAV_Backend_Virtual
|
||||
{
|
||||
|
||||
|
|
@ -33,7 +35,7 @@ class Sabre_CardDAV_Backend_Friendica extends Sabre_CardDAV_Backend_Virtual
|
|||
* @return string
|
||||
*/
|
||||
public static function getBackendTypeName() {
|
||||
return t("Friendica-Contacts");
|
||||
return L10n::t("Friendica-Contacts");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -56,8 +58,8 @@ class Sabre_CardDAV_Backend_Friendica extends Sabre_CardDAV_Backend_Virtual
|
|||
'id' => $books[0]["id"],
|
||||
'uri' => "friendica",
|
||||
'principaluri' => $principalUri,
|
||||
'{DAV:}displayname' => t("Friendica-Contacts"),
|
||||
'{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}addressbook-description' => t("Your Friendica-Contacts"),
|
||||
'{DAV:}displayname' => L10n::t("Friendica-Contacts"),
|
||||
'{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}addressbook-description' => L10n::t("Your Friendica-Contacts"),
|
||||
'{http://calendarserver.org/ns/}getctag' => $ctag,
|
||||
'{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}supported-address-data' =>
|
||||
new Sabre_CardDAV_Property_SupportedAddressData(),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -96,7 +99,7 @@ function wdcal_import_user_ics($calendar_id) {
|
|||
if (!isset($imported[$uid])) $imported[$uid] = "";
|
||||
$imported[$uid] .= $c->serialize();
|
||||
} catch (Exception $e) {
|
||||
notice(t("Something went wrong when trying to import the file. Sorry. Maybe some events were imported anyway."));
|
||||
notice(L10n::t("Something went wrong when trying to import the file. Sorry. Maybe some events were imported anyway."));
|
||||
}
|
||||
|
||||
if (isset($_REQUEST["overwrite"])) {
|
||||
|
|
@ -128,28 +131,28 @@ function wdcal_import_user_ics($calendar_id) {
|
|||
$calendar->createFile("import-" . $i . ".ics", $str);
|
||||
$i++;
|
||||
} catch (Exception $e) {
|
||||
notice(t("Something went wrong when trying to import the file. Sorry."));
|
||||
notice(L10n::t("Something went wrong when trying to import the file. Sorry."));
|
||||
}
|
||||
|
||||
$o = t("The ICS-File has been imported.");
|
||||
$o = L10n::t("The ICS-File has been imported.");
|
||||
} catch (Exception $e) {
|
||||
notice(t("Something went wrong when trying to import the file. Sorry. Maybe some events were imported anyway."));
|
||||
notice(L10n::t("Something went wrong when trying to import the file. Sorry. Maybe some events were imported anyway."));
|
||||
} else {
|
||||
notice(t("No file was uploaded."));
|
||||
notice(L10n::t("No file was uploaded."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$o .= "<a href='" . $a->get_baseurl() . "/dav/wdcal/'>" . t("Go back to the calendar") . "</a><br><br>";
|
||||
$o .= "<a href='" . $a->get_baseurl() . "/dav/wdcal/'>" . L10n::t("Go back to the calendar") . "</a><br><br>";
|
||||
|
||||
$num = q("SELECT COUNT(*) num FROM %s%scalendarobjects WHERE `calendar_id` = %d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $calendar_id);
|
||||
|
||||
$o .= "<h2>" . t("Import a ICS-file") . "</h2>";
|
||||
$o .= "<h2>" . L10n::t("Import a ICS-file") . "</h2>";
|
||||
$o .= '<form method="POST" action="' . $a->get_baseurl() . '/dav/wdcal/' . $calendar_id . '/ics-import/" enctype="multipart/form-data">';
|
||||
$o .= "<input type='hidden' name='form_security_token' value='" . get_form_security_token('icsimport') . "'>\n";
|
||||
$o .= "<label for='ics_file'>" . t("ICS-File") . "</label><input type='file' name='ics_file' id='ics_file'><br>\n";
|
||||
if ($num[0]["num"] > 0) $o .= "<label for='overwrite'>" . str_replace("#num#", $num[0]["num"], t("Overwrite all #num# existing events")) . "</label> <input name='overwrite' id='overwrite' type='checkbox'><br>\n";
|
||||
$o .= "<input type='submit' name='save' value='" . t("Upload") . "'>";
|
||||
$o .= "<label for='ics_file'>" . L10n::t("ICS-File") . "</label><input type='file' name='ics_file' id='ics_file'><br>\n";
|
||||
if ($num[0]["num"] > 0) $o .= "<label for='overwrite'>" . str_replace("#num#", $num[0]["num"], L10n::t("Overwrite all #num# existing events")) . "</label> <input name='overwrite' id='overwrite' type='checkbox'><br>\n";
|
||||
$o .= "<input type='submit' name='save' value='" . L10n::t("Upload") . "'>";
|
||||
$o .= '</form>';
|
||||
|
||||
return $o;
|
||||
|
|
@ -222,14 +225,14 @@ function wdcal_printCalendar($calendars, $calendars_selected, $data_feed_url, $v
|
|||
|
||||
$x .= '<div class="ctoolbar">
|
||||
<div class="fbutton faddbtn" style="float: right;">
|
||||
<div><a href="' . $a->get_baseurl() . '/dav/settings/"><span>' . t("Settings") . ' / ' . t("Help") . '</span></a></div>
|
||||
<div><a href="' . $a->get_baseurl() . '/dav/settings/"><span>' . L10n::t("Settings") . ' / ' . L10n::t("Help") . '</span></a></div>
|
||||
</div>
|
||||
<div class="fbutton addcal">
|
||||
<div><a href="' . $a->get_baseurl() . '/dav/wdcal/new/" class="addcal">' . t("New event") . '</a></div>
|
||||
<div><a href="' . $a->get_baseurl() . '/dav/wdcal/new/" class="addcal">' . L10n::t("New event") . '</a></div>
|
||||
</div>
|
||||
<div class="btnseparator"></div>
|
||||
<div class="fbutton showtodaybtn">
|
||||
<div><span class="showtoday">' . t("Today") . '</span></div>
|
||||
<div><span class="showtoday">' . L10n::t("Today") . '</span></div>
|
||||
</div>
|
||||
<div class="btnseparator"></div>
|
||||
|
||||
|
|
@ -238,37 +241,37 @@ function wdcal_printCalendar($calendars, $calendars_selected, $data_feed_url, $v
|
|||
|
||||
if ($view == "day") $x .= 'fcurrent';
|
||||
|
||||
$x .= '">' . t("Day") . '</span></div>
|
||||
$x .= '">' . L10n::t("Day") . '</span></div>
|
||||
</div>
|
||||
<div class="fbutton showweekbtn ';
|
||||
|
||||
if ($view == "week") $x .= "fcurrent";
|
||||
|
||||
$x .= '">
|
||||
<div><span title="Week" class="showweekview">' . t("Week") . '</span></div>
|
||||
<div><span title="Week" class="showweekview">' . L10n::t("Week") . '</span></div>
|
||||
</div>
|
||||
<div class="showmonthbtn fbutton ';
|
||||
|
||||
if ($view == "month") $x .= 'fcurrent';
|
||||
|
||||
$x .= '">
|
||||
<div><span title="Month" class="showmonthview">' . t("Month") . '</span></div>
|
||||
<div><span title="Month" class="showmonthview">' . L10n::t("Month") . '</span></div>
|
||||
|
||||
</div>
|
||||
<div class="btnseparator"></div>
|
||||
<div class="fbutton showreflashbtn">
|
||||
<div><span class="showdayflash">' . t("Reload") . '</span></div>
|
||||
<div><span class="showdayflash">' . L10n::t("Reload") . '</span></div>
|
||||
</div>
|
||||
<div class="btnseparator"></div>
|
||||
<div title="' . t("Previous") . '" class="fbutton sfprevbtn">
|
||||
<div title="' . L10n::t("Previous") . '" class="fbutton sfprevbtn">
|
||||
<span class="fprev"></span>
|
||||
</div>
|
||||
<div title="' . t("Next") . '" class="fbutton sfnextbtn">
|
||||
<div title="' . L10n::t("Next") . '" class="fbutton sfnextbtn">
|
||||
<span class="fnext"></span>
|
||||
</div>
|
||||
<div class="fshowdatep fbutton" style="white-space: nowrap; position: relative;">
|
||||
<input name="txtshow" class="hdtxtshow" style="position: absolute; bottom: 0; left: 0; width: 0; height: 0; border: 0; padding: 0; margin: 0;">
|
||||
<span class="txtdatetimeshow">' . t("Date") . '</span>
|
||||
<span class="txtdatetimeshow">' . L10n::t("Date") . '</span>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<div class="clear"></div>
|
||||
|
|
@ -310,8 +313,8 @@ function wdcal_getDetailPage($calendar_id, $calendarobject_id)
|
|||
|
||||
$details = $obj;
|
||||
} catch (Exception $e) {
|
||||
info(t("Error") . ": " . $e);
|
||||
goaway($a->get_baseurl() . "/dav/wdcal/");
|
||||
info(L10n::t("Error") . ": " . $e);
|
||||
goaway('dav/wdcal/');
|
||||
}
|
||||
|
||||
return print_r($details, true);
|
||||
|
|
@ -351,14 +354,14 @@ function wdcal_getSettingsPage(&$a)
|
|||
{
|
||||
|
||||
if (!local_user()) {
|
||||
notice(t('Permission denied.') . EOL);
|
||||
notice(L10n::t('Permission denied.') . EOL);
|
||||
return '';
|
||||
}
|
||||
|
||||
if (isset($_REQUEST["save"])) {
|
||||
check_form_security_token_redirectOnErr('/dav/settings/', 'calprop');
|
||||
set_pconfig($a->user["uid"], "dav", "dateformat", $_REQUEST["wdcal_date_format"]);
|
||||
info(t('The new values have been saved.'));
|
||||
PConfig::set($a->user["uid"], "dav", "dateformat", $_REQUEST["wdcal_date_format"]);
|
||||
info(L10n::t('The new values have been saved.'));
|
||||
}
|
||||
|
||||
if (isset($_REQUEST["save_cals"])) {
|
||||
|
|
@ -377,7 +380,7 @@ function wdcal_getSettingsPage(&$a)
|
|||
if ($change_sql != "") {
|
||||
q("UPDATE %s%scalendars SET `ctag` = `ctag` + 1 $change_sql WHERE `id` = %d AND `namespace_id` = %d AND `namespace_id` = %d",
|
||||
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $cal["id"], CALDAV_NAMESPACE_PRIVATE, IntVal($a->user["uid"]));
|
||||
info(t('The calendar has been updated.'));
|
||||
info(L10n::t('The calendar has been updated.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -390,7 +393,7 @@ function wdcal_getSettingsPage(&$a)
|
|||
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, CALDAV_NAMESPACE_PRIVATE, IntVal($a->user["uid"]), $neworder, dbesc(strtolower(substr($_REQUEST["color"]["new"], 1))),
|
||||
dbesc($_REQUEST["name"]["new"]), dbesc($a->timezone), dbesc($_REQUEST["uri"]["new"])
|
||||
);
|
||||
info(t('The new calendar has been created.'));
|
||||
info(L10n::t('The new calendar has been created.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -414,20 +417,20 @@ function wdcal_getSettingsPage(&$a)
|
|||
q("DELETE FROM %s%scalendars WHERE `id` = %s", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($_REQUEST["remove_cal"]));
|
||||
q("UPDATE %s%scalendars SET `ctag` = `ctag` + 1 WHERE `id` = " . CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $newcal[0]["id"]);
|
||||
|
||||
info(t('The calendar has been deleted.'));
|
||||
info(L10n::t('The calendar has been deleted.'));
|
||||
}
|
||||
|
||||
$o = "";
|
||||
|
||||
$o .= "<a href='" . $a->get_baseurl() . "/dav/wdcal/'>" . t("Go back to the calendar") . "</a><br><br>";
|
||||
$o .= "<a href='" . $a->get_baseurl() . "/dav/wdcal/'>" . L10n::t("Go back to the calendar") . "</a><br><br>";
|
||||
|
||||
$o .= '<h3>' . t('Calendar Settings') . '</h3>';
|
||||
$o .= '<h3>' . L10n::t('Calendar Settings') . '</h3>';
|
||||
|
||||
$current_format = wdcal_local::getInstanceByUser($a->user["uid"]);
|
||||
$o .= '<form method="POST" action="' . $a->get_baseurl() . '/dav/settings/">';
|
||||
$o .= "<input type='hidden' name='form_security_token' value='" . get_form_security_token('calprop') . "'>\n";
|
||||
|
||||
$o .= '<label for="wdcal_date_format">' . t('Date format') . ':</label><select name="wdcal_date_format" id="wdcal_date_format" size="1">';
|
||||
$o .= '<label for="wdcal_date_format">' . L10n::t('Date format') . ':</label><select name="wdcal_date_format" id="wdcal_date_format" size="1">';
|
||||
$classes = wdcal_local::getInstanceClasses();
|
||||
foreach ($classes as $c) {
|
||||
$o .= '<option value="' . $c::getID() . '" ';
|
||||
|
|
@ -436,13 +439,13 @@ function wdcal_getSettingsPage(&$a)
|
|||
}
|
||||
$o .= '</select><br>';
|
||||
|
||||
$o .= '<label for="wdcal_time_zone">' . t('Time zone') . ':</label><input id="wdcal_time_zone" value="' . $a->timezone . '" disabled><br>';
|
||||
$o .= '<label for="wdcal_time_zone">' . L10n::t('Time zone') . ':</label><input id="wdcal_time_zone" value="' . $a->timezone . '" disabled><br>';
|
||||
|
||||
$o .= '<input type="submit" name="save" value="' . t('Save') . '">';
|
||||
$o .= '<input type="submit" name="save" value="' . L10n::t('Save') . '">';
|
||||
$o .= '</form>';
|
||||
|
||||
|
||||
$o .= '<br><br><h3>' . t('Calendars') . '</h3>';
|
||||
$o .= '<br><br><h3>' . L10n::t('Calendars') . '</h3>';
|
||||
$o .= '<form method="POST" action="' . $a->get_baseurl() . '/dav/settings/">';
|
||||
$o .= "<input type='hidden' name='form_security_token' value='" . get_form_security_token('calprop') . "'>\n";
|
||||
$o .= "<table><tr><th>Type</th><th>Color</th><th>Name</th><th>URI (for CalDAV)</th><th>ICS</th></tr>";
|
||||
|
|
@ -484,8 +487,8 @@ function wdcal_getSettingsPage(&$a)
|
|||
$o .= "</tr>\n";
|
||||
|
||||
$o .= "</table>";
|
||||
$o .= "<div style='text-align: center;'>[<a href='#' class='calendar_add_caller'>" . t("Create a new calendar") . "</a>]</div>";
|
||||
$o .= '<input type="submit" name="save_cals" value="' . t('Save') . '">';
|
||||
$o .= "<div style='text-align: center;'>[<a href='#' class='calendar_add_caller'>" . L10n::t("Create a new calendar") . "</a>]</div>";
|
||||
$o .= '<input type="submit" name="save_cals" value="' . L10n::t('Save') . '">';
|
||||
$o .= '</form>';
|
||||
$baseurl = $a->get_baseurl();
|
||||
$o .= "<script>\$(function() {
|
||||
|
|
@ -493,22 +496,22 @@ function wdcal_getSettingsPage(&$a)
|
|||
});</script>";
|
||||
|
||||
|
||||
$o .= "<br><h3>" . t("Limitations") . "</h3>";
|
||||
$o .= "<br><h3>" . L10n::t("Limitations") . "</h3>";
|
||||
|
||||
$o .= "- The native friendica events are embedded as read-only, half-transparent in the calendar.<br>";
|
||||
|
||||
$o .= "<br><h3>" . t("Warning") . "</h3>";
|
||||
$o .= "<br><h3>" . L10n::t("Warning") . "</h3>";
|
||||
|
||||
$o .= "This plugin still is in a very early stage of development. Expect major bugs!<br>";
|
||||
$o .= "This addon still is in a very early stage of development. Expect major bugs!<br>";
|
||||
|
||||
$o .= "<br><h3>" . t("Synchronization (iPhone, Thunderbird Lightning, Android, ...)") . "</h3>";
|
||||
$o .= "<br><h3>" . L10n::t("Synchronization (iPhone, Thunderbird Lightning, Android, ...)") . "</h3>";
|
||||
|
||||
$o .= 'This plugin enables synchronization of your dates and contacts with CalDAV- and CardDAV-enabled programs or devices.<br>
|
||||
$o .= 'This addon enables synchronization of your dates and contacts with CalDAV- and CardDAV-enabled programs or devices.<br>
|
||||
As an example, the instructions how to set up two-way synchronization with an iPhone/iPodTouch are provided below.<br>
|
||||
Unfortunately, Android does not have native support for CalDAV or CardDAV, so an app has to be installed.<br>
|
||||
On desktops, the Lightning-extension to Mozilla Thunderbird should be able to use this plugin as a backend.<br><br>';
|
||||
On desktops, the Lightning-extension to Mozilla Thunderbird should be able to use this addon as a backend.<br><br>';
|
||||
|
||||
$o .= '<h4>' . t('Synchronizing this calendar with the iPhone') . '</h4>';
|
||||
$o .= '<h4>' . L10n::t('Synchronizing this calendar with the iPhone') . '</h4>';
|
||||
|
||||
$o .= "<ul>
|
||||
<li>Go to the settings</li>
|
||||
|
|
@ -519,7 +522,7 @@ function wdcal_getSettingsPage(&$a)
|
|||
<li><b>Server:</b> " . $a->get_baseurl() . "/dav/ / <b>Username/Password:</b> <em>the same as your friendica-login</em></li>
|
||||
</ul>";
|
||||
|
||||
$o .= '<h4>' . t('Synchronizing your Friendica-Contacts with the iPhone') . '</h4>';
|
||||
$o .= '<h4>' . L10n::t('Synchronizing your Friendica-Contacts with the iPhone') . '</h4>';
|
||||
|
||||
$o .= "<ul>
|
||||
<li>Go to the settings</li>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,27 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Util\Emailer;
|
||||
|
||||
require_once('include/security.php');
|
||||
|
||||
function dav_install()
|
||||
{
|
||||
register_hook('event_created', 'addon/dav/dav.php', 'dav_event_created_hook');
|
||||
register_hook('event_updated', 'addon/dav/dav.php', 'dav_event_updated_hook');
|
||||
register_hook('profile_tabs', 'addon/dav/dav.php', 'dav_profile_tabs_hook');
|
||||
register_hook('cron', 'addon/dav/dav.php', 'dav_cron');
|
||||
Addon::registerHook('event_created', 'addon/dav/dav.php', 'dav_event_created_hook');
|
||||
Addon::registerHook('event_updated', 'addon/dav/dav.php', 'dav_event_updated_hook');
|
||||
Addon::registerHook('profile_tabs', 'addon/dav/dav.php', 'dav_profile_tabs_hook');
|
||||
Addon::registerHook('cron', 'addon/dav/dav.php', 'dav_cron');
|
||||
}
|
||||
|
||||
|
||||
function dav_uninstall()
|
||||
{
|
||||
unregister_hook('event_created', 'addon/dav/dav.php', 'dav_event_created_hook');
|
||||
unregister_hook('event_updated', 'addon/dav/dav.php', 'dav_event_updated_hook');
|
||||
unregister_hook('profile_tabs', 'addon/dav/dav.php', 'dav_profile_tabs_hook');
|
||||
unregister_hook('cron', 'addon/dav/dav.php', 'dav_cron');
|
||||
Addon::unregisterHook('event_created', 'addon/dav/dav.php', 'dav_event_created_hook');
|
||||
Addon::unregisterHook('event_updated', 'addon/dav/dav.php', 'dav_event_updated_hook');
|
||||
Addon::unregisterHook('profile_tabs', 'addon/dav/dav.php', 'dav_profile_tabs_hook');
|
||||
Addon::unregisterHook('cron', 'addon/dav/dav.php', 'dav_cron');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -199,7 +204,7 @@ function dav_content()
|
|||
}
|
||||
}
|
||||
} catch (DAVVersionMismatchException $e) {
|
||||
$x = t("The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this.");
|
||||
$x = L10n::t("The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this.");
|
||||
}
|
||||
return $x;
|
||||
}
|
||||
|
|
@ -235,12 +240,12 @@ function dav_event_updated_hook(&$a, &$b)
|
|||
*/
|
||||
function dav_profile_tabs_hook(&$a, &$b)
|
||||
{
|
||||
$b["tabs"][] = array(
|
||||
"label" => t('Calendar'),
|
||||
$b["tabs"][] = [
|
||||
"label" => L10n::t('Calendar'),
|
||||
"url" => $a->get_baseurl() . "/dav/wdcal/",
|
||||
"sel" => "",
|
||||
"title" => t('Extended calendar with CalDAV-support'),
|
||||
);
|
||||
"title" => L10n::t('Extended calendar with CalDAV-support'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -277,10 +282,10 @@ function dav_cron(&$a, &$b)
|
|||
$text_html = str_replace($find, $repl, "Hi %to%!<br>\n<br>\nThe event \"%event%\" is about to begin:<br>\n<a href='" . "%url%" . "'>%url%</a>");
|
||||
$params = array(
|
||||
'fromName' => FRIENDICA_PLATFORM,
|
||||
'fromEmail' => t('noreply') . '@' . $a->get_hostname(),
|
||||
'replyTo' => t('noreply') . '@' . $a->get_hostname(),
|
||||
'fromEmail' => L10n::t('noreply') . '@' . $a->get_hostname(),
|
||||
'replyTo' => L10n::t('noreply') . '@' . $a->get_hostname(),
|
||||
'toEmail' => $user["email"],
|
||||
'messageSubject' => t("Notification: " . $event[0]["Summary"]),
|
||||
'messageSubject' => L10n::t("Notification: " . $event[0]["Summary"]),
|
||||
'htmlVersion' => $text_html,
|
||||
'textVersion' => $text_text,
|
||||
'additionalMailHeader' => "",
|
||||
|
|
@ -299,24 +304,24 @@ function dav_cron(&$a, &$b)
|
|||
* @param App $a
|
||||
* @param null|object $o
|
||||
*/
|
||||
function dav_plugin_admin_post(&$a = null, &$o = null)
|
||||
function dav_addon_admin_post(&$a = null, &$o = null)
|
||||
{
|
||||
check_form_security_token_redirectOnErr('/admin/plugins/dav', 'dav_admin_save');
|
||||
check_form_security_token_redirectOnErr('/admin/addons/dav', 'dav_admin_save');
|
||||
|
||||
dav_include_files();
|
||||
require_once(__DIR__ . "/database-init.inc.php");
|
||||
|
||||
if (isset($_REQUEST["install"])) {
|
||||
$errs = dav_create_tables();
|
||||
if (count($errs) == 0) info(t('The database tables have been installed.') . EOL);
|
||||
else notice(t("An error occurred during the installation.") . EOL);
|
||||
if (count($errs) == 0) info(L10n::t('The database tables have been installed.') . EOL);
|
||||
else notice(L10n::t("An error occurred during the installation.") . EOL);
|
||||
}
|
||||
if (isset($_REQUEST["upgrade"])) {
|
||||
$errs = dav_upgrade_tables();
|
||||
if (count($errs) == 0) {
|
||||
renderAllCalDavEntries();
|
||||
info(t('The database tables have been updated.') . EOL);
|
||||
} else notice(t("An error occurred during the update.") . EOL);
|
||||
info(L10n::t('The database tables have been updated.') . EOL);
|
||||
} else notice(L10n::t("An error occurred during the update.") . EOL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -324,7 +329,7 @@ function dav_plugin_admin_post(&$a = null, &$o = null)
|
|||
* @param App $a
|
||||
* @param string $o
|
||||
*/
|
||||
function dav_plugin_admin(&$a, &$o)
|
||||
function dav_addon_admin(&$a, &$o)
|
||||
{
|
||||
dav_include_files();
|
||||
require_once(__DIR__ . "/database-init.inc.php");
|
||||
|
|
@ -332,31 +337,31 @@ function dav_plugin_admin(&$a, &$o)
|
|||
$dbstatus = dav_check_tables();
|
||||
|
||||
$o = '<input type="hidden" name="form_security_token" value="' . get_form_security_token("dav_admin_save") . '">';
|
||||
$o .= '<i>' . t("No system-wide settings yet.") . '</i><br><br>';
|
||||
$o .= '<i>' . L10n::t("No system-wide settings yet.") . '</i><br><br>';
|
||||
|
||||
|
||||
$o .= '<h3>' . t('Database status') . '</h3>';
|
||||
$o .= '<h3>' . L10n::t('Database status') . '</h3>';
|
||||
switch ($dbstatus) {
|
||||
case 0:
|
||||
$o .= t('Installed');
|
||||
$o .= L10n::t('Installed');
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
$o .= "<strong>" . t('Upgrade needed') . "</strong><br>" . t("Please back up all calendar data (the tables beginning with dav_*) before proceeding. While all calendar events <i>should</i> be converted to the new database structure, it's always safe to have a backup. Below, you can have a look at the database-queries that will be made when pressing the 'update'-button.") . "<br><br><input type='submit' name='upgrade' value='" . t('Upgrade') . "'>";
|
||||
$o .= "<strong>" . L10n::t('Upgrade needed') . "</strong><br>" . L10n::t("Please back up all calendar data (the tables beginning with dav_*) before proceeding. While all calendar events <i>should</i> be converted to the new database structure, it's always safe to have a backup. Below, you can have a look at the database-queries that will be made when pressing the 'update'-button.") . "<br><br><input type='submit' name='upgrade' value='" . L10n::t('Upgrade') . "'>";
|
||||
break;
|
||||
case -1:
|
||||
$o .= t('Not installed') . "<br><br><input type='submit' name='install' value='" . t('Install') . "'>";
|
||||
$o .= L10n::t('Not installed') . "<br><br><input type='submit' name='install' value='" . L10n::t('Install') . "'>";
|
||||
break;
|
||||
case -2:
|
||||
default:
|
||||
$o .= t('Unknown') . "<br><br>" . t("Something really went wrong. I cannot recover from this state automatically, sorry. Please go to the database backend, back up the data, and delete all tables beginning with 'dav_' manually. Afterwards, this installation routine should be able to reinitialize the tables automatically.");
|
||||
$o .= L10n::t('Unknown') . "<br><br>" . L10n::t("Something really went wrong. I cannot recover from this state automatically, sorry. Please go to the database backend, back up the data, and delete all tables beginning with 'dav_' manually. Afterwards, this installation routine should be able to reinitialize the tables automatically.");
|
||||
break;
|
||||
}
|
||||
$o .= "<br><br>";
|
||||
|
||||
$o .= "<h3>" . t("Troubleshooting") . "</h3>";
|
||||
$o .= "<h4>" . t("Manual creation of the database tables:") . "</h4>";
|
||||
$o .= "<a href='#' onClick='\$(\"#sqlstatements\").show(); return false;'>" . t("Show SQL-statements") . "</a><blockquote style='display: none;' id='sqlstatements'><pre>";
|
||||
$o .= "<h3>" . L10n::t("Troubleshooting") . "</h3>";
|
||||
$o .= "<h4>" . L10n::t("Manual creation of the database tables:") . "</h4>";
|
||||
$o .= "<a href='#' onClick='\$(\"#sqlstatements\").show(); return false;'>" . L10n::t("Show SQL-statements") . "</a><blockquote style='display: none;' id='sqlstatements'><pre>";
|
||||
switch ($dbstatus) {
|
||||
case 1: case 2:
|
||||
$tables = dav_get_update_statements($dbstatus);
|
||||
|
|
|
|||
2
dav/jqueryui/jquery.ui.datepicker-de.js
vendored
2
dav/jqueryui/jquery.ui.datepicker-de.js
vendored
|
|
@ -1,4 +1,4 @@
|
|||
/* German initialisation for the jQuery UI date picker plugin. */
|
||||
/* German initialisation for the jQuery UI date picker addon. */
|
||||
/* Written by Milian Wolff (mail@milianw.de). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['de'] = {
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ msgstr ""
|
|||
|
||||
#: friendica/main.php:202
|
||||
msgid ""
|
||||
"The current version of this plugin has not been set up correctly. Please "
|
||||
"The current version of this addon has not been set up correctly. Please "
|
||||
"contact the system administrator of your installation of friendica to fix "
|
||||
"this."
|
||||
msgstr ""
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "Avís";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Syncronització (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Sncronitzant aquest calendari amb el iPhone";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Sincronitzant els teus contactes a Friendica amb el iPhone";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["Calendar"] = "Calendari";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "Calendari ampliat amb suport CalDAV";
|
||||
$a->strings["noreply"] = "no contestar";
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ msgstr "Synchronizovat Vaše Friendica kontakty s iPhone"
|
|||
|
||||
#: friendica/main.php:202
|
||||
msgid ""
|
||||
"The current version of this plugin has not been set up correctly. Please "
|
||||
"The current version of this addon has not been set up correctly. Please "
|
||||
"contact the system administrator of your installation of friendica to fix "
|
||||
"this."
|
||||
msgstr "Stávající verze tohoto rozšíření nebyla správně nastavena. Prosím, kontaktujte administrátora webu, ať to opraví."
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ $a->strings["Warning"] = "Omezení";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Synchronizace (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Synchronizovat tento kalendář s iPhone";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Synchronizovat Vaše Friendica kontakty s iPhone";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "Stávající verze tohoto rozšíření nebyla správně nastavena. Prosím, kontaktujte administrátora webu, ať to opraví.";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "Stávající verze tohoto rozšíření nebyla správně nastavena. Prosím, kontaktujte administrátora webu, ať to opraví.";
|
||||
$a->strings["Calendar"] = "Kalendář";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "Rozšířený kalendář s podporou CalDAV";
|
||||
$a->strings["noreply"] = "bez odpovědi";
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ msgstr "Friendica-Kontakte mit dem iPhone synchronisieren"
|
|||
|
||||
#: friendica/main.php:202
|
||||
msgid ""
|
||||
"The current version of this plugin has not been set up correctly. Please "
|
||||
"The current version of this addon has not been set up correctly. Please "
|
||||
"contact the system administrator of your installation of friendica to fix "
|
||||
"this."
|
||||
msgstr "Die aktuelle Version dieses Plugins wurde nicht korrekt eingestellt. Bitte kontaktiere den System-Administrator deiner Friendica Installation um den Fehler zu beheben."
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ $a->strings["Warning"] = "Warnung";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Synchronisation (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Diesen Kalender mit dem iPhone synchronisieren";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Friendica-Kontakte mit dem iPhone synchronisieren";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "Die aktuelle Version dieses Plugins wurde nicht korrekt eingestellt. Bitte kontaktiere den System-Administrator deiner Friendica Installation um den Fehler zu beheben.";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "Die aktuelle Version dieses Plugins wurde nicht korrekt eingestellt. Bitte kontaktiere den System-Administrator deiner Friendica Installation um den Fehler zu beheben.";
|
||||
$a->strings["Calendar"] = "Kalender";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "Erweiterter Kalender mit CalDAV Unterstützung.";
|
||||
$a->strings["noreply"] = "noreply";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "Averto";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Sinkronigo (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Sinkronigi tiun kalendaron kun la iPhone";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Sinkronigi viajn Friendica kontaktojn kun la iPhone";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["Calendar"] = "Kalendaro";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "Etendita kalendaro kun CalDAV subteno";
|
||||
$a->strings["noreply"] = "nerespondi";
|
||||
|
|
|
|||
|
|
@ -186,10 +186,10 @@ msgstr "Sincronizar sus contactos de Friendica con el iPhone"
|
|||
|
||||
#: friendica/main.php:202
|
||||
msgid ""
|
||||
"The current version of this plugin has not been set up correctly. Please "
|
||||
"The current version of this addon has not been set up correctly. Please "
|
||||
"contact the system administrator of your installation of friendica to fix "
|
||||
"this."
|
||||
msgstr "La versión actual de este plugin no se ha instalado correctamente. Por favor contacte con el administrador del sistema de su instalación de Friendica para resolver esto."
|
||||
msgstr "La versión actual de este addon no se ha instalado correctamente. Por favor contacte con el administrador del sistema de su instalación de Friendica para resolver esto."
|
||||
|
||||
#: friendica/main.php:239 common/wdcal_edit.inc.php:146
|
||||
msgid "Calendar"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ $a->strings["Warning"] = "Advertencia";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Sincronización (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Sincronizar este calendario con el iPhone";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Sincronizar sus contactos de Friendica con el iPhone";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "La versión actual de este plugin no se ha instalado correctamente. Por favor contacte con el administrador del sistema de su instalación de Friendica para resolver esto.";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "La versión actual de este addon no se ha instalado correctamente. Por favor contacte con el administrador del sistema de su instalación de Friendica para resolver esto.";
|
||||
$a->strings["Calendar"] = "Calendario";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "Estendido el calendario con soporte CalDAV";
|
||||
$a->strings["noreply"] = "no responder";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "Avertissement";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Synchronisation (Iphone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Synchronisation avec l'Iphone en cours";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Synchronisation de vos contacts Friendica avec l'Iphone en cours";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "La version actuelle de cette extension n'a pas été configurée correctement. Merci de contacter votre administrateur Friendica pour régler ce problème. ";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "La version actuelle de cette extension n'a pas été configurée correctement. Merci de contacter votre administrateur Friendica pour régler ce problème. ";
|
||||
$a->strings["Calendar"] = "Calendrier";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "Calendrier étendu avec support CalDAV";
|
||||
$a->strings["noreply"] = "noreply";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["Calendar"] = "";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "";
|
||||
$a->strings["noreply"] = "ekki svara";
|
||||
|
|
|
|||
|
|
@ -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: 2013-02-27 05:01-0500\n"
|
||||
"PO-Revision-Date: 2015-12-14 11:10+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"
|
||||
|
|
@ -185,10 +185,10 @@ msgstr "Sincronizzare i tuoi contatti di Friendica con l'iPhone"
|
|||
|
||||
#: friendica/main.php:202
|
||||
msgid ""
|
||||
"The current version of this plugin has not been set up correctly. Please "
|
||||
"The current version of this addon has not been set up correctly. Please "
|
||||
"contact the system administrator of your installation of friendica to fix "
|
||||
"this."
|
||||
msgstr "La versione corrente di questo plugin non è stata configurata correttamente. Contatta l'amministratore."
|
||||
msgstr "La versione corrente di questo componente aggiuntivo non è stata configurata correttamente. Contatta l'amministratore."
|
||||
|
||||
#: friendica/main.php:239 common/wdcal_edit.inc.php:146
|
||||
msgid "Calendar"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ $a->strings["Warning"] = "Attenzione";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Sincronizzazione (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Sincronizzare questo calendario con l'iPhone";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Sincronizzare i tuoi contatti di Friendica con l'iPhone";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "La versione corrente di questo plugin non è stata configurata correttamente. Contatta l'amministratore.";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "La versione corrente di questo componente aggiuntivo non è stata configurata correttamente. Contatta l'amministratore.";
|
||||
$a->strings["Calendar"] = "Calendario";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "Calendario esteso con supporto CalDAV";
|
||||
$a->strings["noreply"] = "nonrispondere";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["Calendar"] = "";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "";
|
||||
$a->strings["noreply"] = "ikke svar";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "Ostrzeżenie";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Synchronizacja (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Zsynchronizuj kalendarz z iPhone";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Zsynchronizuj kontakty friendica z iPhone";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["Calendar"] = "Kalendarz";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "";
|
||||
$a->strings["noreply"] = "brak odpowiedzi";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "Aviso";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Sincronização (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Sincronização desta agenda com o iPhone";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Sincronização dos seus contatos Friendica com o iPhone";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["Calendar"] = "Agenda";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "";
|
||||
$a->strings["noreply"] = "naoresponda";
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ msgstr "Sincronizați contactele Friendica cu iPhone"
|
|||
|
||||
#: friendica/main.php:202
|
||||
msgid ""
|
||||
"The current version of this plugin has not been set up correctly. Please "
|
||||
"The current version of this addon has not been set up correctly. Please "
|
||||
"contact the system administrator of your installation of friendica to fix "
|
||||
"this."
|
||||
msgstr "Versiunea curentă a acestui modul nu a fost corect configurată. Vă rugăm să contactați administratorul de sistem al aplicației dvs. friendica, pentru a corecta această situație."
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ $a->strings["Warning"] = "Atenție";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Sincronizare (iPhone, Thunderbird Lightning, Android, ...)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "Sincronizați acest calendar cu iPhone";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Sincronizați contactele Friendica cu iPhone";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "Versiunea curentă a acestui modul nu a fost corect configurată. Vă rugăm să contactați administratorul de sistem al aplicației dvs. friendica, pentru a corecta această situație.";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "Versiunea curentă a acestui modul nu a fost corect configurată. Vă rugăm să contactați administratorul de sistem al aplicației dvs. friendica, pentru a corecta această situație.";
|
||||
$a->strings["Calendar"] = "Calendar";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "Calendar extins cu suport-CalDAV";
|
||||
$a->strings["noreply"] = "nu-răspunde";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "";
|
||||
$a->strings["Calendar"] = "";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "";
|
||||
$a->strings["noreply"] = "без ответа";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $a->strings["Warning"] = "警告";
|
|||
$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "同步(iPhone,Thunderbird Lightning, 案桌,等)";
|
||||
$a->strings["Synchronizing this calendar with the iPhone"] = "正在把这个日历跟iPhone同步";
|
||||
$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "正在把您的Friendica熟人跟iPhone同步";
|
||||
$a->strings["The current version of this plugin has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "现有的插件没安装好。请跟系统管理您的friendica安装联系为维修。";
|
||||
$a->strings["The current version of this addon has not been set up correctly. Please contact the system administrator of your installation of friendica to fix this."] = "现有的插件没安装好。请跟系统管理您的friendica安装联系为维修。";
|
||||
$a->strings["Calendar"] = "日历";
|
||||
$a->strings["Extended calendar with CalDAV-support"] = "增能日历跟CalDAV支持";
|
||||
$a->strings["noreply"] = "noreply";
|
||||
|
|
|
|||
|
|
@ -7,23 +7,29 @@
|
|||
* Author: Michael Vogel <heluecht@pirati.ca>
|
||||
*/
|
||||
|
||||
require_once("addon/diaspora/Diaspora_Connection.php");
|
||||
require_once 'addon/diaspora/Diaspora_Connection.php';
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Queue;
|
||||
|
||||
function diaspora_install() {
|
||||
register_hook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
|
||||
register_hook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
|
||||
register_hook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
|
||||
register_hook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
|
||||
register_hook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
|
||||
register_hook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
|
||||
Addon::registerHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
|
||||
Addon::registerHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
|
||||
Addon::registerHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
|
||||
Addon::registerHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
|
||||
Addon::registerHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
|
||||
Addon::registerHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
|
||||
}
|
||||
function diaspora_uninstall() {
|
||||
unregister_hook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
|
||||
unregister_hook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
|
||||
unregister_hook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
|
||||
unregister_hook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
|
||||
unregister_hook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
|
||||
unregister_hook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
|
||||
Addon::unregisterHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
|
||||
Addon::unregisterHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
|
||||
Addon::unregisterHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
|
||||
Addon::unregisterHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
|
||||
Addon::unregisterHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
|
||||
Addon::unregisterHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -36,7 +42,7 @@ function diaspora_jot_nets(&$a,&$b) {
|
|||
$diaspora_defpost = get_pconfig(local_user(),'diaspora','post_by_default');
|
||||
$selected = ((intval($diaspora_defpost) == 1) ? ' checked="checked" ' : '');
|
||||
$b .= '<div class="profile-jot-net"><input type="checkbox" name="diaspora_enable"' . $selected . ' value="1" /> '
|
||||
. t('Post to Diaspora') . '</div>';
|
||||
. L10n::t('Post to Diaspora') . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -49,8 +55,6 @@ function diaspora_queue_hook(&$a,&$b) {
|
|||
if(! count($qi))
|
||||
return;
|
||||
|
||||
require_once('include/queue_fn.php');
|
||||
|
||||
foreach($qi as $x) {
|
||||
if($x['network'] !== NETWORK_DIASPORA2)
|
||||
continue;
|
||||
|
|
@ -90,20 +94,21 @@ function diaspora_queue_hook(&$a,&$b) {
|
|||
$conn->provider = $hostname;
|
||||
$conn->postStatusMessage($post, $aspect);
|
||||
|
||||
logger('diaspora_queue: send '.$userdata['uid'].' success', LOGGER_DEBUG);
|
||||
logger('diaspora_queue: send '.$userdata['uid'].' success', LOGGER_DEBUG);
|
||||
|
||||
$success = true;
|
||||
$success = true;
|
||||
|
||||
remove_queue_item($x['id']);
|
||||
Queue::removeItem($x['id']);
|
||||
} catch (Exception $e) {
|
||||
logger("diaspora_queue: Send ".$userdata['uid']." failed: ".$e->getMessage(), LOGGER_DEBUG);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
logger('diaspora_queue: send '.$userdata['uid'].' missing username or password', LOGGER_DEBUG);
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
logger('diaspora_queue: delayed');
|
||||
update_queue_time($x['id']);
|
||||
Queue::updateTime($x['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -134,10 +139,10 @@ function diaspora_settings(&$a,&$s) {
|
|||
$status = "";
|
||||
|
||||
$r = q("SELECT `addr` FROM `contact` WHERE `self` AND `uid` = %d", intval(local_user()));
|
||||
if (dbm::is_result($r)) {
|
||||
$status = sprintf(t("Please remember: You can always be reached from Diaspora with your Friendica handle %s. "), $r[0]['addr']);
|
||||
$status .= t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
|
||||
$status .= sprintf(t('However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'), $r[0]['addr']);
|
||||
if (DBM::is_result($r)) {
|
||||
$status = L10n::t("Please remember: You can always be reached from Diaspora with your Friendica handle %s. ", $r[0]['addr']);
|
||||
$status .= L10n::t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
|
||||
$status .= L10n::t('However, it is preferred that you tell your Diaspora contacts the new handle %s instead.', $r[0]['addr']);
|
||||
}
|
||||
|
||||
$aspects = false;
|
||||
|
|
@ -147,18 +152,18 @@ function diaspora_settings(&$a,&$s) {
|
|||
$conn->logIn();
|
||||
$aspects = $conn->getAspects();
|
||||
if (!$aspects) {
|
||||
$status = t("Can't login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.");
|
||||
$status = L10n::t("Can't login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.");
|
||||
}
|
||||
}
|
||||
|
||||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_diaspora_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_diaspora_expanded\'); openClose(\'settings_diaspora_inflated\');">';
|
||||
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. t('Diaspora Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. L10n::t('Diaspora Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_diaspora_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_diaspora_expanded\'); openClose(\'settings_diaspora_inflated\');">';
|
||||
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. t('Diaspora Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. L10n::t('Diaspora Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
if ($status) {
|
||||
|
|
@ -168,32 +173,32 @@ function diaspora_settings(&$a,&$s) {
|
|||
}
|
||||
|
||||
$s .= '<div id="diaspora-enable-wrapper">';
|
||||
$s .= '<label id="diaspora-enable-label" for="diaspora-checkbox">' . t('Enable Diaspora Post Plugin') . '</label>';
|
||||
$s .= '<label id="diaspora-enable-label" for="diaspora-checkbox">' . L10n::t('Enable Diaspora Post Addon') . '</label>';
|
||||
$s .= '<input id="diaspora-checkbox" type="checkbox" name="diaspora" value="1" ' . $checked . '/>';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
$s .= '<div id="diaspora-username-wrapper">';
|
||||
$s .= '<label id="diaspora-username-label" for="diaspora-username">' . t('Diaspora handle') . '</label>';
|
||||
$s .= '<label id="diaspora-username-label" for="diaspora-username">' . L10n::t('Diaspora handle') . '</label>';
|
||||
$s .= '<input id="diaspora-username" type="text" name="handle" value="' . $handle . '" />';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
$s .= '<div id="diaspora-password-wrapper">';
|
||||
$s .= '<label id="diaspora-password-label" for="diaspora-password">' . t('Diaspora password') . '</label>';
|
||||
$s .= '<label id="diaspora-password-label" for="diaspora-password">' . L10n::t('Diaspora password') . '</label>';
|
||||
$s .= '<input id="diaspora-password" type="password" name="password" value="' . $password . '" />';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
if ($aspects) {
|
||||
$single_aspect = new stdClass();
|
||||
$single_aspect->id = 'all_aspects';
|
||||
$single_aspect->name = t('All aspects');
|
||||
$single_aspect->name = L10n::t('All aspects');
|
||||
$aspects[] = $single_aspect;
|
||||
|
||||
$single_aspect = new stdClass();
|
||||
$single_aspect->id = 'public';
|
||||
$single_aspect->name = t('Public');
|
||||
$single_aspect->name = L10n::t('Public');
|
||||
$aspects[] = $single_aspect;
|
||||
|
||||
$s .= '<label id="diaspora-aspect-label" for="diaspora-aspect">' . t('Post to aspect:') . '</label>';
|
||||
$s .= '<label id="diaspora-aspect-label" for="diaspora-aspect">' . L10n::t('Post to aspect:') . '</label>';
|
||||
$s .= '<select name="aspect" id="diaspora-aspect">';
|
||||
foreach($aspects as $single_aspect) {
|
||||
if ($single_aspect->id == $aspect)
|
||||
|
|
@ -207,13 +212,13 @@ function diaspora_settings(&$a,&$s) {
|
|||
}
|
||||
|
||||
$s .= '<div id="diaspora-bydefault-wrapper">';
|
||||
$s .= '<label id="diaspora-bydefault-label" for="diaspora-bydefault">' . t('Post to Diaspora by default') . '</label>';
|
||||
$s .= '<label id="diaspora-bydefault-label" for="diaspora-bydefault">' . L10n::t('Post to Diaspora by default') . '</label>';
|
||||
$s .= '<input id="diaspora-bydefault" type="checkbox" name="diaspora_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="diaspora-submit" name="diaspora-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="diaspora-submit" name="diaspora-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -323,7 +328,7 @@ function diaspora_send(&$a,&$b) {
|
|||
} while ($oldbody != $body);
|
||||
|
||||
// convert to markdown
|
||||
$body = bb2diaspora($body, false, true);
|
||||
$body = bb2diaspora($body);
|
||||
|
||||
// Adding the title
|
||||
if(strlen($title))
|
||||
|
|
@ -351,10 +356,10 @@ function diaspora_send(&$a,&$b) {
|
|||
if (count($r))
|
||||
$a->contact = $r[0]["id"];
|
||||
|
||||
$s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $body));
|
||||
require_once('include/queue_fn.php');
|
||||
add_to_queue($a->contact,NETWORK_DIASPORA2,$s);
|
||||
notice(t('Diaspora post failed. Queued for retry.').EOL);
|
||||
$s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $body]);
|
||||
|
||||
Queue::add($a->contact, NETWORK_DIASPORA2, $s);
|
||||
notice(L10n::t('Diaspora post failed. Queued for retry.').EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ msgid "Diaspora Export"
|
|||
msgstr ""
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr ""
|
||||
|
||||
#: diaspora.php:168
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ msgid "Diaspora Export"
|
|||
msgstr "Diaspora export"
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgstr "Povolit Diaspora Plugin"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "Povolit Diaspora Addon"
|
||||
|
||||
#: diaspora.php:168
|
||||
msgid "Diaspora username"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function string_plural_select_cs($n){
|
|||
$a->strings["Post to Diaspora"] = "Příspěvek na Diaspora";
|
||||
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Nelze se přihlásit na váš Diaspora účet. Prosím ověřte své uživatelské jméno a heslo a ujistěte se, že jste použili kompletní adresu (včetně http...)";
|
||||
$a->strings["Diaspora Export"] = "Diaspora export";
|
||||
$a->strings["Enable Diaspora Post Plugin"] = "Povolit Diaspora Plugin";
|
||||
$a->strings["Enable Diaspora Post Addon"] = "Povolit Diaspora Addon";
|
||||
$a->strings["Diaspora username"] = "Diaspora uživatelské jméno";
|
||||
$a->strings["Diaspora password"] = "Diaspora heslo";
|
||||
$a->strings["Diaspora site URL"] = "Adresa webu Diaspora";
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ msgid "Diaspora Export"
|
|||
msgstr "Diaspora Export"
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "Veröffentlichungen bei Diaspora erlauben"
|
||||
|
||||
#: diaspora.php:168
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function string_plural_select_de($n){
|
|||
$a->strings["Post to Diaspora"] = "Auf Diaspora veröffentlichen";
|
||||
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Anmeldung bei deinem Diaspora Account fehlgeschlagen. Bitte überprüfe Nutzername und Passwort und stelle sicher, dass die komplette Adresse (inklusive des htto...) verwendet wurde.";
|
||||
$a->strings["Diaspora Export"] = "Diaspora Export";
|
||||
$a->strings["Enable Diaspora Post Plugin"] = "Veröffentlichungen bei Diaspora erlauben";
|
||||
$a->strings["Enable Diaspora Post Addon"] = "Veröffentlichungen bei Diaspora erlauben";
|
||||
$a->strings["Diaspora username"] = "Diaspora Nutzername";
|
||||
$a->strings["Diaspora password"] = "Diaspora Passwort";
|
||||
$a->strings["Diaspora site URL"] = "URL der Diaspora Seite";
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ msgid "Diaspora Export"
|
|||
msgstr "Exportar a Diaspora*"
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgstr "Habilitar publicar a traves de Diaspora* plugin."
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "Habilitar publicar a traves de Diaspora* addon."
|
||||
|
||||
#: diaspora.php:168
|
||||
msgid "Diaspora username"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function string_plural_select_es($n){
|
|||
$a->strings["Post to Diaspora"] = "Publicar hacia Diaspora*";
|
||||
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "No se puede ingresar a tu cuenta de Diaspora*. Por favor verificar nombre de usuario, contraseña y asegura de usar la dirección completa, incluyendo https.. .";
|
||||
$a->strings["Diaspora Export"] = "Exportar a Diaspora*";
|
||||
$a->strings["Enable Diaspora Post Plugin"] = "Habilitar publicar a traves de Diaspora* plugin.";
|
||||
$a->strings["Enable Diaspora Post Addon"] = "Habilitar publicar a traves de Diaspora* addon.";
|
||||
$a->strings["Diaspora username"] = "Nombre de usuario de Diaspora*.";
|
||||
$a->strings["Diaspora password"] = "Contraseña Diaspora*";
|
||||
$a->strings["Diaspora site URL"] = "URL sitio Diaspora*";
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ msgid "Diaspora Export"
|
|||
msgstr "Export Diaspora"
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "Activer l’extension « Publier sur Diaspora »"
|
||||
|
||||
#: diaspora.php:168
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function string_plural_select_fr($n){
|
|||
$a->strings["Post to Diaspora"] = "Publier sur Diaspora";
|
||||
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Impossible de se connecter à votre compte Diaspora. Veuillez vérifier votre identifiant et votre mot de passe, et assurez-vous d’avoir indiqué l’adresse complète (y compris le « http:// » initial).";
|
||||
$a->strings["Diaspora Export"] = "Export Diaspora";
|
||||
$a->strings["Enable Diaspora Post Plugin"] = "Activer l’extension « Publier sur Diaspora »";
|
||||
$a->strings["Enable Diaspora Post Addon"] = "Activer l’extension « Publier sur Diaspora »";
|
||||
$a->strings["Diaspora username"] = "Identifiant Diaspora";
|
||||
$a->strings["Diaspora password"] = "Mot de passe Diaspora";
|
||||
$a->strings["Diaspora site URL"] = "Adresse du site Diaspora";
|
||||
|
|
|
|||
|
|
@ -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 11:57+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"
|
||||
|
|
@ -34,8 +34,8 @@ msgid "Diaspora Export"
|
|||
msgstr "Esporta Diaspora"
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgstr "Abilita il plugin di invio a Diaspora"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "Abilita il componente aggiuntivo di invio a Diaspora"
|
||||
|
||||
#: diaspora.php:168
|
||||
msgid "Diaspora username"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function string_plural_select_it($n){
|
|||
$a->strings["Post to Diaspora"] = "Invia a Diaspora";
|
||||
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Non riesco ad autenticarmi con il tuo account Diaspora. Controlla il nome utente e la password e assicurati di aver usato l'indirizzo completo (compreso \"http\" o \"https\")";
|
||||
$a->strings["Diaspora Export"] = "Esporta Diaspora";
|
||||
$a->strings["Enable Diaspora Post Plugin"] = "Abilita il plugin di invio a Diaspora";
|
||||
$a->strings["Enable Diaspora Post Addon"] = "Abilita il componente aggiuntivo di invio a Diaspora";
|
||||
$a->strings["Diaspora username"] = "Nome utente Diaspora";
|
||||
$a->strings["Diaspora password"] = "Password Diaspora";
|
||||
$a->strings["Diaspora site URL"] = "Indirizzo sito Diaspora";
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ msgid "Diaspora Export"
|
|||
msgstr ""
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "Habilitar plug-in para publicar na Diaspora"
|
||||
|
||||
#: diaspora.php:168
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ msgid "Diaspora Export"
|
|||
msgstr "Exportare pe Diaspora "
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "Activare Modul Postare pe Diaspora"
|
||||
|
||||
#: diaspora.php:168
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function string_plural_select_ro($n){
|
|||
$a->strings["Post to Diaspora"] = "Postați pe Diaspora";
|
||||
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Nu se poate face autentificarea pe contul dvs. Diaspora. Verificați numele de utilizator şi parola şi asigurați-vă că ați folosit adresa completă (inclusiv http ... )";
|
||||
$a->strings["Diaspora Export"] = "Exportare pe Diaspora ";
|
||||
$a->strings["Enable Diaspora Post Plugin"] = "Activare Modul Postare pe Diaspora";
|
||||
$a->strings["Enable Diaspora Post Addon"] = "Activare Modul Postare pe Diaspora";
|
||||
$a->strings["Diaspora username"] = "Utilizator Diaspora";
|
||||
$a->strings["Diaspora password"] = "Parola Diaspora";
|
||||
$a->strings["Diaspora site URL"] = "URL site Diaspora";
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ msgid "Diaspora Export"
|
|||
msgstr "Экспорт в Diaspora"
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "Включить плагин отправки сообщений в Diaspora"
|
||||
|
||||
#: diaspora.php:168
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function string_plural_select_ru($n){
|
|||
$a->strings["Post to Diaspora"] = "Отправить в Diaspora";
|
||||
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Невозможно войти в вашу учетную запись Diaspora. Пожалуйста, проверьте имя пользователя, пароль и убедитесь, что вы ввели полный адрес пода (включая http/https)";
|
||||
$a->strings["Diaspora Export"] = "Экспорт в Diaspora";
|
||||
$a->strings["Enable Diaspora Post Plugin"] = "Включить плагин отправки сообщений в Diaspora";
|
||||
$a->strings["Enable Diaspora Post Addon"] = "Включить плагин отправки сообщений в Diaspora";
|
||||
$a->strings["Diaspora username"] = "Имя пользователя Diaspora";
|
||||
$a->strings["Diaspora password"] = "Пароль Diaspora";
|
||||
$a->strings["Diaspora site URL"] = "URL пода Diaspora";
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ msgid "Diaspora Export"
|
|||
msgstr "Diaspora 导出"
|
||||
|
||||
#: diaspora.php:163
|
||||
msgid "Enable Diaspora Post Plugin"
|
||||
msgid "Enable Diaspora Post Addon"
|
||||
msgstr "启用 Diaspora 发文插件"
|
||||
|
||||
#: diaspora.php:168
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function string_plural_select_zh_cn($n){
|
|||
$a->strings["Post to Diaspora"] = "发到 Diaspora";
|
||||
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "无法登录到你的 Diaspora 账户。请检查用户名和密码并确保你用了完整的地址(包括http...)";
|
||||
$a->strings["Diaspora Export"] = "Diaspora 导出";
|
||||
$a->strings["Enable Diaspora Post Plugin"] = "启用 Diaspora 发文插件";
|
||||
$a->strings["Enable Diaspora Post Addon"] = "启用 Diaspora 发文插件";
|
||||
$a->strings["Diaspora username"] = "Diaspora 用户名";
|
||||
$a->strings["Diaspora password"] = "Diaspora 密码";
|
||||
$a->strings["Diaspora site URL"] = "Diaspora 站点 URL";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Name: Dreamwidth Post Connector
|
||||
* Description: Post to dreamwidth
|
||||
|
|
@ -9,20 +8,27 @@
|
|||
* Author: Cat Gray <https://free-haven.org/profile/catness>
|
||||
*/
|
||||
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
function dwpost_install() {
|
||||
register_hook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
|
||||
register_hook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
|
||||
register_hook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
|
||||
register_hook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
|
||||
register_hook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
|
||||
Addon::registerHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
|
||||
Addon::registerHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
|
||||
Addon::registerHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
|
||||
Addon::registerHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
|
||||
Addon::registerHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
|
||||
|
||||
}
|
||||
function dwpost_uninstall() {
|
||||
unregister_hook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
|
||||
unregister_hook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
|
||||
unregister_hook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
|
||||
unregister_hook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
|
||||
unregister_hook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
|
||||
Addon::unregisterHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
|
||||
Addon::unregisterHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
|
||||
Addon::unregisterHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
|
||||
Addon::unregisterHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
|
||||
Addon::unregisterHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +42,7 @@ function dwpost_jot_nets(&$a,&$b) {
|
|||
$dw_defpost = get_pconfig(local_user(),'dwpost','post_by_default');
|
||||
$selected = ((intval($dw_defpost) == 1) ? ' checked="checked" ' : '');
|
||||
$b .= '<div class="profile-jot-net"><input type="checkbox" name="dwpost_enable" ' . $selected . ' value="1" /> '
|
||||
. t('Post to Dreamwidth') . '</div>';
|
||||
. L10n::t('Post to Dreamwidth') . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,36 +73,36 @@ function dwpost_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_dwpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_dwpost_expanded\'); openClose(\'settings_dwpost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. t("Dreamwidth Export").'</h3>';
|
||||
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. L10n::t("Dreamwidth Export").'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_dwpost_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_dwpost_expanded\'); openClose(\'settings_dwpost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. t("Dreamwidth Export").'</h3>';
|
||||
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. L10n::t("Dreamwidth Export").'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div id="dwpost-enable-wrapper">';
|
||||
$s .= '<label id="dwpost-enable-label" for="dwpost-checkbox">' . t('Enable dreamwidth Post Plugin') . '</label>';
|
||||
$s .= '<label id="dwpost-enable-label" for="dwpost-checkbox">' . L10n::t('Enable dreamwidth Post Addon') . '</label>';
|
||||
$s .= '<input id="dwpost-checkbox" type="checkbox" name="dwpost" value="1" ' . $checked . '/>';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
$s .= '<div id="dwpost-username-wrapper">';
|
||||
$s .= '<label id="dwpost-username-label" for="dwpost-username">' . t('dreamwidth username') . '</label>';
|
||||
$s .= '<label id="dwpost-username-label" for="dwpost-username">' . L10n::t('dreamwidth username') . '</label>';
|
||||
$s .= '<input id="dwpost-username" type="text" name="dw_username" value="' . $dw_username . '" />';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
$s .= '<div id="dwpost-password-wrapper">';
|
||||
$s .= '<label id="dwpost-password-label" for="dwpost-password">' . t('dreamwidth password') . '</label>';
|
||||
$s .= '<label id="dwpost-password-label" for="dwpost-password">' . L10n::t('dreamwidth password') . '</label>';
|
||||
$s .= '<input id="dwpost-password" type="password" name="dw_password" value="' . $dw_password . '" />';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
$s .= '<div id="dwpost-bydefault-wrapper">';
|
||||
$s .= '<label id="dwpost-bydefault-label" for="dwpost-bydefault">' . t('Post to dreamwidth by default') . '</label>';
|
||||
$s .= '<label id="dwpost-bydefault-label" for="dwpost-bydefault">' . L10n::t('Post to dreamwidth by default') . '</label>';
|
||||
$s .= '<input id="dwpost-bydefault" type="checkbox" name="dw_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="dwpost-submit" name="dwpost-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="dwpost-submit" name="dwpost-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -173,16 +179,12 @@ function dwpost_send(&$a,&$b) {
|
|||
$dw_blog = 'http://www.dreamwidth.org/interface/xmlrpc';
|
||||
|
||||
if($dw_username && $dw_password && $dw_blog) {
|
||||
|
||||
require_once('include/bbcode.php');
|
||||
require_once('include/datetime.php');
|
||||
|
||||
$title = $b['title'];
|
||||
$post = bbcode($b['body']);
|
||||
$post = BBCode::convert($b['body']);
|
||||
$post = xmlify($post);
|
||||
$tags = dwpost_get_tags($b['tag']);
|
||||
|
||||
$date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s');
|
||||
$date = DateTimeFormat::convert($b['created'], $tz);
|
||||
$year = intval(substr($date,0,4));
|
||||
$mon = intval(substr($date,5,2));
|
||||
$day = intval(substr($date,8,2));
|
||||
|
|
@ -218,10 +220,10 @@ EOT;
|
|||
|
||||
logger('dwpost: data: ' . $xml, LOGGER_DATA);
|
||||
|
||||
if($dw_blog !== 'test')
|
||||
$x = post_url($dw_blog,$xml,array("Content-Type: text/xml"));
|
||||
if($dw_blog !== 'test') {
|
||||
$x = Network::post($dw_blog, $xml, ["Content-Type: text/xml"]);
|
||||
}
|
||||
logger('posted to dreamwidth: ' . ($x) ? $x : '', LOGGER_DEBUG);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ msgid "Dreamwidth Post Settings"
|
|||
msgstr ""
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr ""
|
||||
|
||||
#: dwpost.php:77
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to Dreamwidth"] = "Missatge a Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Configuració d'enviaments a Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Habilitat el plugin d'enviaments a Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Habilitat el addon d'enviaments a Dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Nom d'usuari a Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Contrasenya a Dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Enviar per defecte a Dreamwidth";
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ msgid "Dreamwidth Post Settings"
|
|||
msgstr "Dreamwidth nastavení příspěvků"
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgstr "Povolit dreamwidth Plugin"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr "Povolit dreamwidth Addon"
|
||||
|
||||
#: dwpost.php:77
|
||||
msgid "dreamwidth username"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function string_plural_select_cs($n){
|
|||
;
|
||||
$a->strings["Post to Dreamwidth"] = "Poslat na Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Dreamwidth nastavení příspěvků";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Povolit dreamwidth Plugin";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Povolit dreamwidth Addon";
|
||||
$a->strings["dreamwidth username"] = "dreamwidth uživatelské jméno";
|
||||
$a->strings["dreamwidth password"] = "dreamwidth heslo";
|
||||
$a->strings["Post to dreamwidth by default"] = "Defaultně umístit na dreamwidth";
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ msgid "Dreamwidth Post Settings"
|
|||
msgstr "Dreamwidth Veröffentlichungs-Einstellungen"
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgstr "Dreamwidth Post Plugin aktivieren"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr "Dreamwidth Post Addon aktivieren"
|
||||
|
||||
#: dwpost.php:77
|
||||
msgid "dreamwidth username"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function string_plural_select_de($n){
|
|||
;
|
||||
$a->strings["Post to Dreamwidth"] = "In Dreamwidth veröffentlichen";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Dreamwidth Veröffentlichungs-Einstellungen";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Dreamwidth Post Plugin aktivieren";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Dreamwidth Post Addon aktivieren";
|
||||
$a->strings["dreamwidth username"] = "Dreamwidth Benutzername";
|
||||
$a->strings["dreamwidth password"] = "Dreamwidth Passwort";
|
||||
$a->strings["Post to dreamwidth by default"] = "Standardmäßig bei Dreamwidth veröffentlichen";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to Dreamwidth"] = "Afiŝi al Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Agordoj por Afiŝoj al Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Ŝalti la Dreamwidth Kromprogramon";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Ŝalti la Dreamwidth Kromprogramon";
|
||||
$a->strings["dreamwidth username"] = "Dreamwidth salutnomo";
|
||||
$a->strings["dreamwidth password"] = "Dreamwidth pasvorto";
|
||||
$a->strings["Post to dreamwidth by default"] = "Defaŭlte afiŝi al Dreamwidth";
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ msgid "Dreamwidth Post Settings"
|
|||
msgstr "Ajustes de publicación de Dreamwidth"
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgstr "Activar el plugin de publicación dreamwidth"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr "Activar el addon de publicación dreamwidth"
|
||||
|
||||
#: dwpost.php:77
|
||||
msgid "dreamwidth username"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function string_plural_select_es($n){
|
|||
;
|
||||
$a->strings["Post to Dreamwidth"] = "Publicar en Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Ajustes de publicación de Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Activar el plugin de publicación dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Activar el addon de publicación dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Nombre de usuario de dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Contraseña de dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Publicar en dreamwidth por defecto";
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ msgid "Dreamwidth Post Settings"
|
|||
msgstr "Paramètres pour Dreamwidth"
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr ""
|
||||
|
||||
#: dwpost.php:77
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function string_plural_select_fr($n){
|
|||
;
|
||||
$a->strings["Post to Dreamwidth"] = "Publier sur Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Paramètres pour Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "";
|
||||
$a->strings["dreamwidth username"] = "Nom d'utilisateur Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Mot de passe dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Poster sur Dreamwidth par défaut";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to Dreamwidth"] = "";
|
||||
$a->strings["Dreamwidth Post Settings"] = "";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "";
|
||||
$a->strings["dreamwidth username"] = "";
|
||||
$a->strings["dreamwidth password"] = "";
|
||||
$a->strings["Post to dreamwidth by default"] = "";
|
||||
|
|
|
|||
|
|
@ -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: 2013-02-27 05:01-0500\n"
|
||||
"PO-Revision-Date: 2014-10-22 07:54+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"
|
||||
|
|
@ -21,15 +21,15 @@ msgstr ""
|
|||
|
||||
#: dwpost.php:39
|
||||
msgid "Post to Dreamwidth"
|
||||
msgstr "Posta su Dreamwidth"
|
||||
msgstr "Invia a Dreamwidth"
|
||||
|
||||
#: dwpost.php:70
|
||||
msgid "Dreamwidth Post Settings"
|
||||
msgstr "Impostazioni di invio a Dreamwidth"
|
||||
msgstr "Impostazioni Invio a Dreeamwidth"
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgstr "Abilita il plugin di invio a Dreamwidth"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr "Abilita il componente aggiuntivo di invio a Dreamwidth"
|
||||
|
||||
#: dwpost.php:77
|
||||
msgid "dreamwidth username"
|
||||
|
|
@ -45,4 +45,4 @@ msgstr "Invia sempre a Dreamwidth"
|
|||
|
||||
#: dwpost.php:93
|
||||
msgid "Submit"
|
||||
msgstr "Invia"
|
||||
msgstr "Salva"
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ function string_plural_select_it($n){
|
|||
return ($n != 1);;
|
||||
}}
|
||||
;
|
||||
$a->strings["Post to Dreamwidth"] = "Posta su Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Impostazioni di invio a Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Abilita il plugin di invio a Dreamwidth";
|
||||
$a->strings["Post to Dreamwidth"] = "Invia a Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Impostazioni Invio a Dreeamwidth";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Abilita il componente aggiuntivo di invio a Dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Nome utente Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "password Dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Invia sempre a Dreamwidth";
|
||||
$a->strings["Submit"] = "Invia";
|
||||
$a->strings["Submit"] = "Salva";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to Dreamwidth"] = "";
|
||||
$a->strings["Dreamwidth Post Settings"] = "";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "";
|
||||
$a->strings["dreamwidth username"] = "";
|
||||
$a->strings["dreamwidth password"] = "";
|
||||
$a->strings["Post to dreamwidth by default"] = "";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to Dreamwidth"] = "Opublikuj na Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "";
|
||||
$a->strings["dreamwidth username"] = "";
|
||||
$a->strings["dreamwidth password"] = "";
|
||||
$a->strings["Post to dreamwidth by default"] = "";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ msgid "Dreamwidth Post Settings"
|
|||
msgstr "Configurações de publicação no Dreamwidth"
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr "Habilitar plug-in para publicar no Dreamwidth"
|
||||
|
||||
#: dwpost.php:77
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to Dreamwidth"] = "Publicar no Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Configurações de publicação no Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Habilitar o plugin de publicação no Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Habilitar o addon de publicação no Dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Nome de usuário do Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Senha do Dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Publicar no Dreamwidth por padrão";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ msgid "Dreamwidth Post Settings"
|
|||
msgstr "Configurări Postări Dreamwidth "
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr "Activare Modul Postare pe Dreamwidth"
|
||||
|
||||
#: dwpost.php:77
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function string_plural_select_ro($n){
|
|||
;
|
||||
$a->strings["Post to Dreamwidth"] = "Postați pe Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Configurări Postări Dreamwidth ";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Activare Modul Postare pe Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Activare Modul Postare pe Dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Utilizator Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Parola Dreamwidth ";
|
||||
$a->strings["Post to dreamwidth by default"] = "Postați implicit pe Dreamwidth";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ msgid "Dreamwidth Post Settings"
|
|||
msgstr "Настройки сообщений Dreamwidth"
|
||||
|
||||
#: dwpost.php:72
|
||||
msgid "Enable dreamwidth Post Plugin"
|
||||
msgid "Enable dreamwidth Post Addon"
|
||||
msgstr "Включить плагин отправки сообщений в Dreamwidth"
|
||||
|
||||
#: dwpost.php:77
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function string_plural_select_ru($n){
|
|||
;
|
||||
$a->strings["Post to Dreamwidth"] = "Отправить в Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Настройки сообщений Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "Включить плагин отправки сообщений в Dreamwidth";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "Включить плагин отправки сообщений в Dreamwidth";
|
||||
$a->strings["dreamwidth username"] = "Имя пользователя Dreamwidth";
|
||||
$a->strings["dreamwidth password"] = "Пароль Dreamwidth";
|
||||
$a->strings["Post to dreamwidth by default"] = "Отправлять сообщения в Dreamwidth по умолчанию";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to Dreamwidth"] = "转播到Dreamwidth";
|
||||
$a->strings["Dreamwidth Post Settings"] = "Dreamwidth转播设置";
|
||||
$a->strings["Enable dreamwidth Post Plugin"] = "使Dreamwidth转播插件可用";
|
||||
$a->strings["Enable dreamwidth Post Addon"] = "使Dreamwidth转播插件可用";
|
||||
$a->strings["dreamwidth username"] = "Dreamwidth用户名";
|
||||
$a->strings["dreamwidth password"] = "Dreamwidth密码";
|
||||
$a->strings["Post to dreamwidth by default"] = "默认地转播到Dreamwidth";
|
||||
|
|
|
|||
|
|
@ -5,31 +5,34 @@
|
|||
* Version: 1.0
|
||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||
*/
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
// IMPORTANT: SET THIS to your fortunate server
|
||||
|
||||
define ('FORTUNATE_SERVER', 'hostname.com');
|
||||
define('FORTUNATE_SERVER', 'hostname.com');
|
||||
|
||||
function fortunate_install() {
|
||||
register_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
|
||||
if(FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
|
||||
notice('Fortunate plugin requires configuration. See README');
|
||||
function fortunate_install()
|
||||
{
|
||||
Addon::registerHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
|
||||
if (FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
|
||||
notice('Fortunate addon requires configuration. See README');
|
||||
}
|
||||
}
|
||||
|
||||
function fortunate_uninstall() {
|
||||
unregister_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
|
||||
function fortunate_uninstall()
|
||||
{
|
||||
Addon::unregisterHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
|
||||
}
|
||||
|
||||
|
||||
function fortunate_fetch(&$a,&$b) {
|
||||
|
||||
function fortunate_fetch(&$a, &$b)
|
||||
{
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
|
||||
. $a->get_baseurl() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
|
||||
|
||||
if(FORTUNATE_SERVER != 'hostname.com') {
|
||||
$s = fetch_url('http://' . FORTUNATE_SERVER . '/cookie.php?numlines=2&equal=1&rand=' . mt_rand());
|
||||
if (FORTUNATE_SERVER != 'hostname.com') {
|
||||
$s = Network::fetchUrl('http://' . FORTUNATE_SERVER . '/cookie.php?numlines=2&equal=1&rand=' . mt_rand());
|
||||
$b .= '<div class="fortunate">' . $s . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,204 +1,215 @@
|
|||
<?php
|
||||
/**
|
||||
* Name: Forum Directory
|
||||
* Description: Add a directory of forums hosted on your server, with verbose descriptions.
|
||||
* Version: 1.0
|
||||
* Author: Thomas Willingham <https://beardyunixer.com/profile/beardyunixer>
|
||||
*/
|
||||
* Name: Forum Directory
|
||||
* Description: Add a directory of forums hosted on your server, with verbose descriptions.
|
||||
* Version: 1.0
|
||||
* Author: Thomas Willingham <https://beardyunixer.com/profile/beardyunixer>
|
||||
*/
|
||||
|
||||
function forumdirectory_install() {
|
||||
register_hook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
require_once 'boot.php';
|
||||
require_once 'include/dba.php';
|
||||
require_once 'include/text.php';
|
||||
|
||||
function forumdirectory_install()
|
||||
{
|
||||
Addon::registerHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
|
||||
}
|
||||
|
||||
function forumdirectory_uninstall() {
|
||||
unregister_hook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
|
||||
function forumdirectory_uninstall()
|
||||
{
|
||||
Addon::unregisterHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
|
||||
}
|
||||
|
||||
function forumdirectory_module() {
|
||||
return;
|
||||
function forumdirectory_module()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
function forumdirectory_app_menu($a,&$b) {
|
||||
$b['app_menu'][] = '<div class="app-title"><a href="forumdirectory">' . t('Forum Directory') . '</a></div>';
|
||||
function forumdirectory_app_menu($a, &$b)
|
||||
{
|
||||
$b['app_menu'][] = '<div class="app-title"><a href="forumdirectory">' . L10n::t('Forum Directory') . '</a></div>';
|
||||
}
|
||||
|
||||
function forumdirectory_init(&$a) {
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/forumdirectory/forumdirectory.css" media="all" />';
|
||||
function forumdirectory_init(&$a)
|
||||
{
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/forumdirectory/forumdirectory.css" media="all" />';
|
||||
|
||||
$a->set_pager_itemspage(60);
|
||||
|
||||
if(local_user()) {
|
||||
require_once('include/contact_widgets.php');
|
||||
|
||||
$a->page['aside'] .= findpeople_widget();
|
||||
|
||||
}
|
||||
else
|
||||
if (local_user()) {
|
||||
$a->page['aside'] .= Widget::findPeople();
|
||||
} else {
|
||||
unset($_SESSION['theme']);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function forumdirectory_post(&$a) {
|
||||
if(x($_POST,'search'))
|
||||
function forumdirectory_post(&$a)
|
||||
{
|
||||
if (x($_POST, 'search')) {
|
||||
$a->data['search'] = $_POST['search'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function forumdirectory_content(&$a) {
|
||||
|
||||
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||
notice( t('Public access denied.') . EOL);
|
||||
function forumdirectory_content(&$a)
|
||||
{
|
||||
if ((Config::get('system', 'block_public')) && (!local_user()) && (!remote_user())) {
|
||||
notice(L10n::t('Public access denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
$o = '';
|
||||
nav_set_selected('directory');
|
||||
Nav::setSelected('directory');
|
||||
|
||||
if(x($a->data,'search'))
|
||||
if (x($a->data, 'search')) {
|
||||
$search = notags(trim($a->data['search']));
|
||||
else
|
||||
$search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
|
||||
} else {
|
||||
$search = ((x($_GET, 'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
|
||||
}
|
||||
|
||||
$tpl = get_markup_template('directory_header.tpl');
|
||||
|
||||
$globaldir = '';
|
||||
$gdirpath = get_config('system','directory');
|
||||
if(strlen($gdirpath)) {
|
||||
$gdirpath = Config::get('system', 'directory');
|
||||
if (strlen($gdirpath)) {
|
||||
$globaldir = '<ul><li><div id="global-directory-link"><a href="'
|
||||
. zrl($gdirpath,true) . '">' . t('Global Directory') . '</a></div></li></ul>';
|
||||
. Profile::zrl($gdirpath, true) . '">' . L10n::t('Global Directory') . '</a></div></li></ul>';
|
||||
}
|
||||
|
||||
$admin = '';
|
||||
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$search' => $search,
|
||||
$o .= replace_macros($tpl, [
|
||||
'$search' => $search,
|
||||
'$globaldir' => $globaldir,
|
||||
'$desc' => t('Find on this site'),
|
||||
'$admin' => $admin,
|
||||
'$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : ""),
|
||||
'$sitedir' => t('Site Directory'),
|
||||
'$submit' => t('Find')
|
||||
));
|
||||
'$desc' => L10n::t('Find on this site'),
|
||||
'$admin' => $admin,
|
||||
'$finding' => (strlen($search) ? '<h4>' . L10n::t('Finding: ') . "'" . $search . "'" . '</h4>' : ""),
|
||||
'$sitedir' => L10n::t('Site Directory'),
|
||||
'$submit' => L10n::t('Find')
|
||||
]);
|
||||
|
||||
if($search)
|
||||
$search = dbesc($search);
|
||||
$sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`pub_keywords`,`prv_keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : "");
|
||||
$sql_extra = '';
|
||||
if (strlen($search)) {
|
||||
$sql_extra = " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,"
|
||||
. "`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`pub_keywords`,`prv_keywords` )"
|
||||
. " AGAINST ('" . dbesc($search) . "' IN BOOLEAN MODE) ";
|
||||
}
|
||||
|
||||
$publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " );
|
||||
$publish = Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 ";
|
||||
|
||||
|
||||
$r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra ");
|
||||
if(count($r))
|
||||
$r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`"
|
||||
. " WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra ");
|
||||
if (DBM::is_result($r)) {
|
||||
$a->set_pager_total($r[0]['total']);
|
||||
}
|
||||
|
||||
$order = " ORDER BY `name` ASC ";
|
||||
|
||||
|
||||
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra $order LIMIT %d , %d ",
|
||||
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags`"
|
||||
. " FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish"
|
||||
. " AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra $order LIMIT %d , %d ",
|
||||
intval($a->pager['start']),
|
||||
intval($a->pager['itemspage'])
|
||||
);
|
||||
if(count($r)) {
|
||||
|
||||
if(in_array('small', $a->argv))
|
||||
if (DBM::is_result($r)) {
|
||||
if (in_array('small', $a->argv)) {
|
||||
$photo = 'thumb';
|
||||
else
|
||||
} else {
|
||||
$photo = 'photo';
|
||||
}
|
||||
|
||||
foreach($r as $rr) {
|
||||
|
||||
|
||||
foreach ($r as $rr) {
|
||||
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
|
||||
|
||||
$pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '<br />' : '');
|
||||
|
||||
$details = '';
|
||||
if(strlen($rr['locality']))
|
||||
if (strlen($rr['locality'])) {
|
||||
$details .= $rr['locality'];
|
||||
if(strlen($rr['region'])) {
|
||||
if(strlen($rr['locality']))
|
||||
}
|
||||
|
||||
if (strlen($rr['region'])) {
|
||||
if (strlen($rr['locality'])) {
|
||||
$details .= ', ';
|
||||
}
|
||||
$details .= $rr['region'];
|
||||
}
|
||||
if(strlen($rr['country-name'])) {
|
||||
if(strlen($details))
|
||||
if (strlen($rr['country-name'])) {
|
||||
if (strlen($details)) {
|
||||
$details .= ', ';
|
||||
}
|
||||
$details .= $rr['country-name'];
|
||||
}
|
||||
if(strlen($rr['dob'])) {
|
||||
if(($years = age($rr['dob'],$rr['timezone'],'')) != 0)
|
||||
$details .= '<br />' . t('Age: ') . $years ;
|
||||
}
|
||||
if(strlen($rr['gender']))
|
||||
$details .= '<br />' . t('Gender: ') . $rr['gender'];
|
||||
|
||||
if($rr['page-flags'] == PAGE_NORMAL)
|
||||
$page_type = "Personal Profile";
|
||||
if($rr['page-flags'] == PAGE_SOAPBOX)
|
||||
$page_type = "Fan Page";
|
||||
if($rr['page-flags'] == PAGE_COMMUNITY)
|
||||
$page_type = "Community Forum";
|
||||
if($rr['page-flags'] == PAGE_FREELOVE)
|
||||
$page_type = "Open Forum";
|
||||
if($rr['page-flags'] == PAGE_PRVGROUP)
|
||||
$page_type = "Private Group";
|
||||
if (strlen($rr['dob']) && ($years = Temporal::getAgeByTimezone($rr['dob'], $rr['timezone'], '')) != 0) {
|
||||
$details .= '<br />' . L10n::t('Age: ') . $years;
|
||||
}
|
||||
|
||||
if (strlen($rr['gender'])) {
|
||||
$details .= '<br />' . L10n::t('Gender: ') . $rr['gender'];
|
||||
}
|
||||
|
||||
switch ($rr['page-flags']) {
|
||||
case PAGE_NORMAL : $page_type = "Personal Profile"; break;
|
||||
case PAGE_SOAPBOX : $page_type = "Fan Page" ; break;
|
||||
case PAGE_COMMUNITY: $page_type = "Community Forum" ; break;
|
||||
case PAGE_FREELOVE : $page_type = "Open Forum" ; break;
|
||||
case PAGE_PRVGROUP : $page_type = "Private Group" ; break;
|
||||
}
|
||||
|
||||
$profile = $rr;
|
||||
|
||||
if((x($profile,'address') == 1)
|
||||
|| (x($profile,'locality') == 1)
|
||||
|| (x($profile,'region') == 1)
|
||||
|| (x($profile,'postal-code') == 1)
|
||||
|| (x($profile,'country-name') == 1))
|
||||
$location = t('Location:');
|
||||
$location = '';
|
||||
if (x($profile, 'address') == 1
|
||||
|| x($profile, 'locality') == 1
|
||||
|| x($profile, 'region') == 1
|
||||
|| x($profile, 'postal-code') == 1
|
||||
|| x($profile, 'country-name') == 1
|
||||
) {
|
||||
$location = L10n::t('Location:');
|
||||
}
|
||||
|
||||
$gender = ((x($profile,'gender') == 1) ? t('Gender:') : False);
|
||||
$gender = x($profile, 'gender') == 1 ? L10n::t('Gender:') : false;
|
||||
$marital = x($profile, 'marital') == 1 ? L10n::t('Status:') : false;
|
||||
$homepage = x($profile, 'homepage') == 1 ? L10n::t('Homepage:') : false;
|
||||
$about = x($profile, 'about') == 1 ? L10n::t('About:') : false;
|
||||
|
||||
$marital = ((x($profile,'marital') == 1) ? t('Status:') : False);
|
||||
$tpl = get_markup_template('forumdirectory_item.tpl', 'addon/forumdirectory/');
|
||||
|
||||
$homepage = ((x($profile,'homepage') == 1) ? t('Homepage:') : False);
|
||||
|
||||
$about = ((x($profile,'about') == 1) ? t('About:') : False);
|
||||
|
||||
# $tpl = file_get_contents( dirname(__file__).'/forumdirectory_item.tpl');
|
||||
$tpl = get_markup_template( 'forumdirectory_item.tpl', 'addon/forumdirectory/' );
|
||||
|
||||
$entry = replace_macros($tpl,array(
|
||||
'$id' => $rr['id'],
|
||||
$entry = replace_macros($tpl, [
|
||||
'$id' => $rr['id'],
|
||||
'$profile_link' => $profile_link,
|
||||
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
|
||||
'$alt_text' => $rr['name'],
|
||||
'$name' => $rr['name'],
|
||||
'$details' => $pdesc . $details,
|
||||
'$page_type' => $page_type,
|
||||
'$profile' => $profile,
|
||||
'$location' => template_escape($location),
|
||||
'$gender' => $gender,
|
||||
'$pdesc' => $pdesc,
|
||||
'$marital' => $marital,
|
||||
'$homepage' => $homepage,
|
||||
'$about' => $about,
|
||||
|
||||
));
|
||||
|
||||
$arr = array('contact' => $rr, 'entry' => $entry);
|
||||
|
||||
unset($profile);
|
||||
unset($location);
|
||||
'$photo' => $rr[$photo],
|
||||
'$alt_text' => $rr['name'],
|
||||
'$name' => $rr['name'],
|
||||
'$details' => $pdesc . $details,
|
||||
'$page_type' => $page_type,
|
||||
'$profile' => $profile,
|
||||
'$location' => $location,
|
||||
'$gender' => $gender,
|
||||
'$pdesc' => $pdesc,
|
||||
'$marital' => $marital,
|
||||
'$homepage' => $homepage,
|
||||
'$about' => $about,
|
||||
]);
|
||||
|
||||
$o .= $entry;
|
||||
|
||||
}
|
||||
|
||||
$o .= "<div class=\"directory-end\" ></div>\r\n";
|
||||
$o .= paginate($a);
|
||||
|
||||
} else {
|
||||
info(L10n::t("No entries \x28some entries may be hidden\x29.") . EOL);
|
||||
}
|
||||
else
|
||||
info( t("No entries \x28some entries may be hidden\x29.") . EOL);
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 12:04+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"
|
||||
|
|
|
|||
|
|
@ -6,42 +6,44 @@
|
|||
* Author: Commander Zot
|
||||
*
|
||||
*/
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
|
||||
function fromapp_install() {
|
||||
|
||||
register_hook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
|
||||
register_hook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
|
||||
register_hook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
|
||||
|
||||
function fromapp_install()
|
||||
{
|
||||
Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
|
||||
Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
|
||||
Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
|
||||
logger("installed fromapp");
|
||||
}
|
||||
|
||||
|
||||
function fromapp_uninstall() {
|
||||
|
||||
unregister_hook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
|
||||
unregister_hook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
|
||||
unregister_hook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
|
||||
|
||||
|
||||
function fromapp_uninstall()
|
||||
{
|
||||
Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
|
||||
Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
|
||||
Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
|
||||
logger("removed fromapp");
|
||||
}
|
||||
|
||||
function fromapp_settings_post($a,$post) {
|
||||
if(! local_user() || (! x($_POST,'fromapp-submit')))
|
||||
function fromapp_settings_post($a, $post)
|
||||
{
|
||||
if (!local_user() || (! x($_POST, 'fromapp-submit'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
set_pconfig(local_user(),'fromapp','app',$_POST['fromapp-input']);
|
||||
set_pconfig(local_user(),'fromapp','force',intval($_POST['fromapp-force']));
|
||||
PConfig::set(local_user(), 'fromapp', 'app', $_POST['fromapp-input']);
|
||||
PConfig::set(local_user(), 'fromapp', 'force', intval($_POST['fromapp-force']));
|
||||
|
||||
info( t('Fromapp settings updated.') . EOL);
|
||||
info(L10n::t('Fromapp settings updated.') . EOL);
|
||||
}
|
||||
|
||||
function fromapp_settings(&$a,&$s) {
|
||||
|
||||
if(! local_user())
|
||||
function fromapp_settings(&$a, &$s)
|
||||
{
|
||||
if (!local_user()) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||
|
||||
|
|
@ -49,11 +51,9 @@ function fromapp_settings(&$a,&$s) {
|
|||
|
||||
/* Get the current state of our config variable */
|
||||
|
||||
$fromapp = get_pconfig(local_user(),'fromapp','app');
|
||||
if($fromapp === false)
|
||||
$fromapp = '';
|
||||
$fromapp = PConfig::get(local_user(), 'fromapp', 'app', '');
|
||||
|
||||
$force = intval(get_pconfig(local_user(),'fromapp','force'));
|
||||
$force = intval(PConfig::get(local_user(), 'fromapp', 'force'));
|
||||
|
||||
$force_enabled = (($force) ? ' checked="checked" ' : '');
|
||||
|
||||
|
|
@ -61,26 +61,25 @@ function fromapp_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_fromapp_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_fromapp_expanded\'); openClose(\'settings_fromapp_inflated\');">';
|
||||
$s .= '<h3>' . t('FromApp Settings') . '</h3>';
|
||||
$s .= '<h3>' . L10n::t('FromApp Settings') . '</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_fromapp_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_fromapp_expanded\'); openClose(\'settings_fromapp_inflated\');">';
|
||||
$s .= '<h3>' . t('FromApp Settings') . '</h3>';
|
||||
$s .= '<h3>' . L10n::t('FromApp Settings') . '</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="fromapp-wrapper">';
|
||||
$s .= '<label id="fromapp-label" for="fromapp-input">' . t('The application name you would like to show your posts originating from.') . '</label>';
|
||||
$s .= '<label id="fromapp-label" for="fromapp-input">' . L10n::t('The application name you would like to show your posts originating from.') . '</label>';
|
||||
$s .= '<input id="fromapp-input" type="text" name="fromapp-input" value="' . $fromapp . '" ' . '/>';
|
||||
$s .= '<div class="clear"></div>';
|
||||
|
||||
$s .= '<label id="fromapp-force-label" for="fromapp-force">' . t('Use this application name even if another application was used.') . '</label>';
|
||||
$s .= '<label id="fromapp-force-label" for="fromapp-force">' . L10n::t('Use this application name even if another application was used.') . '</label>';
|
||||
$s .= '<input id="fromapp-force" type="checkbox" name="fromapp-force" value="1" ' . $force_enabled . '/>';
|
||||
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
/* provide a submit button */
|
||||
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="fromapp-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
|
||||
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="fromapp-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
|
||||
}
|
||||
|
||||
function fromapp_post_hook(&$a,&$item) {
|
||||
|
|
|
|||
|
|
@ -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: 2015-08-31 10:11+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"
|
||||
|
|
|
|||
|
|
@ -9,24 +9,32 @@
|
|||
|
||||
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
|
||||
|
||||
require_once('mod/share.php');
|
||||
require_once('mod/parse_url.php');
|
||||
require_once('include/text.php');
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
require_once 'mod/share.php';
|
||||
require_once 'mod/parse_url.php';
|
||||
require_once 'include/text.php';
|
||||
|
||||
function fromgplus_install() {
|
||||
register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||
register_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||
register_hook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
||||
Addon::registerHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||
Addon::registerHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||
Addon::registerHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
||||
}
|
||||
|
||||
function fromgplus_uninstall() {
|
||||
unregister_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||
unregister_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||
unregister_hook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
||||
Addon::unregisterHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||
Addon::unregisterHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||
Addon::unregisterHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
||||
|
||||
// Old hooks
|
||||
unregister_hook('plugin_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||
unregister_hook('plugin_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||
Addon::unregisterHook('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||
Addon::unregisterHook('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||
}
|
||||
|
||||
function fromgplus_addon_settings(&$a,&$s) {
|
||||
|
|
@ -44,27 +52,27 @@ function fromgplus_addon_settings(&$a,&$s) {
|
|||
$account = get_pconfig(local_user(),'fromgplus','account');
|
||||
|
||||
$s .= '<span id="settings_fromgplus_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_fromgplus_expanded\'); openClose(\'settings_fromgplus_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/googleplus.png" /><h3 class="connector">'. t('Google+ Mirror').'</h3>';
|
||||
$s .= '<img class="connector" src="images/googleplus.png" /><h3 class="connector">'. L10n::t('Google+ Mirror').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_fromgplus_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_fromgplus_expanded\'); openClose(\'settings_fromgplus_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/googleplus.png" /><h3 class="connector">'. t('Google+ Mirror').'</h3>';
|
||||
$s .= '<img class="connector" src="images/googleplus.png" /><h3 class="connector">'. L10n::t('Google+ Mirror').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div id="fromgplus-wrapper">';
|
||||
|
||||
$s .= '<label id="fromgplus-enable-label" for="fromgplus-enable">'.t('Enable Google+ Import').'</label>';
|
||||
$s .= '<label id="fromgplus-enable-label" for="fromgplus-enable">'.L10n::t('Enable Google+ Import').'</label>';
|
||||
$s .= '<input id="fromgplus-enable" type="checkbox" name="fromgplus-enable" value="1"'.$enable_checked.' />';
|
||||
$s .= '<div class="clear"></div>';
|
||||
$s .= '<label id="fromgplus-label" for="fromgplus-account">'.t('Google Account ID').' </label>';
|
||||
$s .= '<label id="fromgplus-label" for="fromgplus-account">'.L10n::t('Google Account ID').' </label>';
|
||||
$s .= '<input id="fromgplus-account" type="text" name="fromgplus-account" value="'.$account.'" />';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
$s .= '<label id="fromgplus-keywords-label" for="fromgplus-keywords">'.t('Add keywords to post').'</label>';
|
||||
$s .= '<label id="fromgplus-keywords-label" for="fromgplus-keywords">'.L10n::t('Add keywords to post').'</label>';
|
||||
$s .= '<input id="fromgplus-keywords" type="checkbox" name="fromgplus-keywords" value="1"'.$keywords_checked.' />';
|
||||
$s .= '<div class="clear"></div>';
|
||||
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="fromgplus-submit" name="fromgplus-submit"
|
||||
class="settings-submit" value="' . t('Save Settings') . '" /></div>';
|
||||
class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
|
||||
$s .= '</div>';
|
||||
|
||||
return;
|
||||
|
|
@ -85,23 +93,25 @@ function fromgplus_addon_settings_post(&$a,&$b) {
|
|||
if (!$enable)
|
||||
del_pconfig(local_user(),'fromgplus','lastdate');
|
||||
|
||||
info( t('Google+ Import Settings saved.') . EOL);
|
||||
info(L10n::t('Google+ Import Settings saved.') . EOL);
|
||||
}
|
||||
}
|
||||
|
||||
function fromgplus_plugin_admin(&$a, &$o){
|
||||
$t = get_markup_template("admin.tpl", "addon/fromgplus/");
|
||||
function fromgplus_addon_admin(&$a, &$o)
|
||||
{
|
||||
$t = get_markup_template("admin.tpl", "addon/fromgplus/");
|
||||
|
||||
$o = replace_macros($t, array(
|
||||
'$submit' => t('Save Settings'),
|
||||
'$key' => array('key', t('Key'), trim(get_config('fromgplus', 'key')), t('')),
|
||||
));
|
||||
$o = replace_macros($t, [
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$key' => ['key', L10n::t('Key'), trim(Config::get('fromgplus', 'key')), L10n::t('')],
|
||||
]);
|
||||
}
|
||||
|
||||
function fromgplus_plugin_admin_post(&$a){
|
||||
$key = ((x($_POST,'key')) ? trim($_POST['key']) : '');
|
||||
set_config('fromgplus','key',$key);
|
||||
info( t('Settings updated.'). EOL );
|
||||
function fromgplus_addon_admin_post(&$a)
|
||||
{
|
||||
$key = ((x($_POST, 'key')) ? trim($_POST['key']) : '');
|
||||
Config::set('fromgplus', 'key', $key);
|
||||
info(L10n::t('Settings updated.'). EOL);
|
||||
}
|
||||
|
||||
function fromgplus_cron($a,$b) {
|
||||
|
|
@ -305,9 +315,7 @@ function fromgplus_cleantext($text) {
|
|||
}
|
||||
|
||||
function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
|
||||
require_once("include/Photo.php");
|
||||
require_once("include/items.php");
|
||||
require_once("include/network.php");
|
||||
require_once 'include/items.php';
|
||||
|
||||
$post = "";
|
||||
$quote = "";
|
||||
|
|
@ -318,13 +326,13 @@ function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
|
|||
switch($attachment->objectType) {
|
||||
case "video":
|
||||
$pagedata["type"] = "video";
|
||||
$pagedata["url"] = original_url($attachment->url);
|
||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
||||
break;
|
||||
|
||||
case "article":
|
||||
$pagedata["type"] = "link";
|
||||
$pagedata["url"] = original_url($attachment->url);
|
||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
||||
|
||||
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
|
||||
|
|
@ -373,7 +381,7 @@ function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
|
|||
break;
|
||||
|
||||
case "photo-album":
|
||||
$pagedata["url"] = original_url($attachment->url);
|
||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
||||
$post .= "\n\n[bookmark=".$pagedata["url"]."]".$pagedata["title"]."[/bookmark]\n";
|
||||
|
||||
|
|
@ -394,7 +402,7 @@ function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
|
|||
|
||||
case "album":
|
||||
$pagedata["type"] = "link";
|
||||
$pagedata["url"] = original_url($attachment->url);
|
||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
||||
|
||||
$thumb = $attachment->thumbnails[0];
|
||||
|
|
@ -407,7 +415,7 @@ function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
|
|||
break;
|
||||
|
||||
case "audio":
|
||||
$pagedata["url"] = original_url($attachment->url);
|
||||
$pagedata["url"] = Network::finalUrl($attachment->url);
|
||||
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
|
||||
$post .= "\n\n[bookmark=".$pagedata["url"]."]".$pagedata["title"]."[/bookmark]\n";
|
||||
break;
|
||||
|
|
@ -432,7 +440,7 @@ function fromgplus_fetch($a, $uid) {
|
|||
$account = get_pconfig($uid,'fromgplus','account');
|
||||
$key = get_config('fromgplus','key');
|
||||
|
||||
$result = fetch_url("https://www.googleapis.com/plus/v1/people/".$account."/activities/public?alt=json&pp=1&key=".$key."&maxResults=".$maxfetch);
|
||||
$result = Network::fetchUrl("https://www.googleapis.com/plus/v1/people/".$account."/activities/public?alt=json&pp=1&key=".$key."&maxResults=".$maxfetch);
|
||||
//$result = file_get_contents("google.txt");
|
||||
//file_put_contents("google.txt", $result);
|
||||
|
||||
|
|
@ -510,12 +518,12 @@ function fromgplus_fetch($a, $uid) {
|
|||
if (function_exists("share_header"))
|
||||
$post .= share_header($item->object->actor->displayName, $item->object->actor->url,
|
||||
$item->object->actor->image->url, "",
|
||||
datetime_convert('UTC','UTC',$item->object->published),$item->object->url);
|
||||
DateTimeFormat::utc($item->object->published),$item->object->url);
|
||||
else
|
||||
$post .= "[share author='".str_replace("'", "'",$item->object->actor->displayName).
|
||||
"' profile='".$item->object->actor->url.
|
||||
"' avatar='".$item->object->actor->image->url.
|
||||
"' posted='".datetime_convert('UTC','UTC',$item->object->published).
|
||||
"' posted='".DateTimeFormat::utc($item->object->published).
|
||||
"' link='".$item->object->url."']";
|
||||
|
||||
$post .= fromgplus_html2bbcode($item->object->content);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ msgstr ""
|
|||
"Project-Id-Version: friendica\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-11-12 16:52+0000\n"
|
||||
"PO-Revision-Date: 2017-01-18 10:38+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"
|
||||
|
|
|
|||
|
|
@ -5,16 +5,23 @@
|
|||
* Version: 0.1
|
||||
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
||||
*/
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
function geocoordinates_install() {
|
||||
register_hook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||
register_hook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||
function geocoordinates_install()
|
||||
{
|
||||
Addon::registerHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||
Addon::registerHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||
}
|
||||
|
||||
|
||||
function geocoordinates_uninstall() {
|
||||
unregister_hook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||
unregister_hook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||
function geocoordinates_uninstall()
|
||||
{
|
||||
Addon::unregisterHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||
Addon::unregisterHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||
}
|
||||
|
||||
function geocoordinates_resolve_item(&$item) {
|
||||
|
|
@ -43,7 +50,7 @@ function geocoordinates_resolve_item(&$item) {
|
|||
return;
|
||||
}
|
||||
|
||||
$s = fetch_url("https://api.opencagedata.com/geocode/v1/json?q=".$coords[0].",".$coords[1]."&key=".$key."&language=".$language);
|
||||
$s = Network::fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=".$coords[0].",".$coords[1]."&key=".$key."&language=".$language);
|
||||
|
||||
if (!$s) {
|
||||
logger("API could not be queried", LOGGER_DEBUG);
|
||||
|
|
@ -74,22 +81,24 @@ function geocoordinates_post_hook($a, &$item) {
|
|||
geocoordinates_resolve_item($item);
|
||||
}
|
||||
|
||||
function geocoordinates_plugin_admin(&$a,&$o) {
|
||||
function geocoordinates_addon_admin(&$a, &$o)
|
||||
{
|
||||
|
||||
$t = get_markup_template("admin.tpl", "addon/geocoordinates/");
|
||||
|
||||
$o = replace_macros($t, array(
|
||||
'$submit' => t('Save Settings'),
|
||||
'$api_key' => array('api_key', t('API Key'), get_config('geocoordinates', 'api_key' ), ''),
|
||||
'$language' => array('language', t('Language code (IETF format)'), get_config('geocoordinates', 'language' ), ''),
|
||||
));
|
||||
$o = replace_macros($t, [
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$api_key' => ['api_key', L10n::t('API Key'), Config::get('geocoordinates', 'api_key'), ''],
|
||||
'$language' => ['language', L10n::t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''],
|
||||
]);
|
||||
}
|
||||
|
||||
function geocoordinates_plugin_admin_post(&$a) {
|
||||
$api_key = ((x($_POST,'api_key')) ? notags(trim($_POST['api_key'])) : '');
|
||||
set_config('geocoordinates','api_key',$api_key);
|
||||
function geocoordinates_addon_admin_post(&$a)
|
||||
{
|
||||
$api_key = ((x($_POST, 'api_key')) ? notags(trim($_POST['api_key'])) : '');
|
||||
Config::set('geocoordinates', 'api_key', $api_key);
|
||||
|
||||
$language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : '');
|
||||
set_config('geocoordinates','language',$language);
|
||||
info(t('Settings updated.'). EOL);
|
||||
$language = ((x($_POST, 'language')) ? notags(trim($_POST['language'])) : '');
|
||||
Config::set('geocoordinates', 'language', $language);
|
||||
info(L10n::t('Settings updated.'). EOL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,36 +12,41 @@
|
|||
* $a->config['geonames']['username'] = 'your_username';
|
||||
* Also visit http://geonames.org/manageaccount and enable access to the free web services
|
||||
*
|
||||
* When plugin is installed, the system calls the plugin
|
||||
* When addon is installed, the system calls the addon
|
||||
* name_install() function, located in 'addon/name/name.php',
|
||||
* where 'name' is the name of the addon.
|
||||
* If the addon is removed from the configuration list, the
|
||||
* system will call the name_uninstall() function.
|
||||
*
|
||||
*/
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
function geonames_install() {
|
||||
|
||||
/**
|
||||
*
|
||||
* Our plugin will attach in three places.
|
||||
* Our addon will attach in three places.
|
||||
* The first is just prior to storing a local post.
|
||||
*
|
||||
*/
|
||||
|
||||
register_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
||||
Addon::registerHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
||||
|
||||
/**
|
||||
*
|
||||
* Then we'll attach into the plugin settings page, and also the
|
||||
* Then we'll attach into the addon settings page, and also the
|
||||
* settings post hook so that we can create and update
|
||||
* user preferences.
|
||||
*
|
||||
*/
|
||||
|
||||
register_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
|
||||
register_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
|
||||
Addon::registerHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
|
||||
Addon::registerHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
|
||||
|
||||
logger("installed geonames");
|
||||
}
|
||||
|
|
@ -57,9 +62,9 @@ function geonames_uninstall() {
|
|||
*
|
||||
*/
|
||||
|
||||
unregister_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
||||
unregister_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
|
||||
unregister_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
|
||||
Addon::unregisterHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
||||
Addon::unregisterHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
|
||||
Addon::unregisterHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
|
||||
|
||||
|
||||
logger("removed geonames");
|
||||
|
|
@ -74,7 +79,7 @@ function geonames_post_hook($a, &$item) {
|
|||
* An item was posted on the local system.
|
||||
* We are going to look for specific items:
|
||||
* - A status post by a profile owner
|
||||
* - The profile owner must have allowed our plugin
|
||||
* - The profile owner must have allowed our addon
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -108,12 +113,12 @@ function geonames_post_hook($a, &$item) {
|
|||
*
|
||||
*/
|
||||
|
||||
$s = fetch_url('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
|
||||
$s = Network::fetchUrl('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
|
||||
|
||||
if(! $s)
|
||||
return;
|
||||
|
||||
$xml = parse_xml_string($s);
|
||||
$xml = XML::parseString($s);
|
||||
|
||||
if($xml->geoname->name && $xml->geoname->countryName)
|
||||
$item['location'] = $xml->geoname->name . ', ' . $xml->geoname->countryName;
|
||||
|
|
@ -135,25 +140,25 @@ function geonames_post_hook($a, &$item) {
|
|||
*
|
||||
*/
|
||||
|
||||
function geonames_plugin_admin_post($a,$post) {
|
||||
function geonames_addon_admin_post($a,$post) {
|
||||
if(! local_user() || (! x($_POST,'geonames-submit')))
|
||||
return;
|
||||
set_pconfig(local_user(),'geonames','enable',intval($_POST['geonames']));
|
||||
|
||||
info( t('Geonames settings updated.') . EOL);
|
||||
info(L10n::t('Geonames settings updated.') . EOL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Called from the Plugin Setting form.
|
||||
* Called from the Addon Setting form.
|
||||
* Add our own settings info to the page.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function geonames_plugin_admin(&$a,&$s) {
|
||||
function geonames_addon_admin(&$a,&$s) {
|
||||
|
||||
if(! local_user())
|
||||
return;
|
||||
|
|
@ -176,14 +181,14 @@ function geonames_plugin_admin(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<div class="settings-block">';
|
||||
$s .= '<h3>' . t('Geonames Settings') . '</h3>';
|
||||
$s .= '<h3>' . L10n::t('Geonames Settings') . '</h3>';
|
||||
$s .= '<div id="geonames-enable-wrapper">';
|
||||
$s .= '<label id="geonames-enable-label" for="geonames-checkbox">' . t('Enable Geonames Plugin') . '</label>';
|
||||
$s .= '<label id="geonames-enable-label" for="geonames-checkbox">' . L10n::t('Enable Geonames Addon') . '</label>';
|
||||
$s .= '<input id="geonames-checkbox" type="checkbox" name="geonames" value="1" ' . $checked . '/>';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
/* provide a submit button */
|
||||
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="geonames-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="geonames-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ msgid "Geonames Settings"
|
|||
msgstr ""
|
||||
|
||||
#: geonames.php:181
|
||||
msgid "Enable Geonames Plugin"
|
||||
msgid "Enable Geonames Addon"
|
||||
msgstr ""
|
||||
|
||||
#: geonames.php:187
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$a->strings["Geonames settings updated."] = "Actualitzada la configuració de Geonames.";
|
||||
$a->strings["Geonames Settings"] = "Configuració de Geonames";
|
||||
$a->strings["Enable Geonames Plugin"] = "Habilitar Plugin de Geonames";
|
||||
$a->strings["Enable Geonames Addon"] = "Habilitar Addon de Geonames";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ msgid "Geonames Settings"
|
|||
msgstr "Nastavení Geonames"
|
||||
|
||||
#: geonames.php:181
|
||||
msgid "Enable Geonames Plugin"
|
||||
msgid "Enable Geonames Addon"
|
||||
msgstr "Povolit Geonames rozšíření"
|
||||
|
||||
#: geonames.php:187
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ function string_plural_select_cs($n){
|
|||
;
|
||||
$a->strings["Geonames settings updated."] = "Geonames nastavení aktualizováno.";
|
||||
$a->strings["Geonames Settings"] = "Nastavení Geonames";
|
||||
$a->strings["Enable Geonames Plugin"] = "Povolit Geonames rozšíření";
|
||||
$a->strings["Enable Geonames Addon"] = "Povolit Geonames rozšíření";
|
||||
$a->strings["Submit"] = "Odeslat";
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ msgid "Geonames Settings"
|
|||
msgstr "Geonames Einstellungen"
|
||||
|
||||
#: geonames.php:181
|
||||
msgid "Enable Geonames Plugin"
|
||||
msgstr "Geonames Plugin aktivieren"
|
||||
msgid "Enable Geonames Addon"
|
||||
msgstr "Geonames Addon aktivieren"
|
||||
|
||||
#: geonames.php:187
|
||||
msgid "Submit"
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ function string_plural_select_de($n){
|
|||
;
|
||||
$a->strings["Geonames settings updated."] = "Geonames Einstellungen aktualisiert";
|
||||
$a->strings["Geonames Settings"] = "Geonames Einstellungen";
|
||||
$a->strings["Enable Geonames Plugin"] = "Geonames Plugin aktivieren";
|
||||
$a->strings["Enable Geonames Addon"] = "Geonames Addon aktivieren";
|
||||
$a->strings["Submit"] = "Senden";
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$a->strings["Geonames settings updated."] = "Ĝidatigis la Geonames agordojn.";
|
||||
$a->strings["Geonames Settings"] = "Geonames Agordoj";
|
||||
$a->strings["Enable Geonames Plugin"] = "Ŝalti la Geonames Kromprogramon";
|
||||
$a->strings["Enable Geonames Addon"] = "Ŝalti la Geonames Kromprogramon";
|
||||
$a->strings["Submit"] = "Sendi";
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ msgid "Geonames Settings"
|
|||
msgstr "Ajustes de Geonombres"
|
||||
|
||||
#: geonames.php:181
|
||||
msgid "Enable Geonames Plugin"
|
||||
msgstr "Habilitar Plugin de Geonombres"
|
||||
msgid "Enable Geonames Addon"
|
||||
msgstr "Habilitar Addon de Geonombres"
|
||||
|
||||
#: geonames.php:187
|
||||
msgid "Submit"
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ function string_plural_select_es($n){
|
|||
;
|
||||
$a->strings["Geonames settings updated."] = "Ajustes de geonombres actualizados.";
|
||||
$a->strings["Geonames Settings"] = "Ajustes de Geonombres";
|
||||
$a->strings["Enable Geonames Plugin"] = "Habilitar Plugin de Geonombres";
|
||||
$a->strings["Enable Geonames Addon"] = "Habilitar Addon de Geonombres";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$a->strings["Geonames settings updated."] = "Réglages Geonames sauvés.";
|
||||
$a->strings["Geonames Settings"] = "Réglages Geonames";
|
||||
$a->strings["Enable Geonames Plugin"] = "Activer Geonames";
|
||||
$a->strings["Enable Geonames Addon"] = "Activer Geonames";
|
||||
$a->strings["Submit"] = "Envoyer";
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$a->strings["Geonames settings updated."] = "";
|
||||
$a->strings["Geonames Settings"] = "";
|
||||
$a->strings["Enable Geonames Plugin"] = "";
|
||||
$a->strings["Enable Geonames Addon"] = "";
|
||||
$a->strings["Submit"] = "Senda inn";
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
#
|
||||
#
|
||||
# Translators:
|
||||
# fabrixxm <fabrix.xm@gmail.com>, 2014-2015
|
||||
# fabrixxm <fabrix.xm@gmail.com>, 2014-2015,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-08-31 10:12+0000\n"
|
||||
"PO-Revision-Date: 2018-03-19 13:22+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 "Geonames Settings"
|
|||
msgstr "Impostazioni Geonames"
|
||||
|
||||
#: geonames.php:181
|
||||
msgid "Enable Geonames Plugin"
|
||||
msgstr "Abilita plugin Geonames"
|
||||
msgid "Enable Geonames Addon"
|
||||
msgstr "Abilita componente aggiuntivo Geonames"
|
||||
|
||||
#: geonames.php:187
|
||||
msgid "Submit"
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ function string_plural_select_it($n){
|
|||
;
|
||||
$a->strings["Geonames settings updated."] = "Impostazioni di Geonames aggiornate.";
|
||||
$a->strings["Geonames Settings"] = "Impostazioni Geonames";
|
||||
$a->strings["Enable Geonames Plugin"] = "Abilita plugin Geonames";
|
||||
$a->strings["Enable Geonames Addon"] = "Abilita componente aggiuntivo Geonames";
|
||||
$a->strings["Submit"] = "Invia";
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$a->strings["Geonames settings updated."] = "";
|
||||
$a->strings["Geonames Settings"] = "";
|
||||
$a->strings["Enable Geonames Plugin"] = "";
|
||||
$a->strings["Enable Geonames Addon"] = "";
|
||||
$a->strings["Submit"] = "Lagre";
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$a->strings["Geonames settings updated."] = "";
|
||||
$a->strings["Geonames Settings"] = "ustawienia Geonames";
|
||||
$a->strings["Enable Geonames Plugin"] = "";
|
||||
$a->strings["Enable Geonames Addon"] = "";
|
||||
$a->strings["Submit"] = "Potwierdź";
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$a->strings["Geonames settings updated."] = "Configurações Geonames atualizadas.";
|
||||
$a->strings["Geonames Settings"] = "Configurações Geonames";
|
||||
$a->strings["Enable Geonames Plugin"] = "Plugin Geonames Habilitado";
|
||||
$a->strings["Enable Geonames Addon"] = "Addon Geonames Habilitado";
|
||||
$a->strings["Submit"] = "Enviar";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ msgid "Geonames Settings"
|
|||
msgstr "Configurări Geonume"
|
||||
|
||||
#: geonames.php:181
|
||||
msgid "Enable Geonames Plugin"
|
||||
msgid "Enable Geonames Addon"
|
||||
msgstr "Permite Modul Geonume"
|
||||
|
||||
#: geonames.php:187
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ function string_plural_select_ro($n){
|
|||
;
|
||||
$a->strings["Geonames settings updated."] = "Configurări Geonume actualizate.";
|
||||
$a->strings["Geonames Settings"] = "Configurări Geonume";
|
||||
$a->strings["Enable Geonames Plugin"] = "Permite Modul Geonume";
|
||||
$a->strings["Enable Geonames Addon"] = "Permite Modul Geonume";
|
||||
$a->strings["Submit"] = "Trimite";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ msgid "Geonames Settings"
|
|||
msgstr "Настройки Geonames"
|
||||
|
||||
#: geonames.php:181
|
||||
msgid "Enable Geonames Plugin"
|
||||
msgid "Enable Geonames Addon"
|
||||
msgstr "Включить плагин Geonames"
|
||||
|
||||
#: geonames.php:187
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ function string_plural_select_ru($n){
|
|||
;
|
||||
$a->strings["Geonames settings updated."] = "Настройки Geonames обновлены.";
|
||||
$a->strings["Geonames Settings"] = "Настройки Geonames";
|
||||
$a->strings["Enable Geonames Plugin"] = "Включить плагин Geonames";
|
||||
$a->strings["Enable Geonames Addon"] = "Включить плагин Geonames";
|
||||
$a->strings["Submit"] = "Добавить";
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
$a->strings["Geonames settings updated."] = "Geonames设置更新了。";
|
||||
$a->strings["Geonames Settings"] = "Geonames设置";
|
||||
$a->strings["Enable Geonames Plugin"] = "使Geonames插件能用";
|
||||
$a->strings["Enable Geonames Addon"] = "使Geonames插件能用";
|
||||
$a->strings["Submit"] = "提交";
|
||||
|
|
|
|||
|
|
@ -7,13 +7,15 @@
|
|||
*
|
||||
*
|
||||
*/
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
function gnot_install() {
|
||||
|
||||
register_hook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
|
||||
register_hook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
|
||||
register_hook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
|
||||
Addon::registerHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
|
||||
Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
|
||||
Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
|
||||
|
||||
logger("installed gnot");
|
||||
}
|
||||
|
|
@ -21,9 +23,9 @@ function gnot_install() {
|
|||
|
||||
function gnot_uninstall() {
|
||||
|
||||
unregister_hook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
|
||||
unregister_hook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
|
||||
unregister_hook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
|
||||
Addon::unregisterHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
|
||||
Addon::unregisterHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
|
||||
Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
|
||||
|
||||
|
||||
logger("removed gnot");
|
||||
|
|
@ -44,14 +46,14 @@ function gnot_settings_post($a,$post) {
|
|||
if(! local_user() || (! x($_POST,'gnot-submit')))
|
||||
return;
|
||||
|
||||
set_pconfig(local_user(),'gnot','enable',intval($_POST['gnot']));
|
||||
info( t('Gnot settings updated.') . EOL);
|
||||
PConfig::set(local_user(),'gnot','enable',intval($_POST['gnot']));
|
||||
info(L10n::t('Gnot settings updated.') . EOL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Called from the Plugin Setting form.
|
||||
* Called from the Addon Setting form.
|
||||
* Add our own settings info to the page.
|
||||
*
|
||||
*/
|
||||
|
|
@ -76,16 +78,16 @@ function gnot_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<div class="settings-block">';
|
||||
$s .= '<h3>' . t('Gnot Settings') . '</h3>';
|
||||
$s .= '<h3>' . L10n::t('Gnot Settings') . '</h3>';
|
||||
$s .= '<div id="gnot-wrapper">';
|
||||
$s .= '<div id="gnot-desc">' . t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") . '</div>';
|
||||
$s .= '<label id="gnot-label" for="gnot">' . t('Enable this plugin/addon?') . '</label>';
|
||||
$s .= '<div id="gnot-desc">' . L10n::t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") . '</div>';
|
||||
$s .= '<label id="gnot-label" for="gnot">' . L10n::t('Enable this addon?') . '</label>';
|
||||
$s .= '<input id="gnot-input" type="checkbox" name="gnot" value="1"'. $gnot_checked . '/>';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
/* provide a submit button */
|
||||
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="gnot-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="gnot-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -94,6 +96,5 @@ function gnot_enotify_mail(&$a,&$b) {
|
|||
if((! $b['uid']) || (! intval(get_pconfig($b['uid'], 'gnot','enable'))))
|
||||
return;
|
||||
if($b['type'] == NOTIFY_COMMENT)
|
||||
$b['subject'] = sprintf( t('[Friendica:Notify] Comment to conversation #%d'), $b['parent']);
|
||||
$b['subject'] = L10n::t('[Friendica:Notify] Comment to conversation #%d', $b['parent']);
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue