mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-10-09 16:33:01 +00:00
Merge branch '3.6-rc'
This commit is contained in:
commit
39dd3dffe0
733 changed files with 10943 additions and 8237 deletions
|
@ -26,7 +26,7 @@ msgid "LiveJournal Post Settings"
|
|||
msgstr ""
|
||||
|
||||
#: ljpost.php:72
|
||||
msgid "Enable LiveJournal Post Plugin"
|
||||
msgid "Enable LiveJournal Post Addon"
|
||||
msgstr ""
|
||||
|
||||
#: ljpost.php:77
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to LiveJournal"] = "Missatge a Livejournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Configuració d'enviaments a Livejournal";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Habilitat el plugin d'enviaments a Livejournal";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Habilitat el addon d'enviaments a Livejournal";
|
||||
$a->strings["LiveJournal username"] = "Nom d'usuari a Livejournal";
|
||||
$a->strings["LiveJournal password"] = "Contrasenya a Livejournal";
|
||||
$a->strings["Post to LiveJournal by default"] = "Enviar per defecte a Livejournal";
|
||||
|
|
|
@ -28,8 +28,8 @@ msgid "LiveJournal Post Settings"
|
|||
msgstr "Nastavení LiveJournal Post"
|
||||
|
||||
#: ljpost.php:72
|
||||
msgid "Enable LiveJournal Post Plugin"
|
||||
msgstr "Povolit LiveJournal Post plugin"
|
||||
msgid "Enable LiveJournal Post Addon"
|
||||
msgstr "Povolit LiveJournal Post addon"
|
||||
|
||||
#: ljpost.php:77
|
||||
msgid "LiveJournal username"
|
||||
|
|
|
@ -7,7 +7,7 @@ function string_plural_select_cs($n){
|
|||
;
|
||||
$a->strings["Post to LiveJournal"] = "Poslat na LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Nastavení LiveJournal Post";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Povolit LiveJournal Post plugin";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Povolit LiveJournal Post addon";
|
||||
$a->strings["LiveJournal username"] = "LiveJournal uživatelské jméno";
|
||||
$a->strings["LiveJournal password"] = "LiveJournal heslo";
|
||||
$a->strings["Post to LiveJournal by default"] = "Defaultně umístit na LiveJournal";
|
||||
|
|
|
@ -29,8 +29,8 @@ msgid "LiveJournal Post Settings"
|
|||
msgstr "LiveJournal Veröffentlichungs-Einstellungen"
|
||||
|
||||
#: ljpost.php:72
|
||||
msgid "Enable LiveJournal Post Plugin"
|
||||
msgstr "LiveJournal Post Plugin aktivieren"
|
||||
msgid "Enable LiveJournal Post Addon"
|
||||
msgstr "LiveJournal Post Addon aktivieren"
|
||||
|
||||
#: ljpost.php:77
|
||||
msgid "LiveJournal username"
|
||||
|
|
|
@ -7,7 +7,7 @@ function string_plural_select_de($n){
|
|||
;
|
||||
$a->strings["Post to LiveJournal"] = "In LiveJournal veröffentlichen.";
|
||||
$a->strings["LiveJournal Post Settings"] = "LiveJournal Veröffentlichungs-Einstellungen";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "LiveJournal Post Plugin aktivieren";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "LiveJournal Post Addon aktivieren";
|
||||
$a->strings["LiveJournal username"] = "LiveJournal Benutzername";
|
||||
$a->strings["LiveJournal password"] = "LiveJournal Passwort";
|
||||
$a->strings["Post to LiveJournal by default"] = "Standardmäßig bei LiveJournal veröffentlichen";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to LiveJournal"] = "Afiŝi ĉe LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Agordoj pri afiŝoj ĉe LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Ŝalti la LiveJournal-afiŝo kromprogramon.";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Ŝalti la LiveJournal-afiŝo kromprogramon.";
|
||||
$a->strings["LiveJournal username"] = "LiveJournal Salutnomo";
|
||||
$a->strings["LiveJournal password"] = "LiveJournal pasvorto";
|
||||
$a->strings["Post to LiveJournal by default"] = "Defaŭlte afiŝi al LiveJournal";
|
||||
|
|
|
@ -28,8 +28,8 @@ msgid "LiveJournal Post Settings"
|
|||
msgstr "Ajustes de publicación de LiveJournal"
|
||||
|
||||
#: ljpost.php:72
|
||||
msgid "Enable LiveJournal Post Plugin"
|
||||
msgstr "Habilitar Plugin de publicción de LiveJournal"
|
||||
msgid "Enable LiveJournal Post Addon"
|
||||
msgstr "Habilitar Addon de publicción de LiveJournal"
|
||||
|
||||
#: ljpost.php:77
|
||||
msgid "LiveJournal username"
|
||||
|
|
|
@ -7,7 +7,7 @@ function string_plural_select_es($n){
|
|||
;
|
||||
$a->strings["Post to LiveJournal"] = "Publicar en LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Ajustes de publicación de LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Habilitar Plugin de publicción de LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Habilitar Addon de publicción de LiveJournal";
|
||||
$a->strings["LiveJournal username"] = "Nombre de usuario de LiveJournal";
|
||||
$a->strings["LiveJournal password"] = "Contraseña de LiveJournal";
|
||||
$a->strings["Post to LiveJournal by default"] = "Publicar en LiveJournal por defecto";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to LiveJournal"] = "Poster vers LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Réglages LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Activer \"Poster vers LiveJournal\"";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Activer \"Poster vers LiveJournal\"";
|
||||
$a->strings["LiveJournal username"] = "Nom d'utilisateur LiveJournal";
|
||||
$a->strings["LiveJournal password"] = "Mot de passe";
|
||||
$a->strings["Post to LiveJournal by default"] = "Poster vers LiveJournal par défaut";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to LiveJournal"] = "";
|
||||
$a->strings["LiveJournal Post Settings"] = "";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "";
|
||||
$a->strings["LiveJournal username"] = "";
|
||||
$a->strings["LiveJournal password"] = "";
|
||||
$a->strings["Post to LiveJournal by default"] = "";
|
||||
|
|
|
@ -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:19+0000\n"
|
||||
"PO-Revision-Date: 2018-03-19 13:23+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 "LiveJournal Post Settings"
|
|||
msgstr "Impostazioni invio a LiveJournal"
|
||||
|
||||
#: ljpost.php:72
|
||||
msgid "Enable LiveJournal Post Plugin"
|
||||
msgstr "Abilita il plugin di invio a LiveJournal"
|
||||
msgid "Enable LiveJournal Post Addon"
|
||||
msgstr "Abilita il componente aggiuntivo di invio a LiveJournal"
|
||||
|
||||
#: ljpost.php:77
|
||||
msgid "LiveJournal username"
|
||||
|
|
|
@ -7,7 +7,7 @@ function string_plural_select_it($n){
|
|||
;
|
||||
$a->strings["Post to LiveJournal"] = "Invia a LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Impostazioni invio a LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Abilita il plugin di invio a LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Abilita il componente aggiuntivo di invio a LiveJournal";
|
||||
$a->strings["LiveJournal username"] = "Nome utente LiveJournal";
|
||||
$a->strings["LiveJournal password"] = "Password LiveJournal";
|
||||
$a->strings["Post to LiveJournal by default"] = "Invia sempre a LiveJournal";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to LiveJournal"] = "";
|
||||
$a->strings["LiveJournal Post Settings"] = "";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "";
|
||||
$a->strings["LiveJournal username"] = "";
|
||||
$a->strings["LiveJournal password"] = "";
|
||||
$a->strings["Post to LiveJournal by default"] = "";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to LiveJournal"] = "Post do LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Ustawienia postów do LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "";
|
||||
$a->strings["LiveJournal username"] = "Nazwa użytkownika do LiveJournal";
|
||||
$a->strings["LiveJournal password"] = "Hasło do LiveJournal";
|
||||
$a->strings["Post to LiveJournal by default"] = "automatycznie publikuj na LiveJournal";
|
||||
|
|
|
@ -28,7 +28,7 @@ msgid "LiveJournal Post Settings"
|
|||
msgstr "Configurações de publicação no LiveJournal"
|
||||
|
||||
#: ljpost.php:72
|
||||
msgid "Enable LiveJournal Post Plugin"
|
||||
msgid "Enable LiveJournal Post Addon"
|
||||
msgstr "Habilitar plug-in para publicar no LiveJournal"
|
||||
|
||||
#: ljpost.php:77
|
||||
|
|
|
@ -7,7 +7,7 @@ function string_plural_select_pt_br($n){
|
|||
;
|
||||
$a->strings["Post to LiveJournal"] = "Publicar no LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Configurações de publicação no LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Habilitar plug-in para publicar no LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Habilitar plug-in para publicar no LiveJournal";
|
||||
$a->strings["LiveJournal username"] = "Nome de usuário no LiveJournal";
|
||||
$a->strings["LiveJournal password"] = "Senha do LiveJournal";
|
||||
$a->strings["Post to LiveJournal by default"] = "Publicar no LiveJournal por padrão";
|
||||
|
|
|
@ -28,7 +28,7 @@ msgid "LiveJournal Post Settings"
|
|||
msgstr "Configurări Postări LiveJournal"
|
||||
|
||||
#: ljpost.php:72
|
||||
msgid "Enable LiveJournal Post Plugin"
|
||||
msgid "Enable LiveJournal Post Addon"
|
||||
msgstr "Activare Modul Postare LiveJournal"
|
||||
|
||||
#: ljpost.php:77
|
||||
|
|
|
@ -7,7 +7,7 @@ function string_plural_select_ro($n){
|
|||
;
|
||||
$a->strings["Post to LiveJournal"] = "Postați pe LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "Configurări Postări LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Activare Modul Postare LiveJournal";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Activare Modul Postare LiveJournal";
|
||||
$a->strings["LiveJournal username"] = "Utilizator LiveJournal";
|
||||
$a->strings["LiveJournal password"] = "Parolă LiveJournal ";
|
||||
$a->strings["Post to LiveJournal by default"] = "Postați implicit pe LiveJournal";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to LiveJournal"] = "";
|
||||
$a->strings["LiveJournal Post Settings"] = "";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "Включить LiveJournal плагин сообщений";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "Включить LiveJournal плагин сообщений";
|
||||
$a->strings["LiveJournal username"] = "";
|
||||
$a->strings["LiveJournal password"] = "";
|
||||
$a->strings["Post to LiveJournal by default"] = "";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$a->strings["Post to LiveJournal"] = "转播到LiveJournal";
|
||||
$a->strings["LiveJournal Post Settings"] = "LiveJournal转播设置";
|
||||
$a->strings["Enable LiveJournal Post Plugin"] = "使Livejournal转播插件可用";
|
||||
$a->strings["Enable LiveJournal Post Addon"] = "使Livejournal转播插件可用";
|
||||
$a->strings["LiveJournal username"] = "LiveJournal用户名";
|
||||
$a->strings["LiveJournal password"] = "LiveJournal密码";
|
||||
$a->strings["Post to LiveJournal by default"] = "默认地转播到LiveJournal";
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Name: LiveJournal Post Connector
|
||||
* Description: Post to LiveJournal
|
||||
|
@ -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 ljpost_install() {
|
||||
register_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
||||
register_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
|
||||
register_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
|
||||
register_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
|
||||
register_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
|
||||
Addon::registerHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
||||
Addon::registerHook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
|
||||
Addon::registerHook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
|
||||
Addon::registerHook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
|
||||
Addon::registerHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
|
||||
|
||||
}
|
||||
function ljpost_uninstall() {
|
||||
unregister_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
||||
unregister_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
|
||||
unregister_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
|
||||
unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
|
||||
unregister_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
|
||||
Addon::unregisterHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
||||
Addon::unregisterHook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
|
||||
Addon::unregisterHook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
|
||||
Addon::unregisterHook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
|
||||
Addon::unregisterHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,7 +42,7 @@ function ljpost_jot_nets(&$a,&$b) {
|
|||
$lj_defpost = get_pconfig(local_user(),'ljpost','post_by_default');
|
||||
$selected = ((intval($lj_defpost) == 1) ? ' checked="checked" ' : '');
|
||||
$b .= '<div class="profile-jot-net"><input type="checkbox" name="ljpost_enable" ' . $selected . ' value="1" /> '
|
||||
. t('Post to LiveJournal') . '</div>';
|
||||
. L10n::t('Post to LiveJournal') . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,30 +73,30 @@ function ljpost_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<div class="settings-block">';
|
||||
$s .= '<h3>' . t('LiveJournal Post Settings') . '</h3>';
|
||||
$s .= '<h3>' . L10n::t('LiveJournal Post Settings') . '</h3>';
|
||||
$s .= '<div id="ljpost-enable-wrapper">';
|
||||
$s .= '<label id="ljpost-enable-label" for="ljpost-checkbox">' . t('Enable LiveJournal Post Plugin') . '</label>';
|
||||
$s .= '<label id="ljpost-enable-label" for="ljpost-checkbox">' . L10n::t('Enable LiveJournal Post Addon') . '</label>';
|
||||
$s .= '<input id="ljpost-checkbox" type="checkbox" name="ljpost" value="1" ' . $checked . '/>';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
$s .= '<div id="ljpost-username-wrapper">';
|
||||
$s .= '<label id="ljpost-username-label" for="ljpost-username">' . t('LiveJournal username') . '</label>';
|
||||
$s .= '<label id="ljpost-username-label" for="ljpost-username">' . L10n::t('LiveJournal username') . '</label>';
|
||||
$s .= '<input id="ljpost-username" type="text" name="lj_username" value="' . $lj_username . '" />';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
$s .= '<div id="ljpost-password-wrapper">';
|
||||
$s .= '<label id="ljpost-password-label" for="ljpost-password">' . t('LiveJournal password') . '</label>';
|
||||
$s .= '<label id="ljpost-password-label" for="ljpost-password">' . L10n::t('LiveJournal password') . '</label>';
|
||||
$s .= '<input id="ljpost-password" type="password" name="lj_password" value="' . $lj_password . '" />';
|
||||
$s .= '</div><div class="clear"></div>';
|
||||
|
||||
$s .= '<div id="ljpost-bydefault-wrapper">';
|
||||
$s .= '<label id="ljpost-bydefault-label" for="ljpost-bydefault">' . t('Post to LiveJournal by default') . '</label>';
|
||||
$s .= '<label id="ljpost-bydefault-label" for="ljpost-bydefault">' . L10n::t('Post to LiveJournal by default') . '</label>';
|
||||
$s .= '<input id="ljpost-bydefault" type="checkbox" name="lj_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="ljpost-submit" name="ljpost-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ljpost-submit" name="ljpost-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
|
||||
|
||||
}
|
||||
|
||||
|
@ -173,16 +179,12 @@ function ljpost_send(&$a,&$b) {
|
|||
$lj_blog = xmlify('http://www.livejournal.com/interface/xmlrpc');
|
||||
|
||||
if($lj_username && $lj_password && $lj_blog) {
|
||||
|
||||
require_once('include/bbcode.php');
|
||||
require_once('include/datetime.php');
|
||||
|
||||
$title = xmlify($b['title']);
|
||||
$post = bbcode($b['body']);
|
||||
$post = BBCode::convert($b['body']);
|
||||
$post = xmlify($post);
|
||||
$tags = ljpost_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));
|
||||
|
@ -231,10 +233,10 @@ EOT;
|
|||
|
||||
logger('ljpost: data: ' . $xml, LOGGER_DATA);
|
||||
|
||||
if($lj_blog !== 'test')
|
||||
$x = post_url($lj_blog,$xml,array("Content-Type: text/xml"));
|
||||
if ($lj_blog !== 'test') {
|
||||
$x = Network::post($lj_blog, $xml, ["Content-Type: text/xml"]);
|
||||
}
|
||||
logger('posted to livejournal: ' . ($x) ? $x : '', LOGGER_DEBUG);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue