mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-20 07:17:02 +00:00
Fix Issue #2301 - Enable PSR-2 coding standards for Friendica addons
Convert all the PHP files formatting to the PSR-2 standards. No change has been made to the functionalities, and any change in behavior is not expected. The files have been converted using util/php-cs-fixer.phar and the config file is .php_cs. The project-wide conversion can be run again with the following command: > php util/php-cs-fixer.phar fix . Most of the changes are whitespace conversion from tabs to spaces. Fix #2301 for Friendica addons files.
This commit is contained in:
parent
8ef2b13360
commit
5ecc5ae756
1522 changed files with 70281 additions and 69273 deletions
3453
appnet/AppDotNet.php
3453
appnet/AppDotNet.php
File diff suppressed because it is too large
Load diff
2350
appnet/appnet.php
2350
appnet/appnet.php
File diff suppressed because it is too large
Load diff
|
@ -1,29 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
if (!function_exists('string_plural_select_cs')) {
|
||||||
function string_plural_select_cs($n){
|
function string_plural_select_cs($n)
|
||||||
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
{
|
||||||
}}
|
return ($n == 1) ? 0 : ($n >= 2 && $n <= 4) ? 1 : 2;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Přístup odmítnut.";
|
}
|
||||||
$a->strings["You are now authenticated to app.net. "] = "Nyní jste přihlášen k app.net.";
|
|
||||||
$a->strings["<p>Error fetching token. Please try again.</p>"] = "<p>Chyba v přenesení tokenu. Prosím zkuste to znovu.</p>";
|
$a->strings['Permission denied.'] = 'Přístup odmítnut.';
|
||||||
$a->strings["return to the connector page"] = "návrat ke stránce konektor";
|
$a->strings['You are now authenticated to app.net. '] = 'Nyní jste přihlášen k app.net.';
|
||||||
$a->strings["Post to app.net"] = "Poslat příspěvek na app.net";
|
$a->strings['<p>Error fetching token. Please try again.</p>'] = '<p>Chyba v přenesení tokenu. Prosím zkuste to znovu.</p>';
|
||||||
$a->strings["App.net Export"] = "App.net Export";
|
$a->strings['return to the connector page'] = 'návrat ke stránce konektor';
|
||||||
$a->strings["Currently connected to: "] = "V současné době připojen k:";
|
$a->strings['Post to app.net'] = 'Poslat příspěvek na app.net';
|
||||||
$a->strings["Enable App.net Post Plugin"] = "Aktivovat App.net Post Plugin";
|
$a->strings['App.net Export'] = 'App.net Export';
|
||||||
$a->strings["Post to App.net by default"] = "Defaultně poslat na App.net";
|
$a->strings['Currently connected to: '] = 'V současné době připojen k:';
|
||||||
$a->strings["Import the remote timeline"] = "Importovat vzdálenou časovou osu";
|
$a->strings['Enable App.net Post Plugin'] = 'Aktivovat App.net Post Plugin';
|
||||||
$a->strings["<p>Error fetching user profile. Please clear the configuration and try again.</p>"] = "<p>Chyba v přenesení uživatelského profilu. Prosím zkuste smazat konfiguraci a zkusit to znovu.</p>";
|
$a->strings['Post to App.net by default'] = 'Defaultně poslat na App.net';
|
||||||
$a->strings["<p>You have two ways to connect to App.net.</p>"] = "<p>Máte nyní dvě možnosti jak se připojit k App.net.</p>";
|
$a->strings['Import the remote timeline'] = 'Importovat vzdálenou časovou osu';
|
||||||
$a->strings["<p>First way: Register an application at <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. "] = "<p>První možnost: Registrovat svou žádost na <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> a zadat Client ID and Client Secret. ";
|
$a->strings['<p>Error fetching user profile. Please clear the configuration and try again.</p>'] = '<p>Chyba v přenesení uživatelského profilu. Prosím zkuste smazat konfiguraci a zkusit to znovu.</p>';
|
||||||
|
$a->strings['<p>You have two ways to connect to App.net.</p>'] = '<p>Máte nyní dvě možnosti jak se připojit k App.net.</p>';
|
||||||
|
$a->strings['<p>First way: Register an application at <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. '] = '<p>První možnost: Registrovat svou žádost na <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> a zadat Client ID and Client Secret. ';
|
||||||
$a->strings["Use '%s' as Redirect URI<p>"] = "Použít '%s' jako URI pro přesměrování<p>";
|
$a->strings["Use '%s' as Redirect URI<p>"] = "Použít '%s' jako URI pro přesměrování<p>";
|
||||||
$a->strings["Client ID"] = "Client ID";
|
$a->strings['Client ID'] = 'Client ID';
|
||||||
$a->strings["Client Secret"] = "Client Secret";
|
$a->strings['Client Secret'] = 'Client Secret';
|
||||||
$a->strings["<p>Second way: fetch a token at <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. "] = "<p>Druhá možnost: vložit token do <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. ";
|
$a->strings['<p>Second way: fetch a token at <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. '] = '<p>Druhá možnost: vložit token do <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. ';
|
||||||
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Nastavte tyto rámce: 'Základní', 'Stream', 'Psaní příspěvků, 'Veřejné zprávy', 'Zprávy'.</p>";
|
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Nastavte tyto rámce: 'Základní', 'Stream', 'Psaní příspěvků, 'Veřejné zprávy', 'Zprávy'.</p>";
|
||||||
$a->strings["Token"] = "Token";
|
$a->strings['Token'] = 'Token';
|
||||||
$a->strings["Sign in using App.net"] = "Přihlásit se s použitím App.net";
|
$a->strings['Sign in using App.net'] = 'Přihlásit se s použitím App.net';
|
||||||
$a->strings["Clear OAuth configuration"] = "Vymazat konfiguraci OAuth";
|
$a->strings['Clear OAuth configuration'] = 'Vymazat konfiguraci OAuth';
|
||||||
$a->strings["Save Settings"] = "Uložit Nastavení";
|
$a->strings['Save Settings'] = 'Uložit Nastavení';
|
||||||
|
|
|
@ -1,29 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if (!function_exists('string_plural_select_de')) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Zugriff verweigert.";
|
}
|
||||||
$a->strings["You are now authenticated to app.net. "] = "Du bist nun auf app.net authentifiziert.";
|
|
||||||
$a->strings["<p>Error fetching token. Please try again.</p>"] = "<p>Fehler beim Holen des Tokens, bitte versuche es später noch einmal.</p>";
|
$a->strings['Permission denied.'] = 'Zugriff verweigert.';
|
||||||
$a->strings["return to the connector page"] = "zurück zur Connector Seite";
|
$a->strings['You are now authenticated to app.net. '] = 'Du bist nun auf app.net authentifiziert.';
|
||||||
$a->strings["Post to app.net"] = "Nach app.net senden";
|
$a->strings['<p>Error fetching token. Please try again.</p>'] = '<p>Fehler beim Holen des Tokens, bitte versuche es später noch einmal.</p>';
|
||||||
$a->strings["App.net Export"] = "App.net Export";
|
$a->strings['return to the connector page'] = 'zurück zur Connector Seite';
|
||||||
$a->strings["Currently connected to: "] = "Momentan verbunden mit: ";
|
$a->strings['Post to app.net'] = 'Nach app.net senden';
|
||||||
$a->strings["Enable App.net Post Plugin"] = "Veröffentlichungen bei App.net erlauben";
|
$a->strings['App.net Export'] = 'App.net Export';
|
||||||
$a->strings["Post to App.net by default"] = "Standardmäßig bei App.net veröffentlichen";
|
$a->strings['Currently connected to: '] = 'Momentan verbunden mit: ';
|
||||||
$a->strings["Import the remote timeline"] = "Importiere die entfernte Zeitleiste";
|
$a->strings['Enable App.net Post Plugin'] = 'Veröffentlichungen bei App.net erlauben';
|
||||||
$a->strings["<p>Error fetching user profile. Please clear the configuration and try again.</p>"] = "<p>Beim Laden des Nutzerprofils ist ein Fehler aufgetreten. Bitte versuche es später noch einmal.</p>";
|
$a->strings['Post to App.net by default'] = 'Standardmäßig bei App.net veröffentlichen';
|
||||||
$a->strings["<p>You have two ways to connect to App.net.</p>"] = "<p>Du hast zwei Wege deinen friendica Account mit App.net zu verbinden.</p>";
|
$a->strings['Import the remote timeline'] = 'Importiere die entfernte Zeitleiste';
|
||||||
$a->strings["<p>First way: Register an application at <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. "] = "<p>Erster Weg: Registriere eine Anwendung unter <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> und wähle eine Client ID und ein Client Secret.";
|
$a->strings['<p>Error fetching user profile. Please clear the configuration and try again.</p>'] = '<p>Beim Laden des Nutzerprofils ist ein Fehler aufgetreten. Bitte versuche es später noch einmal.</p>';
|
||||||
|
$a->strings['<p>You have two ways to connect to App.net.</p>'] = '<p>Du hast zwei Wege deinen friendica Account mit App.net zu verbinden.</p>';
|
||||||
|
$a->strings['<p>First way: Register an application at <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. '] = '<p>Erster Weg: Registriere eine Anwendung unter <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> und wähle eine Client ID und ein Client Secret.';
|
||||||
$a->strings["Use '%s' as Redirect URI<p>"] = "Verwende '%s' als Redirect URI<p>";
|
$a->strings["Use '%s' as Redirect URI<p>"] = "Verwende '%s' als Redirect URI<p>";
|
||||||
$a->strings["Client ID"] = "Client ID";
|
$a->strings['Client ID'] = 'Client ID';
|
||||||
$a->strings["Client Secret"] = "Client Secret";
|
$a->strings['Client Secret'] = 'Client Secret';
|
||||||
$a->strings["<p>Second way: fetch a token at <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. "] = "<p>Zweiter Weg: Beantrage ein Token unter <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. ";
|
$a->strings['<p>Second way: fetch a token at <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. '] = '<p>Zweiter Weg: Beantrage ein Token unter <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. ';
|
||||||
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Verwende folgende Scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>";
|
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Verwende folgende Scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>";
|
||||||
$a->strings["Token"] = "Token";
|
$a->strings['Token'] = 'Token';
|
||||||
$a->strings["Sign in using App.net"] = "Per App.net anmelden";
|
$a->strings['Sign in using App.net'] = 'Per App.net anmelden';
|
||||||
$a->strings["Clear OAuth configuration"] = "OAuth Konfiguration löschen";
|
$a->strings['Clear OAuth configuration'] = 'OAuth Konfiguration löschen';
|
||||||
$a->strings["Save Settings"] = "Einstellungen speichern";
|
$a->strings['Save Settings'] = 'Einstellungen speichern';
|
||||||
|
|
|
@ -1,29 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fr")) {
|
if (!function_exists('string_plural_select_fr')) {
|
||||||
function string_plural_select_fr($n){
|
function string_plural_select_fr($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Autorisation refusée";
|
}
|
||||||
$a->strings["You are now authenticated to app.net. "] = "Vous êtes maintenant authentifié sur app.net";
|
|
||||||
$a->strings["<p>Error fetching token. Please try again.</p>"] = "<p>Impossible d'obtenir le jeton, merci de réessayer.</p>";
|
$a->strings['Permission denied.'] = 'Autorisation refusée';
|
||||||
$a->strings["return to the connector page"] = "revenir à la page du connecteur";
|
$a->strings['You are now authenticated to app.net. '] = 'Vous êtes maintenant authentifié sur app.net';
|
||||||
$a->strings["Post to app.net"] = "Publier sur app.net";
|
$a->strings['<p>Error fetching token. Please try again.</p>'] = "<p>Impossible d'obtenir le jeton, merci de réessayer.</p>";
|
||||||
$a->strings["App.net Export"] = "Export App.net";
|
$a->strings['return to the connector page'] = 'revenir à la page du connecteur';
|
||||||
$a->strings["Currently connected to: "] = "Actuellement connecté à :";
|
$a->strings['Post to app.net'] = 'Publier sur app.net';
|
||||||
$a->strings["Enable App.net Post Plugin"] = "Activer le plugin de publication app.net";
|
$a->strings['App.net Export'] = 'Export App.net';
|
||||||
$a->strings["Post to App.net by default"] = "Publier sur App.net par défaut";
|
$a->strings['Currently connected to: '] = 'Actuellement connecté à :';
|
||||||
$a->strings["Import the remote timeline"] = "Importer la timeline distante";
|
$a->strings['Enable App.net Post Plugin'] = 'Activer le plugin de publication app.net';
|
||||||
$a->strings["<p>Error fetching user profile. Please clear the configuration and try again.</p>"] = "<p>Impossible d'obtenir le profil utilisateur. Merci de réinitialiser la configuration et de réessayer.</p>";
|
$a->strings['Post to App.net by default'] = 'Publier sur App.net par défaut';
|
||||||
$a->strings["<p>You have two ways to connect to App.net.</p>"] = "<p>Vous avez deux possibilités pour vous connecter à App.net.</p>";
|
$a->strings['Import the remote timeline'] = 'Importer la timeline distante';
|
||||||
$a->strings["<p>First way: Register an application at <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. "] = "<p>Première méthode: Enregistrer une application sur <a href=\"https://account.app.net/developer/apps/\">App.net [en]</a> et entrez l'ID Client et le Secret Client. ";
|
$a->strings['<p>Error fetching user profile. Please clear the configuration and try again.</p>'] = "<p>Impossible d'obtenir le profil utilisateur. Merci de réinitialiser la configuration et de réessayer.</p>";
|
||||||
|
$a->strings['<p>You have two ways to connect to App.net.</p>'] = '<p>Vous avez deux possibilités pour vous connecter à App.net.</p>';
|
||||||
|
$a->strings['<p>First way: Register an application at <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. '] = "<p>Première méthode: Enregistrer une application sur <a href=\"https://account.app.net/developer/apps/\">App.net [en]</a> et entrez l'ID Client et le Secret Client. ";
|
||||||
$a->strings["Use '%s' as Redirect URI<p>"] = "Utilisez '%s' pour l'URI de Redirection";
|
$a->strings["Use '%s' as Redirect URI<p>"] = "Utilisez '%s' pour l'URI de Redirection";
|
||||||
$a->strings["Client ID"] = "ID Client";
|
$a->strings['Client ID'] = 'ID Client';
|
||||||
$a->strings["Client Secret"] = "Secret Client";
|
$a->strings['Client Secret'] = 'Secret Client';
|
||||||
$a->strings["<p>Second way: fetch a token at <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. "] = "<p>Deuxième méthode: obtenez un jeton ur <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/ [en]</a>. ";
|
$a->strings['<p>Second way: fetch a token at <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. '] = '<p>Deuxième méthode: obtenez un jeton ur <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/ [en]</a>. ';
|
||||||
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Cochez les \"scopes\" suivant: \"Basic\", \"Stream\", \"Write Post\", \"Public Messages\", \"Messages\".</p>";
|
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = 'Cochez les "scopes" suivant: "Basic", "Stream", "Write Post", "Public Messages", "Messages".</p>';
|
||||||
$a->strings["Token"] = "Jeton";
|
$a->strings['Token'] = 'Jeton';
|
||||||
$a->strings["Sign in using App.net"] = "Se connecter avec App.net";
|
$a->strings['Sign in using App.net'] = 'Se connecter avec App.net';
|
||||||
$a->strings["Clear OAuth configuration"] = "Effacer la configuration OAuth";
|
$a->strings['Clear OAuth configuration'] = 'Effacer la configuration OAuth';
|
||||||
$a->strings["Save Settings"] = "Sauvegarder les paramètres";
|
$a->strings['Save Settings'] = 'Sauvegarder les paramètres';
|
||||||
|
|
|
@ -1,29 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if (!function_exists('string_plural_select_it')) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Permesso negato.";
|
}
|
||||||
$a->strings["You are now authenticated to app.net. "] = "Sei autenticato su app.net";
|
|
||||||
$a->strings["<p>Error fetching token. Please try again.</p>"] = "<p>Errore recuperando il token. Prova di nuovo</p>";
|
$a->strings['Permission denied.'] = 'Permesso negato.';
|
||||||
$a->strings["return to the connector page"] = "ritorna alla pagina del connettore";
|
$a->strings['You are now authenticated to app.net. '] = 'Sei autenticato su app.net';
|
||||||
$a->strings["Post to app.net"] = "Invia ad app.net";
|
$a->strings['<p>Error fetching token. Please try again.</p>'] = '<p>Errore recuperando il token. Prova di nuovo</p>';
|
||||||
$a->strings["App.net Export"] = "Esporta App.net";
|
$a->strings['return to the connector page'] = 'ritorna alla pagina del connettore';
|
||||||
$a->strings["Currently connected to: "] = "Al momento connesso con:";
|
$a->strings['Post to app.net'] = 'Invia ad app.net';
|
||||||
$a->strings["Enable App.net Post Plugin"] = "Abilita il plugin di invio ad App.net";
|
$a->strings['App.net Export'] = 'Esporta App.net';
|
||||||
$a->strings["Post to App.net by default"] = "Invia sempre ad App.net";
|
$a->strings['Currently connected to: '] = 'Al momento connesso con:';
|
||||||
$a->strings["Import the remote timeline"] = "Importa la timeline remota";
|
$a->strings['Enable App.net Post Plugin'] = 'Abilita il plugin di invio ad App.net';
|
||||||
$a->strings["<p>Error fetching user profile. Please clear the configuration and try again.</p>"] = "<p>Errore recuperando il profilo utente. Svuota la configurazione e prova di nuovo.</p>";
|
$a->strings['Post to App.net by default'] = 'Invia sempre ad App.net';
|
||||||
$a->strings["<p>You have two ways to connect to App.net.</p>"] = "<p>Puoi collegarti ad App.net in due modi.</p>";
|
$a->strings['Import the remote timeline'] = 'Importa la timeline remota';
|
||||||
$a->strings["<p>First way: Register an application at <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. "] = "<p>Registrare un'applicazione su <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> e inserire Client ID e Client Secret.";
|
$a->strings['<p>Error fetching user profile. Please clear the configuration and try again.</p>'] = '<p>Errore recuperando il profilo utente. Svuota la configurazione e prova di nuovo.</p>';
|
||||||
|
$a->strings['<p>You have two ways to connect to App.net.</p>'] = '<p>Puoi collegarti ad App.net in due modi.</p>';
|
||||||
|
$a->strings['<p>First way: Register an application at <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. '] = "<p>Registrare un'applicazione su <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> e inserire Client ID e Client Secret.";
|
||||||
$a->strings["Use '%s' as Redirect URI<p>"] = "Usa '%s' come Redirect URI</p>";
|
$a->strings["Use '%s' as Redirect URI<p>"] = "Usa '%s' come Redirect URI</p>";
|
||||||
$a->strings["Client ID"] = "Client ID";
|
$a->strings['Client ID'] = 'Client ID';
|
||||||
$a->strings["Client Secret"] = "Client Secret";
|
$a->strings['Client Secret'] = 'Client Secret';
|
||||||
$a->strings["<p>Second way: fetch a token at <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. "] = "<p>Oppure puoi recuperare un token su <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>.";
|
$a->strings['<p>Second way: fetch a token at <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. '] = '<p>Oppure puoi recuperare un token su <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>.';
|
||||||
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Imposta gli ambiti 'Basic', 'Stream', 'Scrivi Post', 'Messaggi Pubblici', 'Messaggi'.</p>";
|
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Imposta gli ambiti 'Basic', 'Stream', 'Scrivi Post', 'Messaggi Pubblici', 'Messaggi'.</p>";
|
||||||
$a->strings["Token"] = "Token";
|
$a->strings['Token'] = 'Token';
|
||||||
$a->strings["Sign in using App.net"] = "Autenticati con App.net";
|
$a->strings['Sign in using App.net'] = 'Autenticati con App.net';
|
||||||
$a->strings["Clear OAuth configuration"] = "Pulisci configurazione OAuth";
|
$a->strings['Clear OAuth configuration'] = 'Pulisci configurazione OAuth';
|
||||||
$a->strings["Save Settings"] = "Salva Impostazioni";
|
$a->strings['Save Settings'] = 'Salva Impostazioni';
|
||||||
|
|
|
@ -1,29 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_nl")) {
|
if (!function_exists('string_plural_select_nl')) {
|
||||||
function string_plural_select_nl($n){
|
function string_plural_select_nl($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Toegang geweigerd";
|
}
|
||||||
$a->strings["You are now authenticated to app.net. "] = "Je bent nu aangemeld bij app.net.";
|
|
||||||
$a->strings["<p>Error fetching token. Please try again.</p>"] = "<p>Fout tijdens token fetching. Probeer het nogmaals.</p>";
|
$a->strings['Permission denied.'] = 'Toegang geweigerd';
|
||||||
$a->strings["return to the connector page"] = "ga terug naar de connector pagina";
|
$a->strings['You are now authenticated to app.net. '] = 'Je bent nu aangemeld bij app.net.';
|
||||||
$a->strings["Post to app.net"] = "Post naar app.net.";
|
$a->strings['<p>Error fetching token. Please try again.</p>'] = '<p>Fout tijdens token fetching. Probeer het nogmaals.</p>';
|
||||||
$a->strings["App.net Export"] = "App.net Export";
|
$a->strings['return to the connector page'] = 'ga terug naar de connector pagina';
|
||||||
$a->strings["Currently connected to: "] = "Momenteel verbonden met:";
|
$a->strings['Post to app.net'] = 'Post naar app.net.';
|
||||||
$a->strings["Enable App.net Post Plugin"] = "App.net Post Plugin inschakelen";
|
$a->strings['App.net Export'] = 'App.net Export';
|
||||||
$a->strings["Post to App.net by default"] = "Naar App.net posten als standaard instellen";
|
$a->strings['Currently connected to: '] = 'Momenteel verbonden met:';
|
||||||
$a->strings["Import the remote timeline"] = "The tijdlijn op afstand importeren";
|
$a->strings['Enable App.net Post Plugin'] = 'App.net Post Plugin inschakelen';
|
||||||
$a->strings["<p>Error fetching user profile. Please clear the configuration and try again.</p>"] = "<p>Fout tijdens het ophalen van gebruikersprofiel. Leeg de configuratie en probeer het opnieuw.</p>";
|
$a->strings['Post to App.net by default'] = 'Naar App.net posten als standaard instellen';
|
||||||
$a->strings["<p>You have two ways to connect to App.net.</p>"] = "<p>Er zijn twee manieren om met App.net te verbinden.</p>";
|
$a->strings['Import the remote timeline'] = 'The tijdlijn op afstand importeren';
|
||||||
$a->strings["<p>First way: Register an application at <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. "] = "";
|
$a->strings['<p>Error fetching user profile. Please clear the configuration and try again.</p>'] = '<p>Fout tijdens het ophalen van gebruikersprofiel. Leeg de configuratie en probeer het opnieuw.</p>';
|
||||||
$a->strings["Use '%s' as Redirect URI<p>"] = "";
|
$a->strings['<p>You have two ways to connect to App.net.</p>'] = '<p>Er zijn twee manieren om met App.net te verbinden.</p>';
|
||||||
$a->strings["Client ID"] = "";
|
$a->strings['<p>First way: Register an application at <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. '] = '';
|
||||||
$a->strings["Client Secret"] = "";
|
$a->strings["Use '%s' as Redirect URI<p>"] = '';
|
||||||
$a->strings["<p>Second way: fetch a token at <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. "] = "";
|
$a->strings['Client ID'] = '';
|
||||||
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "";
|
$a->strings['Client Secret'] = '';
|
||||||
$a->strings["Token"] = "";
|
$a->strings['<p>Second way: fetch a token at <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. '] = '';
|
||||||
$a->strings["Sign in using App.net"] = "";
|
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = '';
|
||||||
$a->strings["Clear OAuth configuration"] = "";
|
$a->strings['Token'] = '';
|
||||||
$a->strings["Save Settings"] = "";
|
$a->strings['Sign in using App.net'] = '';
|
||||||
|
$a->strings['Clear OAuth configuration'] = '';
|
||||||
|
$a->strings['Save Settings'] = '';
|
||||||
|
|
|
@ -1,29 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_pt_br")) {
|
if (!function_exists('string_plural_select_pt_br')) {
|
||||||
function string_plural_select_pt_br($n){
|
function string_plural_select_pt_br($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Permissão negada.";
|
}
|
||||||
$a->strings["You are now authenticated to app.net. "] = "Você está autenticado no app.net.";
|
|
||||||
$a->strings["<p>Error fetching token. Please try again.</p>"] = "Erro ocorrido na obtenção do token. Tente novamente.";
|
$a->strings['Permission denied.'] = 'Permissão negada.';
|
||||||
$a->strings["return to the connector page"] = "Volte a página de conectores.";
|
$a->strings['You are now authenticated to app.net. '] = 'Você está autenticado no app.net.';
|
||||||
$a->strings["Post to app.net"] = "Publicar no App.net";
|
$a->strings['<p>Error fetching token. Please try again.</p>'] = 'Erro ocorrido na obtenção do token. Tente novamente.';
|
||||||
$a->strings["App.net Export"] = "App.net exportar";
|
$a->strings['return to the connector page'] = 'Volte a página de conectores.';
|
||||||
$a->strings["Currently connected to: "] = "Atualmente conectado em: ";
|
$a->strings['Post to app.net'] = 'Publicar no App.net';
|
||||||
$a->strings["Enable App.net Post Plugin"] = "Habilitar plug-in para publicar no App.net";
|
$a->strings['App.net Export'] = 'App.net exportar';
|
||||||
$a->strings["Post to App.net by default"] = "Publicar em App.net por padrão";
|
$a->strings['Currently connected to: '] = 'Atualmente conectado em: ';
|
||||||
$a->strings["Import the remote timeline"] = "Importar a linha do tempo remota";
|
$a->strings['Enable App.net Post Plugin'] = 'Habilitar plug-in para publicar no App.net';
|
||||||
$a->strings["<p>Error fetching user profile. Please clear the configuration and try again.</p>"] = "Erro na obtenção do perfil do usuário. Confira as configurações e tente novamente.";
|
$a->strings['Post to App.net by default'] = 'Publicar em App.net por padrão';
|
||||||
$a->strings["<p>You have two ways to connect to App.net.</p>"] = "<p>Você possui duas formas de conectar ao App.net</p>";
|
$a->strings['Import the remote timeline'] = 'Importar a linha do tempo remota';
|
||||||
$a->strings["<p>First way: Register an application at <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. "] = "<p>1º Método: Registre uma aplicação em <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> e entre o Client ID e Client Secret";
|
$a->strings['<p>Error fetching user profile. Please clear the configuration and try again.</p>'] = 'Erro na obtenção do perfil do usuário. Confira as configurações e tente novamente.';
|
||||||
|
$a->strings['<p>You have two ways to connect to App.net.</p>'] = '<p>Você possui duas formas de conectar ao App.net</p>';
|
||||||
|
$a->strings['<p>First way: Register an application at <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. '] = '<p>1º Método: Registre uma aplicação em <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> e entre o Client ID e Client Secret';
|
||||||
$a->strings["Use '%s' as Redirect URI<p>"] = "Use '%s' como URI redirecionador<p>";
|
$a->strings["Use '%s' as Redirect URI<p>"] = "Use '%s' como URI redirecionador<p>";
|
||||||
$a->strings["Client ID"] = "Client ID";
|
$a->strings['Client ID'] = 'Client ID';
|
||||||
$a->strings["Client Secret"] = "Client Secret";
|
$a->strings['Client Secret'] = 'Client Secret';
|
||||||
$a->strings["<p>Second way: fetch a token at <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. "] = "<p>2º Método: obtenha um token em <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. ";
|
$a->strings['<p>Second way: fetch a token at <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. '] = '<p>2º Método: obtenha um token em <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. ';
|
||||||
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Adicione valor as estas saídas: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>";
|
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Adicione valor as estas saídas: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>";
|
||||||
$a->strings["Token"] = "Token";
|
$a->strings['Token'] = 'Token';
|
||||||
$a->strings["Sign in using App.net"] = "Entre usando o App.net";
|
$a->strings['Sign in using App.net'] = 'Entre usando o App.net';
|
||||||
$a->strings["Clear OAuth configuration"] = "Limpar configuração OAuth";
|
$a->strings['Clear OAuth configuration'] = 'Limpar configuração OAuth';
|
||||||
$a->strings["Save Settings"] = "Salvar Configurações";
|
$a->strings['Save Settings'] = 'Salvar Configurações';
|
||||||
|
|
|
@ -1,29 +1,31 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
if (!function_exists('string_plural_select_ro')) {
|
||||||
function string_plural_select_ro($n){
|
function string_plural_select_ro($n)
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
{
|
||||||
}}
|
return $n == 1 ? 0 : ((($n % 100 > 19) || (($n % 100 == 0) && ($n != 0))) ? 2 : 1);
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Permisiune refuzată.";
|
}
|
||||||
$a->strings["You are now authenticated to app.net. "] = "Acum sunteți autentificat pe App.net.";
|
|
||||||
$a->strings["<p>Error fetching token. Please try again.</p>"] = "<p>Eroare la procesarea token-ului. Vă rugăm să reîncercați.</p>";
|
$a->strings['Permission denied.'] = 'Permisiune refuzată.';
|
||||||
$a->strings["return to the connector page"] = "revenire la pagina de conectare";
|
$a->strings['You are now authenticated to app.net. '] = 'Acum sunteți autentificat pe App.net.';
|
||||||
$a->strings["Post to app.net"] = "Postați pe App.net";
|
$a->strings['<p>Error fetching token. Please try again.</p>'] = '<p>Eroare la procesarea token-ului. Vă rugăm să reîncercați.</p>';
|
||||||
$a->strings["App.net Export"] = "Exportare pe App.net";
|
$a->strings['return to the connector page'] = 'revenire la pagina de conectare';
|
||||||
$a->strings["Currently connected to: "] = "Conectat curent la:";
|
$a->strings['Post to app.net'] = 'Postați pe App.net';
|
||||||
$a->strings["Enable App.net Post Plugin"] = "Activare Modul Postare pe App.net";
|
$a->strings['App.net Export'] = 'Exportare pe App.net';
|
||||||
$a->strings["Post to App.net by default"] = "Postați implicit pe App.net";
|
$a->strings['Currently connected to: '] = 'Conectat curent la:';
|
||||||
$a->strings["Import the remote timeline"] = "Importare cronologie la distanță";
|
$a->strings['Enable App.net Post Plugin'] = 'Activare Modul Postare pe App.net';
|
||||||
$a->strings["<p>Error fetching user profile. Please clear the configuration and try again.</p>"] = "<p>Eroare la procesarea profilului de utilizator. Vă rugăm să ștergeți configurarea şi apoi reîncercați.</p>";
|
$a->strings['Post to App.net by default'] = 'Postați implicit pe App.net';
|
||||||
$a->strings["<p>You have two ways to connect to App.net.</p>"] = "<p>Aveți două modalități de a vă conecta la App.net.</p>";
|
$a->strings['Import the remote timeline'] = 'Importare cronologie la distanță';
|
||||||
$a->strings["<p>First way: Register an application at <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. "] = "<p>Prima modalitate: Înregistrați o cerere pe <a href=\"https://account.app.net/developer/apps/\">https://account.app.net/developer/apps/</a> şi introduceți ID Client şi Cheia Secretă Client.";
|
$a->strings['<p>Error fetching user profile. Please clear the configuration and try again.</p>'] = '<p>Eroare la procesarea profilului de utilizator. Vă rugăm să ștergeți configurarea şi apoi reîncercați.</p>';
|
||||||
|
$a->strings['<p>You have two ways to connect to App.net.</p>'] = '<p>Aveți două modalități de a vă conecta la App.net.</p>';
|
||||||
|
$a->strings['<p>First way: Register an application at <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> and enter Client ID and Client Secret. '] = '<p>Prima modalitate: Înregistrați o cerere pe <a href="https://account.app.net/developer/apps/">https://account.app.net/developer/apps/</a> şi introduceți ID Client şi Cheia Secretă Client.';
|
||||||
$a->strings["Use '%s' as Redirect URI<p>"] = "Utilizați '%s' ca URI de Redirecţionare<p>";
|
$a->strings["Use '%s' as Redirect URI<p>"] = "Utilizați '%s' ca URI de Redirecţionare<p>";
|
||||||
$a->strings["Client ID"] = "ID Client";
|
$a->strings['Client ID'] = 'ID Client';
|
||||||
$a->strings["Client Secret"] = "Cheia Secretă Client";
|
$a->strings['Client Secret'] = 'Cheia Secretă Client';
|
||||||
$a->strings["<p>Second way: fetch a token at <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a>. "] = "<p>A doua cale: autorizați un indicativ de acces token de pe <a href=\"http://dev-lite.jonathonduerig.com/\">http://dev-lite.jonathonduerig.com/</a> .";
|
$a->strings['<p>Second way: fetch a token at <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a>. '] = '<p>A doua cale: autorizați un indicativ de acces token de pe <a href="http://dev-lite.jonathonduerig.com/">http://dev-lite.jonathonduerig.com/</a> .';
|
||||||
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Stabiliți aceste scopuri: 'De Bază', 'Flux', 'Scriere Postare', 'Mesaje Publice', 'Mesaje'.</p>";
|
$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.</p>"] = "Stabiliți aceste scopuri: 'De Bază', 'Flux', 'Scriere Postare', 'Mesaje Publice', 'Mesaje'.</p>";
|
||||||
$a->strings["Token"] = "Token";
|
$a->strings['Token'] = 'Token';
|
||||||
$a->strings["Sign in using App.net"] = "Autentificați-vă utilizând App.net";
|
$a->strings['Sign in using App.net'] = 'Autentificați-vă utilizând App.net';
|
||||||
$a->strings["Clear OAuth configuration"] = "Ștergeți configurările OAuth";
|
$a->strings['Clear OAuth configuration'] = 'Ștergeți configurările OAuth';
|
||||||
$a->strings["Save Settings"] = "Salvare Configurări";
|
$a->strings['Save Settings'] = 'Salvare Configurări';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Description: Blackout your ~friendica node during a given period, requires PHP >= 5.3
|
* Description: Blackout your ~friendica node during a given period, requires PHP >= 5.3
|
||||||
* License: MIT
|
* License: MIT
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Tobias Diekershoff <https://f.diekershoff.de/~tobias>
|
* Author: Tobias Diekershoff <https://f.diekershoff.de/~tobias>.
|
||||||
*
|
*
|
||||||
* About
|
* About
|
||||||
* =====
|
* =====
|
||||||
|
@ -48,73 +48,83 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
function blackout_install()
|
||||||
|
{
|
||||||
function blackout_install() {
|
|
||||||
register_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
|
register_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
|
||||||
}
|
}
|
||||||
|
|
||||||
function blackout_uninstall() {
|
function blackout_uninstall()
|
||||||
|
{
|
||||||
unregister_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
|
unregister_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
|
||||||
}
|
}
|
||||||
function blackout_redirect ($a, $b) {
|
function blackout_redirect($a, $b)
|
||||||
|
{
|
||||||
// if we have a logged in user, don't throw her out
|
// if we have a logged in user, don't throw her out
|
||||||
if (local_user()) {
|
if (local_user()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! (version_compare(PHP_VERSION, '5.3.0') >= 0))
|
if (!(version_compare(PHP_VERSION, '5.3.0') >= 0)) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// else...
|
// else...
|
||||||
$mystart = get_config('blackout','begindate');
|
$mystart = get_config('blackout', 'begindate');
|
||||||
$myend = get_config('blackout','enddate');
|
$myend = get_config('blackout', 'enddate');
|
||||||
$myurl = get_config('blackout','url');
|
$myurl = get_config('blackout', 'url');
|
||||||
$now = time();
|
$now = time();
|
||||||
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
|
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
|
||||||
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
|
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
|
||||||
if ( $date1 && $date2 ) {
|
if ($date1 && $date2) {
|
||||||
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart)->format('U');
|
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart)->format('U');
|
||||||
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend)->format('U');
|
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend)->format('U');
|
||||||
} else {
|
} else {
|
||||||
$date1 = 0;
|
$date1 = 0;
|
||||||
$date2 = 0;
|
$date2 = 0;
|
||||||
}
|
}
|
||||||
if (( $date1 <= $now ) && ( $now <= $date2 )) {
|
if (($date1 <= $now) && ($now <= $date2)) {
|
||||||
logger('redirecting user to blackout page');
|
logger('redirecting user to blackout page');
|
||||||
goaway($myurl);
|
goaway($myurl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function blackout_plugin_admin(&$a, &$o) {
|
function blackout_plugin_admin(&$a, &$o)
|
||||||
$mystart = get_config('blackout','begindate');
|
{
|
||||||
if (! is_string($mystart)) { $mystart = "YYYY-MM-DD:hhmm"; }
|
$mystart = get_config('blackout', 'begindate');
|
||||||
$myend = get_config('blackout','enddate');
|
if (!is_string($mystart)) {
|
||||||
if (! is_string($myend)) { $myend = "YYYY-MM-DD:hhmm"; }
|
$mystart = 'YYYY-MM-DD:hhmm';
|
||||||
$myurl = get_config('blackout','url');
|
}
|
||||||
if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
|
$myend = get_config('blackout', 'enddate');
|
||||||
$t = get_markup_template( "admin.tpl", "addon/blackout/" );
|
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(
|
$o = replace_macros($t, array(
|
||||||
'$submit' => t('Save Settings'),
|
'$submit' => t('Save Settings'),
|
||||||
'$rurl' => array("rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"),
|
'$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"),
|
'$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, ""),
|
'$enddate' => array('enddate', 'End of the Blackout<br />(YYYY-MM-DD hh:mm)', $myend, ''),
|
||||||
|
|
||||||
));
|
));
|
||||||
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
|
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
|
||||||
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
|
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
|
||||||
if ($date2 < $date1) {
|
if ($date2 < $date1) {
|
||||||
$o = "<div style='border: 2px solid #f00; bakckground: #b00; text-align: center; padding: 10px; margin: 30px;'>The end-date is prior to the start-date of the blackout, you should fix this.</div>" . $o;
|
$o = "<div style='border: 2px solid #f00; bakckground: #b00; text-align: center; padding: 10px; margin: 30px;'>The end-date is prior to the start-date of the blackout, you should fix this.</div>".$o;
|
||||||
} else {
|
} else {
|
||||||
$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;
|
$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_plugin_admin_post(&$a)
|
||||||
|
{
|
||||||
$begindate = trim($_POST['startdate']);
|
$begindate = trim($_POST['startdate']);
|
||||||
$enddate = trim($_POST['enddate']);
|
$enddate = trim($_POST['enddate']);
|
||||||
$url = trim($_POST['rurl']);
|
$url = trim($_POST['rurl']);
|
||||||
set_config('blackout','begindate',$begindate);
|
set_config('blackout', 'begindate', $begindate);
|
||||||
set_config('blackout','enddate',$enddate);
|
set_config('blackout', 'enddate', $enddate);
|
||||||
set_config('blackout','url',$url);
|
set_config('blackout', 'url', $url);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Enviar";
|
$a->strings['Submit'] = 'Enviar';
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
if (!function_exists('string_plural_select_cs')) {
|
||||||
function string_plural_select_cs($n){
|
function string_plural_select_cs($n)
|
||||||
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
{
|
||||||
}}
|
return ($n == 1) ? 0 : ($n >= 2 && $n <= 4) ? 1 : 2;
|
||||||
;
|
}
|
||||||
$a->strings["Save Settings"] = "Uložit Nastavení";
|
}
|
||||||
$a->strings["Redirect URL"] = "URL Přesměrování";
|
|
||||||
$a->strings["all your visitors from the web will be redirected to this URL"] = "všichni vaši návštěvníci z webu budou přesměrování na tuto URL adresu";
|
$a->strings['Save Settings'] = 'Uložit Nastavení';
|
||||||
$a->strings["Begin of the Blackout"] = "Zahájení odstávky";
|
$a->strings['Redirect URL'] = 'URL Přesměrování';
|
||||||
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "formát je <em>RRRR</em> rok, <em>MM</em> měsíc, <em>DD</em> den, <em>hh</em> hodina a <em>mm</em> minuta";
|
$a->strings['all your visitors from the web will be redirected to this URL'] = 'všichni vaši návštěvníci z webu budou přesměrování na tuto URL adresu';
|
||||||
$a->strings["End of the Blackout"] = "Konec odstávky";
|
$a->strings['Begin of the Blackout'] = 'Zahájení odstávky';
|
||||||
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Datum konce odstávky je před datem zahájení odstávky prosím opravte to.";
|
$a->strings['format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute'] = 'formát je <em>RRRR</em> rok, <em>MM</em> měsíc, <em>DD</em> den, <em>hh</em> hodina a <em>mm</em> minuta';
|
||||||
|
$a->strings['End of the Blackout'] = 'Konec odstávky';
|
||||||
|
$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'Datum konce odstávky je před datem zahájení odstávky prosím opravte to.';
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if (!function_exists('string_plural_select_de')) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Save Settings"] = "Einstellungen speichern";
|
}
|
||||||
$a->strings["Redirect URL"] = "Umleitungs-URL";
|
|
||||||
$a->strings["all your visitors from the web will be redirected to this URL"] = "Alle Besucher der Webseite werden zu dieser URL umgeleitet";
|
$a->strings['Save Settings'] = 'Einstellungen speichern';
|
||||||
$a->strings["Begin of the Blackout"] = "Beginn des Blackouts";
|
$a->strings['Redirect URL'] = 'Umleitungs-URL';
|
||||||
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "Das Format ist <em>YYYY</em> Jahr, <em>MM</em> Monat, <em>DD</em> Tag, <em>hh</em> Stunde und <em>mm</em> Minute";
|
$a->strings['all your visitors from the web will be redirected to this URL'] = 'Alle Besucher der Webseite werden zu dieser URL umgeleitet';
|
||||||
$a->strings["End of the Blackout"] = "Ende des Blackouts";
|
$a->strings['Begin of the Blackout'] = 'Beginn des Blackouts';
|
||||||
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Das Enddatum liegt vor dem Startdatum des Blackouts, du solltest dies korrigieren.";
|
$a->strings['format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute'] = 'Das Format ist <em>YYYY</em> Jahr, <em>MM</em> Monat, <em>DD</em> Tag, <em>hh</em> Stunde und <em>mm</em> Minute';
|
||||||
|
$a->strings['End of the Blackout'] = 'Ende des Blackouts';
|
||||||
|
$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'Das Enddatum liegt vor dem Startdatum des Blackouts, du solltest dies korrigieren.';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Sendi";
|
$a->strings['Submit'] = 'Sendi';
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_es")) {
|
if (!function_exists('string_plural_select_es')) {
|
||||||
function string_plural_select_es($n){
|
function string_plural_select_es($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Save Settings"] = "Guardar configuración";
|
}
|
||||||
$a->strings["Redirect URL"] = "Redirigir URL";
|
|
||||||
$a->strings["all your visitors from the web will be redirected to this URL"] = "todos los visitantes de la web serán redirigidos a esta dirección.";
|
$a->strings['Save Settings'] = 'Guardar configuración';
|
||||||
$a->strings["Begin of the Blackout"] = "Inicio del apagón.";
|
$a->strings['Redirect URL'] = 'Redirigir URL';
|
||||||
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "formato es <em>YYYY</em> año, <em>MM</em> mes, <em>DD</em> día, <em>hh</em> hora y <em>mm</em> minuto";
|
$a->strings['all your visitors from the web will be redirected to this URL'] = 'todos los visitantes de la web serán redirigidos a esta dirección.';
|
||||||
$a->strings["End of the Blackout"] = "Fin del apagón.";
|
$a->strings['Begin of the Blackout'] = 'Inicio del apagón.';
|
||||||
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "La fecha de final del apagón es antes de la fecha de inicio, deberías arreglar esto.";
|
$a->strings['format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute'] = 'formato es <em>YYYY</em> año, <em>MM</em> mes, <em>DD</em> día, <em>hh</em> hora y <em>mm</em> minuto';
|
||||||
|
$a->strings['End of the Blackout'] = 'Fin del apagón.';
|
||||||
|
$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'La fecha de final del apagón es antes de la fecha de inicio, deberías arreglar esto.';
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fr")) {
|
if (!function_exists('string_plural_select_fr')) {
|
||||||
function string_plural_select_fr($n){
|
function string_plural_select_fr($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Save Settings"] = "Sauvegarder les paramètres";
|
}
|
||||||
$a->strings["Redirect URL"] = "Adresse de redirection";
|
|
||||||
$a->strings["all your visitors from the web will be redirected to this URL"] = "Tous vos visiteurs venant du web seront redirigés vers cette URL.";
|
$a->strings['Save Settings'] = 'Sauvegarder les paramètres';
|
||||||
$a->strings["Begin of the Blackout"] = "Début du blackout";
|
$a->strings['Redirect URL'] = 'Adresse de redirection';
|
||||||
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "Le format est <em>YYYY</em> année, <em>MM</em> mois, <em>DD</em> jour, <em>hh</em> heure and <em>mm</em> minute";
|
$a->strings['all your visitors from the web will be redirected to this URL'] = 'Tous vos visiteurs venant du web seront redirigés vers cette URL.';
|
||||||
$a->strings["End of the Blackout"] = "Fin du blackout";
|
$a->strings['Begin of the Blackout'] = 'Début du blackout';
|
||||||
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "La date de fin est antérieure à la date de début. Veuillez corriger cela.";
|
$a->strings['format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute'] = 'Le format est <em>YYYY</em> année, <em>MM</em> mois, <em>DD</em> jour, <em>hh</em> heure and <em>mm</em> minute';
|
||||||
|
$a->strings['End of the Blackout'] = 'Fin du blackout';
|
||||||
|
$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'La date de fin est antérieure à la date de début. Veuillez corriger cela.';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Senda inn";
|
$a->strings['Submit'] = 'Senda inn';
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if (!function_exists('string_plural_select_it')) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Save Settings"] = "Salva Impostazioni";
|
}
|
||||||
$a->strings["Redirect URL"] = "URL di reindirizzamento";
|
|
||||||
$a->strings["all your visitors from the web will be redirected to this URL"] = "tutti i visitatori dal web verranno reindirizzati a questo URL";
|
$a->strings['Save Settings'] = 'Salva Impostazioni';
|
||||||
$a->strings["Begin of the Blackout"] = "Inzio del blackout";
|
$a->strings['Redirect URL'] = 'URL di reindirizzamento';
|
||||||
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "il formato è <em>YYYY</em> anno, <em>MM</em> mese, <em>DD</em> giorno, <em>hh</em> ora e <em>mm</em> minuto";
|
$a->strings['all your visitors from the web will be redirected to this URL'] = 'tutti i visitatori dal web verranno reindirizzati a questo URL';
|
||||||
$a->strings["End of the Blackout"] = "Fine del blackout";
|
$a->strings['Begin of the Blackout'] = 'Inzio del blackout';
|
||||||
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "La data di fine è precedente alla data di inizio. Dovresti sistemarla.";
|
$a->strings['format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute'] = 'il formato è <em>YYYY</em> anno, <em>MM</em> mese, <em>DD</em> giorno, <em>hh</em> ora e <em>mm</em> minuto';
|
||||||
|
$a->strings['End of the Blackout'] = 'Fine del blackout';
|
||||||
|
$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'La data di fine è precedente alla data di inizio. Dovresti sistemarla.';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Lagre";
|
$a->strings['Submit'] = 'Lagre';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Potwierdź";
|
$a->strings['Submit'] = 'Potwierdź';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Enviar";
|
$a->strings['Submit'] = 'Enviar';
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
if (!function_exists('string_plural_select_ro')) {
|
||||||
function string_plural_select_ro($n){
|
function string_plural_select_ro($n)
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
{
|
||||||
}}
|
return $n == 1 ? 0 : ((($n % 100 > 19) || (($n % 100 == 0) && ($n != 0))) ? 2 : 1);
|
||||||
;
|
}
|
||||||
$a->strings["Save Settings"] = "Salvare Configurări";
|
}
|
||||||
$a->strings["Redirect URL"] = "URL de Redirecționare";
|
|
||||||
$a->strings["all your visitors from the web will be redirected to this URL"] = "toți vizitatorii dvs. de pe web vor fi redirecționați către acest URL";
|
$a->strings['Save Settings'] = 'Salvare Configurări';
|
||||||
$a->strings["Begin of the Blackout"] = "Pornire punct Blackout";
|
$a->strings['Redirect URL'] = 'URL de Redirecționare';
|
||||||
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "formatul este <em>YYYY</em> anul, <em>MM</em> luna, <em>DD</em> ziua, <em>hh</em> ora și <em>mm</em> minute";
|
$a->strings['all your visitors from the web will be redirected to this URL'] = 'toți vizitatorii dvs. de pe web vor fi redirecționați către acest URL';
|
||||||
$a->strings["End of the Blackout"] = "Finalizare punct Blackout";
|
$a->strings['Begin of the Blackout'] = 'Pornire punct Blackout';
|
||||||
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Data de finalizare este anterioară punctului blackout de pornire, ar trebui să corectați aceasta.";
|
$a->strings['format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute'] = 'formatul este <em>YYYY</em> anul, <em>MM</em> luna, <em>DD</em> ziua, <em>hh</em> ora și <em>mm</em> minute';
|
||||||
|
$a->strings['End of the Blackout'] = 'Finalizare punct Blackout';
|
||||||
|
$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'Data de finalizare este anterioară punctului blackout de pornire, ar trebui să corectați aceasta.';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Подтвердить";
|
$a->strings['Submit'] = 'Подтвердить';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Spara";
|
$a->strings['Submit'] = 'Spara';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "提交";
|
$a->strings['Submit'] = '提交';
|
||||||
|
|
|
@ -5,161 +5,155 @@
|
||||||
* Name: blockem
|
* Name: blockem
|
||||||
* Description: block people
|
* Description: block people
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
function blockem_install()
|
||||||
function blockem_install() {
|
{
|
||||||
register_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
|
register_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
|
||||||
register_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
|
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', 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
||||||
register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
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('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
|
||||||
register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
||||||
register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
|
register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blockem_uninstall()
|
||||||
function blockem_uninstall() {
|
{
|
||||||
unregister_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
|
unregister_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
|
||||||
unregister_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
|
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', 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
||||||
unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
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('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
|
||||||
unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
||||||
unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
|
unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blockem_addon_settings(&$a, &$s)
|
||||||
|
{
|
||||||
|
if (!local_user()) {
|
||||||
|
return;
|
||||||
function blockem_addon_settings(&$a,&$s) {
|
}
|
||||||
|
|
||||||
if(! local_user())
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||||
|
|
||||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/blockem/blockem.css' . '" media="all" />' . "\r\n";
|
$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 = get_pconfig(local_user(),'blockem','words');
|
if (!$words) {
|
||||||
if(! $words)
|
$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 .= '<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>'.t('"Blockem"').'</h3>';
|
||||||
$s .= '</span>';
|
$s .= '</span>';
|
||||||
$s .= '<div id="settings_blockem_expanded" class="settings-block" style="display: none;">';
|
$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 .= '<span class="fakelink" onclick="openClose(\'settings_blockem_expanded\'); openClose(\'settings_blockem_inflated\');">';
|
||||||
$s .= '<h3>' . t('"Blockem"') . '</h3>';
|
$s .= '<h3>'.t('"Blockem"').'</h3>';
|
||||||
$s .= '</span>';
|
$s .= '</span>';
|
||||||
|
|
||||||
$s .= '<div id="blockem-wrapper">';
|
$s .= '<div id="blockem-wrapper">';
|
||||||
$s .= '<label id="blockem-label" for="blockem-words">' . t('Comma separated profile URLS to block') . ' </label>';
|
$s .= '<label id="blockem-label" for="blockem-words">'.t('Comma separated profile URLS to block').' </label>';
|
||||||
$s .= '<textarea id="blockem-words" type="text" name="blockem-words" >' . htmlspecialchars($words) . '</textarea>';
|
$s .= '<textarea id="blockem-words" type="text" name="blockem-words" >'.htmlspecialchars($words).'</textarea>';
|
||||||
$s .= '</div><div class="clear"></div>';
|
$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="'.t('Save Settings').'" /></div></div>';
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockem_addon_settings_post(&$a,&$b) {
|
function blockem_addon_settings_post(&$a, &$b)
|
||||||
|
{
|
||||||
|
if (!local_user()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(! local_user())
|
if ($_POST['blockem-submit']) {
|
||||||
return;
|
set_pconfig(local_user(), 'blockem', 'words', trim($_POST['blockem-words']));
|
||||||
|
info(t('BLOCKEM Settings saved.').EOL);
|
||||||
if($_POST['blockem-submit']) {
|
}
|
||||||
set_pconfig(local_user(),'blockem','words',trim($_POST['blockem-words']));
|
|
||||||
info( t('BLOCKEM Settings saved.') . EOL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blockem_enotify_store(&$a, &$b)
|
||||||
|
{
|
||||||
|
$words = get_pconfig($b['uid'], 'blockem', 'words');
|
||||||
|
if ($words) {
|
||||||
|
$arr = explode(',', $words);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
function blockem_enotify_store(&$a,&$b) {
|
$found = false;
|
||||||
|
if (count($arr)) {
|
||||||
|
foreach ($arr as $word) {
|
||||||
|
if (!strlen(trim($word))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$words = get_pconfig($b['uid'],'blockem','words');
|
if (link_compare($b['url'], $word)) {
|
||||||
if($words) {
|
$found = true;
|
||||||
$arr = explode(',',$words);
|
break;
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
return;
|
}
|
||||||
}
|
if ($found) {
|
||||||
|
$b['abort'] = true;
|
||||||
$found = false;
|
}
|
||||||
if(count($arr)) {
|
|
||||||
foreach($arr as $word) {
|
|
||||||
if(! strlen(trim($word))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(link_compare($b['url'],$word)) {
|
|
||||||
$found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if($found) {
|
|
||||||
$b['abort'] = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockem_prepare_body(&$a,&$b) {
|
function blockem_prepare_body(&$a, &$b)
|
||||||
|
{
|
||||||
|
if (!local_user()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(! local_user())
|
$words = null;
|
||||||
return;
|
if (local_user()) {
|
||||||
|
$words = get_pconfig(local_user(), 'blockem', 'words');
|
||||||
|
}
|
||||||
|
if ($words) {
|
||||||
|
$arr = explode(',', $words);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$words = null;
|
$found = false;
|
||||||
if(local_user()) {
|
if (count($arr)) {
|
||||||
$words = get_pconfig(local_user(),'blockem','words');
|
foreach ($arr as $word) {
|
||||||
}
|
if (!strlen(trim($word))) {
|
||||||
if($words) {
|
continue;
|
||||||
$arr = explode(',',$words);
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$found = false;
|
if (link_compare($b['item']['author-link'], $word)) {
|
||||||
if(count($arr)) {
|
$found = true;
|
||||||
foreach($arr as $word) {
|
break;
|
||||||
if(! strlen(trim($word))) {
|
}
|
||||||
continue;
|
}
|
||||||
}
|
}
|
||||||
|
if ($found) {
|
||||||
if(link_compare($b['item']['author-link'],$word)) {
|
$rnd = random_string(8);
|
||||||
$found = true;
|
$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>';
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blockem_display_item(&$a, &$b)
|
||||||
function blockem_display_item(&$a,&$b) {
|
{
|
||||||
if(strstr($b['output']['body'],'id="blockem-wrap-'))
|
if (strstr($b['output']['body'], 'id="blockem-wrap-')) {
|
||||||
$b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg";
|
$b['output']['thumb'] = $a->get_baseurl().'/images/person-80.jpg';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blockem_conversation_start(&$a, &$b)
|
||||||
|
{
|
||||||
|
if (!local_user()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
function blockem_conversation_start(&$a,&$b) {
|
$words = get_pconfig(local_user(), 'blockem', 'words');
|
||||||
|
if ($words) {
|
||||||
if(! local_user())
|
$a->data['blockem'] = explode(',', $words);
|
||||||
return;
|
}
|
||||||
|
$a->page['htmlhead'] .= <<< 'EOT'
|
||||||
$words = get_pconfig(local_user(),'blockem','words');
|
|
||||||
if($words) {
|
|
||||||
$a->data['blockem'] = explode(',',$words);
|
|
||||||
}
|
|
||||||
$a->page['htmlhead'] .= <<< EOT
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function blockemBlock(author) {
|
function blockemBlock(author) {
|
||||||
|
@ -175,59 +169,64 @@ function blockemUnblock(author) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
EOT;
|
EOT;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockem_item_photo_menu(&$a,&$b) {
|
function blockem_item_photo_menu(&$a, &$b)
|
||||||
|
{
|
||||||
|
if ((!local_user()) || ($b['item']['self'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if((! local_user()) || ($b['item']['self']))
|
$blocked = false;
|
||||||
return;
|
$author = $b['item']['author-link'];
|
||||||
|
if (is_array($a->data['blockem'])) {
|
||||||
$blocked = false;
|
foreach ($a->data['blockem'] as $bloke) {
|
||||||
$author = $b['item']['author-link'];
|
if (link_compare($bloke, $author)) {
|
||||||
if(is_array($a->data['blockem'])) {
|
$blocked = true;
|
||||||
foreach($a->data['blockem'] as $bloke) {
|
break;
|
||||||
if(link_compare($bloke,$author)) {
|
}
|
||||||
$blocked = true;
|
}
|
||||||
break;
|
}
|
||||||
}
|
if ($blocked) {
|
||||||
}
|
$b['menu'][ t('Unblock Author')] = 'javascript:blockemUnblock(\''.$author.'\');';
|
||||||
}
|
} else {
|
||||||
if($blocked)
|
$b['menu'][ t('Block Author')] = 'javascript:blockemBlock(\''.$author.'\');';
|
||||||
$b['menu'][ t('Unblock Author')] = 'javascript:blockemUnblock(\'' . $author . '\');';
|
}
|
||||||
else
|
|
||||||
$b['menu'][ t('Block Author')] = 'javascript:blockemBlock(\'' . $author . '\');';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockem_module() {}
|
function blockem_module()
|
||||||
|
{
|
||||||
|
}
|
||||||
function blockem_init(&$a) {
|
|
||||||
|
function blockem_init(&$a)
|
||||||
if(! local_user())
|
{
|
||||||
return;
|
if (!local_user()) {
|
||||||
|
return;
|
||||||
$words = get_pconfig(local_user(),'blockem','words');
|
}
|
||||||
|
|
||||||
if(array_key_exists('block',$_GET) && $_GET['block']) {
|
$words = get_pconfig(local_user(), 'blockem', 'words');
|
||||||
if(strlen($words))
|
|
||||||
$words .= ',';
|
if (array_key_exists('block', $_GET) && $_GET['block']) {
|
||||||
$words .= trim($_GET['block']);
|
if (strlen($words)) {
|
||||||
}
|
$words .= ',';
|
||||||
if(array_key_exists('unblock',$_GET) && $_GET['unblock']) {
|
}
|
||||||
$arr = explode(',',$words);
|
$words .= trim($_GET['block']);
|
||||||
$newarr = array();
|
}
|
||||||
|
if (array_key_exists('unblock', $_GET) && $_GET['unblock']) {
|
||||||
if(count($arr)) {
|
$arr = explode(',', $words);
|
||||||
foreach($arr as $x) {
|
$newarr = array();
|
||||||
if(! link_compare(trim($x),trim($_GET['unblock'])))
|
|
||||||
$newarr[] = $x;
|
if (count($arr)) {
|
||||||
}
|
foreach ($arr as $x) {
|
||||||
}
|
if (!link_compare(trim($x), trim($_GET['unblock']))) {
|
||||||
$words = implode(',',$newarr);
|
$newarr[] = $x;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
set_pconfig(local_user(),'blockem','words',$words);
|
}
|
||||||
info( t('blockem settings updated') . EOL );
|
$words = implode(',', $newarr);
|
||||||
killme();
|
}
|
||||||
|
|
||||||
|
set_pconfig(local_user(), 'blockem', 'words', $words);
|
||||||
|
info(t('blockem settings updated').EOL);
|
||||||
|
killme();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "Configuració de \"Bloqueig\"";
|
$a->strings['"Blockem" Settings'] = 'Configuració de "Bloqueig"';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "URLS dels perfils a bloquejar, separats per comes";
|
$a->strings['Comma separated profile URLS to block'] = 'URLS dels perfils a bloquejar, separats per comes';
|
||||||
$a->strings["Submit"] = "Enviar";
|
$a->strings['Submit'] = 'Enviar';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "Guardada la configuració de BLOQUEIG.";
|
$a->strings['BLOCKEM Settings saved.'] = 'Guardada la configuració de BLOQUEIG.';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "Bloquejar %s - Clica per obrir/tancar";
|
$a->strings['Blocked %s - Click to open/close'] = 'Bloquejar %s - Clica per obrir/tancar';
|
||||||
$a->strings["Unblock Author"] = "Desbloquejar Autor";
|
$a->strings['Unblock Author'] = 'Desbloquejar Autor';
|
||||||
$a->strings["Block Author"] = "Bloquejar Autor";
|
$a->strings['Block Author'] = 'Bloquejar Autor';
|
||||||
$a->strings["blockem settings updated"] = "Actualitzar la Configuració de bloqueig";
|
$a->strings['blockem settings updated'] = 'Actualitzar la Configuració de bloqueig';
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
if (!function_exists('string_plural_select_cs')) {
|
||||||
function string_plural_select_cs($n){
|
function string_plural_select_cs($n)
|
||||||
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
{
|
||||||
}}
|
return ($n == 1) ? 0 : ($n >= 2 && $n <= 4) ? 1 : 2;
|
||||||
;
|
}
|
||||||
$a->strings["\"Blockem\""] = "\"Blockem\"";
|
}
|
||||||
$a->strings["Comma separated profile URLS to block"] = "Čárkou oddělené URL adresy profilů určených k ignorování";
|
|
||||||
$a->strings["Save Settings"] = "Uložit Nastavení";
|
$a->strings['"Blockem"'] = '"Blockem"';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "BLOCKEM nastavení uloženo.";
|
$a->strings['Comma separated profile URLS to block'] = 'Čárkou oddělené URL adresy profilů určených k ignorování';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "Blokován %s - Klikněte pro otevření/zavření";
|
$a->strings['Save Settings'] = 'Uložit Nastavení';
|
||||||
$a->strings["Unblock Author"] = "Odblokovat autora";
|
$a->strings['BLOCKEM Settings saved.'] = 'BLOCKEM nastavení uloženo.';
|
||||||
$a->strings["Block Author"] = "Zablokovat autora";
|
$a->strings['Blocked %s - Click to open/close'] = 'Blokován %s - Klikněte pro otevření/zavření';
|
||||||
$a->strings["blockem settings updated"] = "blockem nastavení aktualizováno";
|
$a->strings['Unblock Author'] = 'Odblokovat autora';
|
||||||
|
$a->strings['Block Author'] = 'Zablokovat autora';
|
||||||
|
$a->strings['blockem settings updated'] = 'blockem nastavení aktualizováno';
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if (!function_exists('string_plural_select_de')) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
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" Settings'] = '"Blockem"-Einstellungen';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "BLOCKEM-Einstellungen gesichert.";
|
$a->strings['Comma separated profile URLS to block'] = 'Profil-URLs, die geblockt werden sollen (durch Kommas getrennt)';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "%s blockiert - Zum Öffnen/Schließen klicken";
|
$a->strings['Submit'] = 'Senden';
|
||||||
$a->strings["Unblock Author"] = "Autor freischalten";
|
$a->strings['BLOCKEM Settings saved.'] = 'BLOCKEM-Einstellungen gesichert.';
|
||||||
$a->strings["Block Author"] = "Autor blockieren";
|
$a->strings['Blocked %s - Click to open/close'] = '%s blockiert - Zum Öffnen/Schließen klicken';
|
||||||
$a->strings["blockem settings updated"] = "blockem Einstellungen aktualisiert";
|
$a->strings['Unblock Author'] = 'Autor freischalten';
|
||||||
|
$a->strings['Block Author'] = 'Autor blockieren';
|
||||||
|
$a->strings['blockem settings updated'] = 'blockem Einstellungen aktualisiert';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "\"Blockem\" Agordoj";
|
$a->strings['"Blockem" Settings'] = '"Blockem" Agordoj';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "Blokotaj URL adresoj, disigita per komo";
|
$a->strings['Comma separated profile URLS to block'] = 'Blokotaj URL adresoj, disigita per komo';
|
||||||
$a->strings["Submit"] = "Sendi";
|
$a->strings['Submit'] = 'Sendi';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "Konservis Agordojn de BLOCKEM.";
|
$a->strings['BLOCKEM Settings saved.'] = 'Konservis Agordojn de BLOCKEM.';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "%s blokita - Klaku por malfermi/fermi";
|
$a->strings['Blocked %s - Click to open/close'] = '%s blokita - Klaku por malfermi/fermi';
|
||||||
$a->strings["Unblock Author"] = "Malbloki Aŭtoron";
|
$a->strings['Unblock Author'] = 'Malbloki Aŭtoron';
|
||||||
$a->strings["Block Author"] = "Bloki Aŭtoron";
|
$a->strings['Block Author'] = 'Bloki Aŭtoron';
|
||||||
$a->strings["blockem settings updated"] = "Ĝisdatigis la blockem agordojn";
|
$a->strings['blockem settings updated'] = 'Ĝisdatigis la blockem agordojn';
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_es")) {
|
if (!function_exists('string_plural_select_es')) {
|
||||||
function string_plural_select_es($n){
|
function string_plural_select_es($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["\"Blockem\""] = "\"Bloquealos\"";
|
}
|
||||||
$a->strings["Comma separated profile URLS to block"] = "URLS separados por coma para bloquear.";
|
|
||||||
$a->strings["Save Settings"] = "Guardar configuración";
|
$a->strings['"Blockem"'] = '"Bloquealos"';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "Configuración de BLOQUEALOS guardado.";
|
$a->strings['Comma separated profile URLS to block'] = 'URLS separados por coma para bloquear.';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "%s bloqueado - click para abrir/cerrar";
|
$a->strings['Save Settings'] = 'Guardar configuración';
|
||||||
$a->strings["Unblock Author"] = "Desbloquear autor";
|
$a->strings['BLOCKEM Settings saved.'] = 'Configuración de BLOQUEALOS guardado.';
|
||||||
$a->strings["Block Author"] = "Bloquear autor";
|
$a->strings['Blocked %s - Click to open/close'] = '%s bloqueado - click para abrir/cerrar';
|
||||||
$a->strings["blockem settings updated"] = "configuración de BLOQUEALOS actualizado";
|
$a->strings['Unblock Author'] = 'Desbloquear autor';
|
||||||
|
$a->strings['Block Author'] = 'Bloquear autor';
|
||||||
|
$a->strings['blockem settings updated'] = 'configuración de BLOQUEALOS actualizado';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "Réglages de Blockem";
|
$a->strings['"Blockem" Settings'] = 'Réglages de Blockem';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "Liste d'URLS de profils à bloquer, séparés par des virgules";
|
$a->strings['Comma separated profile URLS to block'] = "Liste d'URLS de profils à bloquer, séparés par des virgules";
|
||||||
$a->strings["Submit"] = "Envoyer";
|
$a->strings['Submit'] = 'Envoyer';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "Réglages Blockem sauvés.";
|
$a->strings['BLOCKEM Settings saved.'] = 'Réglages Blockem sauvés.';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "Bloqué %s - Cliquez pour ouvrir/fermer";
|
$a->strings['Blocked %s - Click to open/close'] = 'Bloqué %s - Cliquez pour ouvrir/fermer';
|
||||||
$a->strings["Unblock Author"] = "Débloquer l'auteur";
|
$a->strings['Unblock Author'] = "Débloquer l'auteur";
|
||||||
$a->strings["Block Author"] = "Bloquer l'auteur";
|
$a->strings['Block Author'] = "Bloquer l'auteur";
|
||||||
$a->strings["blockem settings updated"] = "Réglages blockem sauvés";
|
$a->strings['blockem settings updated'] = 'Réglages blockem sauvés';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "\"Blockem\" stillingar";
|
$a->strings['"Blockem" Settings'] = '"Blockem" stillingar';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "Banna lista af forsíðum (komma á milli)";
|
$a->strings['Comma separated profile URLS to block'] = 'Banna lista af forsíðum (komma á milli)';
|
||||||
$a->strings["Submit"] = "Senda inn";
|
$a->strings['Submit'] = 'Senda inn';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "BLOCKEM stillingar vistaðar.";
|
$a->strings['BLOCKEM Settings saved.'] = 'BLOCKEM stillingar vistaðar.';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "%s sett í straff - Smella til að taka úr/setja á";
|
$a->strings['Blocked %s - Click to open/close'] = '%s sett í straff - Smella til að taka úr/setja á';
|
||||||
$a->strings["Unblock Author"] = "Leyfa notanda";
|
$a->strings['Unblock Author'] = 'Leyfa notanda';
|
||||||
$a->strings["Block Author"] = "Banna notanda";
|
$a->strings['Block Author'] = 'Banna notanda';
|
||||||
$a->strings["blockem settings updated"] = "";
|
$a->strings['blockem settings updated'] = '';
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if (!function_exists('string_plural_select_it')) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["\"Blockem\""] = "\"Blockem\"";
|
}
|
||||||
$a->strings["Comma separated profile URLS to block"] = "Lista, separata da virgola, di indirizzi da bloccare";
|
|
||||||
$a->strings["Save Settings"] = "Salva Impostazioni";
|
$a->strings['"Blockem"'] = '"Blockem"';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "Impostazioni BLOCKEM salvate.";
|
$a->strings['Comma separated profile URLS to block'] = 'Lista, separata da virgola, di indirizzi da bloccare';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "%s bloccato - Clicca per aprire/chiudere";
|
$a->strings['Save Settings'] = 'Salva Impostazioni';
|
||||||
$a->strings["Unblock Author"] = "Sblocca autore";
|
$a->strings['BLOCKEM Settings saved.'] = 'Impostazioni BLOCKEM salvate.';
|
||||||
$a->strings["Block Author"] = "Blocca autore";
|
$a->strings['Blocked %s - Click to open/close'] = '%s bloccato - Clicca per aprire/chiudere';
|
||||||
$a->strings["blockem settings updated"] = "Impostazioni 'blockem' aggiornate.";
|
$a->strings['Unblock Author'] = 'Sblocca autore';
|
||||||
|
$a->strings['Block Author'] = 'Blocca autore';
|
||||||
|
$a->strings['blockem settings updated'] = "Impostazioni 'blockem' aggiornate.";
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "";
|
$a->strings['"Blockem" Settings'] = '';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "";
|
$a->strings['Comma separated profile URLS to block'] = '';
|
||||||
$a->strings["Submit"] = "Lagre";
|
$a->strings['Submit'] = 'Lagre';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "";
|
$a->strings['BLOCKEM Settings saved.'] = '';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "";
|
$a->strings['Blocked %s - Click to open/close'] = '';
|
||||||
$a->strings["Unblock Author"] = "";
|
$a->strings['Unblock Author'] = '';
|
||||||
$a->strings["Block Author"] = "";
|
$a->strings['Block Author'] = '';
|
||||||
$a->strings["blockem settings updated"] = "";
|
$a->strings['blockem settings updated'] = '';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "";
|
$a->strings['"Blockem" Settings'] = '';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "";
|
$a->strings['Comma separated profile URLS to block'] = '';
|
||||||
$a->strings["Submit"] = "Potwierdź";
|
$a->strings['Submit'] = 'Potwierdź';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "";
|
$a->strings['BLOCKEM Settings saved.'] = '';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "";
|
$a->strings['Blocked %s - Click to open/close'] = '';
|
||||||
$a->strings["Unblock Author"] = "Odblokuj autora";
|
$a->strings['Unblock Author'] = 'Odblokuj autora';
|
||||||
$a->strings["Block Author"] = "Zablokuj autora";
|
$a->strings['Block Author'] = 'Zablokuj autora';
|
||||||
$a->strings["blockem settings updated"] = "";
|
$a->strings['blockem settings updated'] = '';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "Configurações \"Blockem\"";
|
$a->strings['"Blockem" Settings'] = 'Configurações "Blockem"';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "URLS de perfis separados por vírgulas a serem bloqueados";
|
$a->strings['Comma separated profile URLS to block'] = 'URLS de perfis separados por vírgulas a serem bloqueados';
|
||||||
$a->strings["Submit"] = "Enviar";
|
$a->strings['Submit'] = 'Enviar';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "Configurações BLOCKEM armazenadas.";
|
$a->strings['BLOCKEM Settings saved.'] = 'Configurações BLOCKEM armazenadas.';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "Bloqueado %s - Clique para abrir/fechar";
|
$a->strings['Blocked %s - Click to open/close'] = 'Bloqueado %s - Clique para abrir/fechar';
|
||||||
$a->strings["Unblock Author"] = "Desbloqueie Autor";
|
$a->strings['Unblock Author'] = 'Desbloqueie Autor';
|
||||||
$a->strings["Block Author"] = "Bloqueie Autor";
|
$a->strings['Block Author'] = 'Bloqueie Autor';
|
||||||
$a->strings["blockem settings updated"] = "configurações blockem atualizadas";
|
$a->strings['blockem settings updated'] = 'configurações blockem atualizadas';
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
if (!function_exists('string_plural_select_ro')) {
|
||||||
function string_plural_select_ro($n){
|
function string_plural_select_ro($n)
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
{
|
||||||
}}
|
return $n == 1 ? 0 : ((($n % 100 > 19) || (($n % 100 == 0) && ($n != 0))) ? 2 : 1);
|
||||||
;
|
}
|
||||||
$a->strings["\"Blockem\""] = "\"Blockem\"";
|
}
|
||||||
$a->strings["Comma separated profile URLS to block"] = "Adresele URL de profil, de blocat, separate prin virgulă";
|
|
||||||
$a->strings["Save Settings"] = "Salvare Configurări";
|
$a->strings['"Blockem"'] = '"Blockem"';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "Configurările BLOCKEM au fost salvate.";
|
$a->strings['Comma separated profile URLS to block'] = 'Adresele URL de profil, de blocat, separate prin virgulă';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "%s Blocate - Apăsați pentru a deschide/închide";
|
$a->strings['Save Settings'] = 'Salvare Configurări';
|
||||||
$a->strings["Unblock Author"] = "Deblocare Autor";
|
$a->strings['BLOCKEM Settings saved.'] = 'Configurările BLOCKEM au fost salvate.';
|
||||||
$a->strings["Block Author"] = "Blocare Autor";
|
$a->strings['Blocked %s - Click to open/close'] = '%s Blocate - Apăsați pentru a deschide/închide';
|
||||||
$a->strings["blockem settings updated"] = "Configurările blockem au fost actualizate";
|
$a->strings['Unblock Author'] = 'Deblocare Autor';
|
||||||
|
$a->strings['Block Author'] = 'Blocare Autor';
|
||||||
|
$a->strings['blockem settings updated'] = 'Configurările blockem au fost actualizate';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "\"Blockem\" настройки";
|
$a->strings['"Blockem" Settings'] = '"Blockem" настройки';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "URLS, которые заблокировать (список через запятую)";
|
$a->strings['Comma separated profile URLS to block'] = 'URLS, которые заблокировать (список через запятую)';
|
||||||
$a->strings["Submit"] = "Подтвердить";
|
$a->strings['Submit'] = 'Подтвердить';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "BLOCKEM-Настройки сохранены.";
|
$a->strings['BLOCKEM Settings saved.'] = 'BLOCKEM-Настройки сохранены.';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "Заблокированные %s - Нажмите, чтобы открыть/закрыть";
|
$a->strings['Blocked %s - Click to open/close'] = 'Заблокированные %s - Нажмите, чтобы открыть/закрыть';
|
||||||
$a->strings["Unblock Author"] = "";
|
$a->strings['Unblock Author'] = '';
|
||||||
$a->strings["Block Author"] = "Блокировать Автора";
|
$a->strings['Block Author'] = 'Блокировать Автора';
|
||||||
$a->strings["blockem settings updated"] = "\"Blockem\" настройки обновлены";
|
$a->strings['blockem settings updated'] = '"Blockem" настройки обновлены';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Spara";
|
$a->strings['Submit'] = 'Spara';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["\"Blockem\" Settings"] = "「Blockem」配置";
|
$a->strings['"Blockem" Settings'] = '「Blockem」配置';
|
||||||
$a->strings["Comma separated profile URLS to block"] = "逗号分简介URL为栏";
|
$a->strings['Comma separated profile URLS to block'] = '逗号分简介URL为栏';
|
||||||
$a->strings["Submit"] = "提交";
|
$a->strings['Submit'] = '提交';
|
||||||
$a->strings["BLOCKEM Settings saved."] = "「Blockem」配置保存了。";
|
$a->strings['BLOCKEM Settings saved.'] = '「Blockem」配置保存了。';
|
||||||
$a->strings["Blocked %s - Click to open/close"] = "%s拦了-点击为开关";
|
$a->strings['Blocked %s - Click to open/close'] = '%s拦了-点击为开关';
|
||||||
$a->strings["Unblock Author"] = "不拦作家";
|
$a->strings['Unblock Author'] = '不拦作家';
|
||||||
$a->strings["Block Author"] = "拦作家";
|
$a->strings['Block Author'] = '拦作家';
|
||||||
$a->strings["blockem settings updated"] = "blockem设置更新了";
|
$a->strings['blockem settings updated'] = 'blockem设置更新了';
|
||||||
|
|
|
@ -3,183 +3,181 @@
|
||||||
/**
|
/**
|
||||||
* Name: Blogger Post Connector
|
* Name: Blogger Post Connector
|
||||||
* Description: Post to Blogger (or anything else which uses blogger XMLRPC API)
|
* Description: Post to Blogger (or anything else which uses blogger XMLRPC API)
|
||||||
* Version: 1.0
|
* Version: 1.0.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
function blogger_install()
|
||||||
function blogger_install() {
|
{
|
||||||
register_hook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
|
register_hook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
|
||||||
register_hook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
|
register_hook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
|
||||||
register_hook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
|
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', 'addon/blogger/blogger.php', 'blogger_settings');
|
||||||
register_hook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
register_hook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
||||||
|
|
||||||
}
|
}
|
||||||
function blogger_uninstall() {
|
function blogger_uninstall()
|
||||||
|
{
|
||||||
unregister_hook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
|
unregister_hook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
|
||||||
unregister_hook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
|
unregister_hook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
|
||||||
unregister_hook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
|
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', 'addon/blogger/blogger.php', 'blogger_settings');
|
||||||
unregister_hook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
unregister_hook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
||||||
|
|
||||||
// obsolete - remove
|
// obsolete - remove
|
||||||
unregister_hook('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
|
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', 'addon/blogger/blogger.php', 'blogger_settings');
|
||||||
unregister_hook('plugin_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
unregister_hook('plugin_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blogger_jot_nets(&$a, &$b)
|
||||||
function blogger_jot_nets(&$a,&$b) {
|
{
|
||||||
if(! local_user())
|
if (!local_user()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$bl_post = get_pconfig(local_user(),'blogger','post');
|
$bl_post = get_pconfig(local_user(), 'blogger', 'post');
|
||||||
if(intval($bl_post) == 1) {
|
if (intval($bl_post) == 1) {
|
||||||
$bl_defpost = get_pconfig(local_user(),'blogger','post_by_default');
|
$bl_defpost = get_pconfig(local_user(), 'blogger', 'post_by_default');
|
||||||
$selected = ((intval($bl_defpost) == 1) ? ' checked="checked" ' : '');
|
$selected = ((intval($bl_defpost) == 1) ? ' checked="checked" ' : '');
|
||||||
$b .= '<div class="profile-jot-net"><input type="checkbox" name="blogger_enable" ' . $selected . ' value="1" /> '
|
$b .= '<div class="profile-jot-net"><input type="checkbox" name="blogger_enable" '.$selected.' value="1" /> '
|
||||||
. t('Post to blogger') . '</div>';
|
.t('Post to blogger').'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blogger_settings(&$a, &$s)
|
||||||
function blogger_settings(&$a,&$s) {
|
{
|
||||||
|
if (!local_user()) {
|
||||||
if(! local_user())
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||||
|
|
||||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/blogger/blogger.css' . '" media="all" />' . "\r\n";
|
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/blogger/blogger.css'.'" media="all" />'."\r\n";
|
||||||
|
|
||||||
/* Get the current state of our config variables */
|
/* Get the current state of our config variables */
|
||||||
|
|
||||||
$enabled = get_pconfig(local_user(),'blogger','post');
|
$enabled = get_pconfig(local_user(), 'blogger', 'post');
|
||||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||||
$css = (($enabled) ? '' : '-disabled');
|
$css = (($enabled) ? '' : '-disabled');
|
||||||
|
|
||||||
$def_enabled = get_pconfig(local_user(),'blogger','post_by_default');
|
$def_enabled = get_pconfig(local_user(), 'blogger', 'post_by_default');
|
||||||
|
|
||||||
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
|
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
|
||||||
|
|
||||||
$bl_username = get_pconfig(local_user(), 'blogger', 'bl_username');
|
$bl_username = get_pconfig(local_user(), 'blogger', 'bl_username');
|
||||||
$bl_password = get_pconfig(local_user(), 'blogger', 'bl_password');
|
$bl_password = get_pconfig(local_user(), 'blogger', 'bl_password');
|
||||||
$bl_blog = get_pconfig(local_user(), 'blogger', 'bl_blog');
|
$bl_blog = get_pconfig(local_user(), 'blogger', 'bl_blog');
|
||||||
|
|
||||||
|
|
||||||
/* Add some HTML to the existing form */
|
/* 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 .= '<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 .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'.t('Blogger Export').'</h3>';
|
||||||
$s .= '</span>';
|
$s .= '</span>';
|
||||||
$s .= '<div id="settings_blogger_expanded" class="settings-block" style="display: none;">';
|
$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 .= '<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 .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'.t('Blogger Export').'</h3>';
|
||||||
$s .= '</span>';
|
$s .= '</span>';
|
||||||
|
|
||||||
$s .= '<div id="blogger-enable-wrapper">';
|
$s .= '<div id="blogger-enable-wrapper">';
|
||||||
$s .= '<label id="blogger-enable-label" for="blogger-checkbox">' . t('Enable Blogger Post Plugin') . '</label>';
|
$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 .= '<input id="blogger-checkbox" type="checkbox" name="blogger" value="1" '.$checked.'/>';
|
||||||
$s .= '</div><div class="clear"></div>';
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
|
||||||
$s .= '<div id="blogger-username-wrapper">';
|
$s .= '<div id="blogger-username-wrapper">';
|
||||||
$s .= '<label id="blogger-username-label" for="blogger-username">' . t('Blogger username') . '</label>';
|
$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 .= '<input id="blogger-username" type="text" name="bl_username" value="'.$bl_username.'" />';
|
||||||
$s .= '</div><div class="clear"></div>';
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
|
||||||
$s .= '<div id="blogger-password-wrapper">';
|
$s .= '<div id="blogger-password-wrapper">';
|
||||||
$s .= '<label id="blogger-password-label" for="blogger-password">' . t('Blogger password') . '</label>';
|
$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 .= '<input id="blogger-password" type="password" name="bl_password" value="'.$bl_password.'" />';
|
||||||
$s .= '</div><div class="clear"></div>';
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
|
||||||
$s .= '<div id="blogger-blog-wrapper">';
|
$s .= '<div id="blogger-blog-wrapper">';
|
||||||
$s .= '<label id="blogger-blog-label" for="blogger-blog">' . t('Blogger API URL') . '</label>';
|
$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 .= '<input id="blogger-blog" type="text" name="bl_blog" value="'.$bl_blog.'" />';
|
||||||
$s .= '</div><div class="clear"></div>';
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
|
||||||
$s .= '<div id="blogger-bydefault-wrapper">';
|
$s .= '<div id="blogger-bydefault-wrapper">';
|
||||||
$s .= '<label id="blogger-bydefault-label" for="blogger-bydefault">' . t('Post to Blogger by default') . '</label>';
|
$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 .= '<input id="blogger-bydefault" type="checkbox" name="bl_bydefault" value="1" '.$def_checked.'/>';
|
||||||
$s .= '</div><div class="clear"></div>';
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
|
||||||
/* provide a submit button */
|
/* 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 class="settings-submit-wrapper" ><input type="submit" id="blogger-submit" name="blogger-submit" class="settings-submit" value="'.t('Save Settings').'" /></div></div>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blogger_settings_post(&$a, &$b)
|
||||||
function blogger_settings_post(&$a,&$b) {
|
{
|
||||||
|
if (x($_POST, 'blogger-submit')) {
|
||||||
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','post',intval($_POST['blogger']));
|
set_pconfig(local_user(), 'blogger', 'bl_username', trim($_POST['bl_username']));
|
||||||
set_pconfig(local_user(),'blogger','post_by_default',intval($_POST['bl_bydefault']));
|
set_pconfig(local_user(), 'blogger', 'bl_password', trim($_POST['bl_password']));
|
||||||
set_pconfig(local_user(),'blogger','bl_username',trim($_POST['bl_username']));
|
set_pconfig(local_user(), 'blogger', 'bl_blog', trim($_POST['bl_blog']));
|
||||||
set_pconfig(local_user(),'blogger','bl_password',trim($_POST['bl_password']));
|
}
|
||||||
set_pconfig(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
|
// This can probably be changed to allow editing by pointing to a different API endpoint
|
||||||
|
|
||||||
if($b['edit'])
|
if ($b['edit']) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if((! local_user()) || (local_user() != $b['uid']))
|
if ((!local_user()) || (local_user() != $b['uid'])) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if($b['private'] || $b['parent'])
|
if ($b['private'] || $b['parent']) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$bl_post = intval(get_pconfig(local_user(),'blogger','post'));
|
$bl_post = intval(get_pconfig(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($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'blogger','post_by_default')))
|
if ($_REQUEST['api_source'] && intval(get_pconfig(local_user(), 'blogger', 'post_by_default'))) {
|
||||||
$bl_enable = 1;
|
$bl_enable = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if(! $bl_enable)
|
if (!$bl_enable) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(strlen($b['postopts']))
|
if (strlen($b['postopts'])) {
|
||||||
$b['postopts'] .= ',';
|
$b['postopts'] .= ',';
|
||||||
$b['postopts'] .= 'blogger';
|
}
|
||||||
|
$b['postopts'] .= 'blogger';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blogger_send(&$a, &$b)
|
||||||
|
{
|
||||||
|
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
|
||||||
function blogger_send(&$a,&$b) {
|
|
||||||
|
|
||||||
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(! strstr($b['postopts'],'blogger'))
|
if (!strstr($b['postopts'], 'blogger')) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if($b['parent'] != $b['id'])
|
if ($b['parent'] != $b['id']) {
|
||||||
return;
|
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(get_pconfig($b['uid'],'blogger','bl_username'));
|
if ($bl_username && $bl_password && $bl_blog) {
|
||||||
$bl_password = xmlify(get_pconfig($b['uid'],'blogger','bl_password'));
|
require_once 'include/bbcode.php';
|
||||||
$bl_blog = get_pconfig($b['uid'],'blogger','bl_blog');
|
|
||||||
|
|
||||||
if($bl_username && $bl_password && $bl_blog) {
|
$title = '<title>'.(($b['title']) ? $b['title'] : t('Post from Friendica')).'</title>';
|
||||||
|
$post = $title.bbcode($b['body']);
|
||||||
|
$post = xmlify($post);
|
||||||
|
|
||||||
require_once('include/bbcode.php');
|
$xml = <<< EOT
|
||||||
|
|
||||||
$title = '<title>' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . '</title>';
|
|
||||||
$post = $title . bbcode($b['body']);
|
|
||||||
$post = xmlify($post);
|
|
||||||
|
|
||||||
$xml = <<< EOT
|
|
||||||
<?xml version=\"1.0\" encoding=\"utf-8\"?>
|
<?xml version=\"1.0\" encoding=\"utf-8\"?>
|
||||||
<methodCall>
|
<methodCall>
|
||||||
<methodName>blogger.newPost</methodName>
|
<methodName>blogger.newPost</methodName>
|
||||||
|
@ -195,12 +193,11 @@ function blogger_send(&$a,&$b) {
|
||||||
|
|
||||||
EOT;
|
EOT;
|
||||||
|
|
||||||
logger('blogger: data: ' . $xml, LOGGER_DATA);
|
logger('blogger: data: '.$xml, LOGGER_DATA);
|
||||||
|
|
||||||
if($bl_blog !== 'test')
|
if ($bl_blog !== 'test') {
|
||||||
$x = post_url($bl_blog,$xml);
|
$x = post_url($bl_blog, $xml);
|
||||||
logger('posted to blogger: ' . (($x) ? $x : ''), LOGGER_DEBUG);
|
}
|
||||||
|
logger('posted to blogger: '.(($x) ? $x : ''), LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Post to blogger"] = "Enviament a blogger";
|
$a->strings['Post to blogger'] = 'Enviament a blogger';
|
||||||
$a->strings["Blogger Post Settings"] = "Ajustos d'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 Plugin'] = "Habilita el Plugin d'Enviaments a Blogger";
|
||||||
$a->strings["Blogger username"] = "Nom d'usuari a blogger";
|
$a->strings['Blogger username'] = "Nom d'usuari a blogger";
|
||||||
$a->strings["Blogger password"] = "Contrasenya a blogger";
|
$a->strings['Blogger password'] = 'Contrasenya a blogger';
|
||||||
$a->strings["Blogger API URL"] = "Blogger API URL";
|
$a->strings['Blogger API URL'] = 'Blogger API URL';
|
||||||
$a->strings["Post to Blogger by default"] = "Enviament a Blogger per defecte";
|
$a->strings['Post to Blogger by default'] = 'Enviament a Blogger per defecte';
|
||||||
$a->strings["Submit"] = "Enviar";
|
$a->strings['Submit'] = 'Enviar';
|
||||||
$a->strings["Post from Friendica"] = "Enviament des de Friendica";
|
$a->strings['Post from Friendica'] = 'Enviament des de Friendica';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if (!function_exists('string_plural_select_de')) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$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['Post to blogger'] = 'Auf Blogger posten';
|
||||||
$a->strings["Blogger username"] = "Blogger-Benutzername";
|
$a->strings['Blogger Export'] = 'Blogger Export';
|
||||||
$a->strings["Blogger password"] = "Blogger-Passwort";
|
$a->strings['Enable Blogger Post Plugin'] = 'Blogger-Post-Plugin aktivieren';
|
||||||
$a->strings["Blogger API URL"] = "Blogger-API-URL";
|
$a->strings['Blogger username'] = 'Blogger-Benutzername';
|
||||||
$a->strings["Post to Blogger by default"] = "Standardmäßig auf Blogger posten";
|
$a->strings['Blogger password'] = 'Blogger-Passwort';
|
||||||
$a->strings["Save Settings"] = "Einstellungen speichern";
|
$a->strings['Blogger API URL'] = 'Blogger-API-URL';
|
||||||
$a->strings["Post from Friendica"] = "Post via Friendica";
|
$a->strings['Post to Blogger by default'] = 'Standardmäßig auf Blogger posten';
|
||||||
|
$a->strings['Save Settings'] = 'Einstellungen speichern';
|
||||||
|
$a->strings['Post from Friendica'] = 'Post via Friendica';
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Post to blogger"] = "Afiŝi al blogger";
|
$a->strings['Post to blogger'] = 'Afiŝi al blogger';
|
||||||
$a->strings["Blogger Post Settings"] = "Agordo pri Blogger Afiŝoj";
|
$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 Plugin'] = 'Ŝalti la Blogger afiŝo kromprogramon';
|
||||||
$a->strings["Blogger username"] = "Blogger uzantonomo";
|
$a->strings['Blogger username'] = 'Blogger uzantonomo';
|
||||||
$a->strings["Blogger password"] = "Blogger pasvorto";
|
$a->strings['Blogger password'] = 'Blogger pasvorto';
|
||||||
$a->strings["Blogger API URL"] = "Blogger API URL";
|
$a->strings['Blogger API URL'] = 'Blogger API URL';
|
||||||
$a->strings["Post to Blogger by default"] = "Defaŭlte afiŝi al Blogger";
|
$a->strings['Post to Blogger by default'] = 'Defaŭlte afiŝi al Blogger';
|
||||||
$a->strings["Submit"] = "Sendi";
|
$a->strings['Submit'] = 'Sendi';
|
||||||
$a->strings["Post from Friendica"] = "Afiŝo de Friendica";
|
$a->strings['Post from Friendica'] = 'Afiŝo de Friendica';
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Post to blogger"] = "Publícar en Blogger";
|
$a->strings['Post to blogger'] = 'Publícar en Blogger';
|
||||||
$a->strings["Blogger Post Settings"] = "Configuración de las publicaciones en Blogger";
|
$a->strings['Blogger Post Settings'] = 'Configuración de las publicaciones en Blogger';
|
||||||
$a->strings["Enable Blogger Post Plugin"] = "Activar el módulo de publicación en Blogger";
|
$a->strings['Enable Blogger Post Plugin'] = 'Activar el módulo de publicación en Blogger';
|
||||||
$a->strings["Blogger username"] = "Nombre de usuario de Blogger";
|
$a->strings['Blogger username'] = 'Nombre de usuario de Blogger';
|
||||||
$a->strings["Blogger password"] = "Contraseña de Blogger";
|
$a->strings['Blogger password'] = 'Contraseña de Blogger';
|
||||||
$a->strings["Blogger API URL"] = "Dirección de la API de Blogger";
|
$a->strings['Blogger API URL'] = 'Dirección de la API de Blogger';
|
||||||
$a->strings["Post to Blogger by default"] = "Publicar en Blogger por defecto";
|
$a->strings['Post to Blogger by default'] = 'Publicar en Blogger por defecto';
|
||||||
$a->strings["Submit"] = "Envíar";
|
$a->strings['Submit'] = 'Envíar';
|
||||||
$a->strings["Post from Friendica"] = "Publicado desde Friendica";
|
$a->strings['Post from Friendica'] = 'Publicado desde Friendica';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fr")) {
|
if (!function_exists('string_plural_select_fr')) {
|
||||||
function string_plural_select_fr($n){
|
function string_plural_select_fr($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Post to blogger"] = "Poster sur Blogger";
|
}
|
||||||
$a->strings["Blogger Export"] = "";
|
|
||||||
$a->strings["Enable Blogger Post Plugin"] = "Activer le connecteur Blogger";
|
$a->strings['Post to blogger'] = 'Poster sur Blogger';
|
||||||
$a->strings["Blogger username"] = "Nom d'utilisateur Blogger";
|
$a->strings['Blogger Export'] = '';
|
||||||
$a->strings["Blogger password"] = "Mot de passe Blogger";
|
$a->strings['Enable Blogger Post Plugin'] = 'Activer le connecteur Blogger';
|
||||||
$a->strings["Blogger API URL"] = "URL de l'API de Blogger";
|
$a->strings['Blogger username'] = "Nom d'utilisateur Blogger";
|
||||||
$a->strings["Post to Blogger by default"] = "";
|
$a->strings['Blogger password'] = 'Mot de passe Blogger';
|
||||||
$a->strings["Save Settings"] = "Sauvegarder les paramètres";
|
$a->strings['Blogger API URL'] = "URL de l'API de Blogger";
|
||||||
$a->strings["Post from Friendica"] = "";
|
$a->strings['Post to Blogger by default'] = '';
|
||||||
|
$a->strings['Save Settings'] = 'Sauvegarder les paramètres';
|
||||||
|
$a->strings['Post from Friendica'] = '';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_is")) {
|
if (!function_exists('string_plural_select_is')) {
|
||||||
function string_plural_select_is($n){
|
function string_plural_select_is($n)
|
||||||
return ($n % 10 != 1 || $n % 100 == 11);;
|
{
|
||||||
}}
|
return $n % 10 != 1 || $n % 100 == 11;
|
||||||
;
|
}
|
||||||
$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['Post to blogger'] = 'Senda færslu á bloggara';
|
||||||
$a->strings["Blogger username"] = "Notandanafn bloggara";
|
$a->strings['Blogger Export'] = 'Flytja út blogg';
|
||||||
$a->strings["Blogger password"] = "Aðgangsorð bloggara";
|
$a->strings['Enable Blogger Post Plugin'] = 'Virkja sendiviðbót fyrir blogg';
|
||||||
$a->strings["Blogger API URL"] = "API slóð bloggs";
|
$a->strings['Blogger username'] = 'Notandanafn bloggara';
|
||||||
$a->strings["Post to Blogger by default"] = "Sjálfgefið láta færslur flæða inn á blogg";
|
$a->strings['Blogger password'] = 'Aðgangsorð bloggara';
|
||||||
$a->strings["Save Settings"] = "Vista stillingar";
|
$a->strings['Blogger API URL'] = 'API slóð bloggs';
|
||||||
$a->strings["Post from Friendica"] = "Færslur frá Friendica";
|
$a->strings['Post to Blogger by default'] = 'Sjálfgefið láta færslur flæða inn á blogg';
|
||||||
|
$a->strings['Save Settings'] = 'Vista stillingar';
|
||||||
|
$a->strings['Post from Friendica'] = 'Færslur frá Friendica';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if (!function_exists('string_plural_select_it')) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$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['Post to blogger'] = 'Invia a Blogger';
|
||||||
$a->strings["Blogger username"] = "Nome utente Blogger";
|
$a->strings['Blogger Export'] = 'Esporta Blogger';
|
||||||
$a->strings["Blogger password"] = "Password Blogger";
|
$a->strings['Enable Blogger Post Plugin'] = 'Abilita il plugin di invio a Blogger';
|
||||||
$a->strings["Blogger API URL"] = "Indirizzo API Blogger";
|
$a->strings['Blogger username'] = 'Nome utente Blogger';
|
||||||
$a->strings["Post to Blogger by default"] = "Invia sempre a Blogger";
|
$a->strings['Blogger password'] = 'Password Blogger';
|
||||||
$a->strings["Save Settings"] = "Salva Impostazioni";
|
$a->strings['Blogger API URL'] = 'Indirizzo API Blogger';
|
||||||
$a->strings["Post from Friendica"] = "Messaggio da Friendica";
|
$a->strings['Post to Blogger by default'] = 'Invia sempre a Blogger';
|
||||||
|
$a->strings['Save Settings'] = 'Salva Impostazioni';
|
||||||
|
$a->strings['Post from Friendica'] = 'Messaggio da Friendica';
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Post to blogger"] = "";
|
$a->strings['Post to blogger'] = '';
|
||||||
$a->strings["Blogger Post Settings"] = "";
|
$a->strings['Blogger Post Settings'] = '';
|
||||||
$a->strings["Enable Blogger Post Plugin"] = "";
|
$a->strings['Enable Blogger Post Plugin'] = '';
|
||||||
$a->strings["Blogger username"] = "";
|
$a->strings['Blogger username'] = '';
|
||||||
$a->strings["Blogger password"] = "";
|
$a->strings['Blogger password'] = '';
|
||||||
$a->strings["Blogger API URL"] = "";
|
$a->strings['Blogger API URL'] = '';
|
||||||
$a->strings["Post to Blogger by default"] = "";
|
$a->strings['Post to Blogger by default'] = '';
|
||||||
$a->strings["Submit"] = "Lagre";
|
$a->strings['Submit'] = 'Lagre';
|
||||||
$a->strings["Post from Friendica"] = "";
|
$a->strings['Post from Friendica'] = '';
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Post to blogger"] = "Post na blogger";
|
$a->strings['Post to blogger'] = 'Post na blogger';
|
||||||
$a->strings["Blogger Post Settings"] = "Ustawienia postów na Blogger";
|
$a->strings['Blogger Post Settings'] = 'Ustawienia postów na Blogger';
|
||||||
$a->strings["Enable Blogger Post Plugin"] = "";
|
$a->strings['Enable Blogger Post Plugin'] = '';
|
||||||
$a->strings["Blogger username"] = "Nazwa użytkownika na Blogger";
|
$a->strings['Blogger username'] = 'Nazwa użytkownika na Blogger';
|
||||||
$a->strings["Blogger password"] = "Hasło do Blogger";
|
$a->strings['Blogger password'] = 'Hasło do Blogger';
|
||||||
$a->strings["Blogger API URL"] = "";
|
$a->strings['Blogger API URL'] = '';
|
||||||
$a->strings["Post to Blogger by default"] = "";
|
$a->strings['Post to Blogger by default'] = '';
|
||||||
$a->strings["Submit"] = "Potwierdź";
|
$a->strings['Submit'] = 'Potwierdź';
|
||||||
$a->strings["Post from Friendica"] = "Post z Friendica";
|
$a->strings['Post from Friendica'] = 'Post z Friendica';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_pt_br")) {
|
if (!function_exists('string_plural_select_pt_br')) {
|
||||||
function string_plural_select_pt_br($n){
|
function string_plural_select_pt_br($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$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['Post to blogger'] = 'Publicar no Blogger';
|
||||||
$a->strings["Blogger username"] = "Nome de usuário no Blogger";
|
$a->strings['Blogger Export'] = 'Exportador Blogger';
|
||||||
$a->strings["Blogger password"] = "Senha do Blogger";
|
$a->strings['Enable Blogger Post Plugin'] = 'Habilitar plug-in para publicar no Blogger';
|
||||||
$a->strings["Blogger API URL"] = "URL da API do Blogger";
|
$a->strings['Blogger username'] = 'Nome de usuário no Blogger';
|
||||||
$a->strings["Post to Blogger by default"] = "Publicar no Blogger por padrão";
|
$a->strings['Blogger password'] = 'Senha do Blogger';
|
||||||
$a->strings["Save Settings"] = "Salvar Configurações";
|
$a->strings['Blogger API URL'] = 'URL da API do Blogger';
|
||||||
$a->strings["Post from Friendica"] = "Postar a partir de Friendica";
|
$a->strings['Post to Blogger by default'] = 'Publicar no Blogger por padrão';
|
||||||
|
$a->strings['Save Settings'] = 'Salvar Configurações';
|
||||||
|
$a->strings['Post from Friendica'] = 'Postar a partir de Friendica';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
if (!function_exists('string_plural_select_ro')) {
|
||||||
function string_plural_select_ro($n){
|
function string_plural_select_ro($n)
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
{
|
||||||
}}
|
return $n == 1 ? 0 : ((($n % 100 > 19) || (($n % 100 == 0) && ($n != 0))) ? 2 : 1);
|
||||||
;
|
}
|
||||||
$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['Post to blogger'] = 'Postați pe Blogger';
|
||||||
$a->strings["Blogger username"] = "Utilizator Blogger";
|
$a->strings['Blogger Export'] = 'Export pe Blogger ';
|
||||||
$a->strings["Blogger password"] = "Parolă Blogger ";
|
$a->strings['Enable Blogger Post Plugin'] = 'Activare Modul Postare pe Blogger ';
|
||||||
$a->strings["Blogger API URL"] = "URL Cheie API Blogger ";
|
$a->strings['Blogger username'] = 'Utilizator Blogger';
|
||||||
$a->strings["Post to Blogger by default"] = "Postați implicit pe Blogger";
|
$a->strings['Blogger password'] = 'Parolă Blogger ';
|
||||||
$a->strings["Save Settings"] = "Salvare Configurări";
|
$a->strings['Blogger API URL'] = 'URL Cheie API Blogger ';
|
||||||
$a->strings["Post from Friendica"] = "Postați din Friendica";
|
$a->strings['Post to Blogger by default'] = 'Postați implicit pe Blogger';
|
||||||
|
$a->strings['Save Settings'] = 'Salvare Configurări';
|
||||||
|
$a->strings['Post from Friendica'] = 'Postați din Friendica';
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Post to blogger"] = "";
|
$a->strings['Post to blogger'] = '';
|
||||||
$a->strings["Blogger Post Settings"] = "";
|
$a->strings['Blogger Post Settings'] = '';
|
||||||
$a->strings["Enable Blogger Post Plugin"] = "";
|
$a->strings['Enable Blogger Post Plugin'] = '';
|
||||||
$a->strings["Blogger username"] = "";
|
$a->strings['Blogger username'] = '';
|
||||||
$a->strings["Blogger password"] = "";
|
$a->strings['Blogger password'] = '';
|
||||||
$a->strings["Blogger API URL"] = "";
|
$a->strings['Blogger API URL'] = '';
|
||||||
$a->strings["Post to Blogger by default"] = "";
|
$a->strings['Post to Blogger by default'] = '';
|
||||||
$a->strings["Submit"] = "Подтвердить";
|
$a->strings['Submit'] = 'Подтвердить';
|
||||||
$a->strings["Post from Friendica"] = "Сообщение от Friendica";
|
$a->strings['Post from Friendica'] = 'Сообщение от Friendica';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Submit"] = "Spara";
|
$a->strings['Submit'] = 'Spara';
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Post to blogger"] = "转播到blogger";
|
$a->strings['Post to blogger'] = '转播到blogger';
|
||||||
$a->strings["Blogger Post Settings"] = "Blogger转播设置";
|
$a->strings['Blogger Post Settings'] = 'Blogger转播设置';
|
||||||
$a->strings["Enable Blogger Post Plugin"] = "使Blogger转播插件可用";
|
$a->strings['Enable Blogger Post Plugin'] = '使Blogger转播插件可用';
|
||||||
$a->strings["Blogger username"] = "Blogger用户名";
|
$a->strings['Blogger username'] = 'Blogger用户名';
|
||||||
$a->strings["Blogger password"] = "Blogger密码";
|
$a->strings['Blogger password'] = 'Blogger密码';
|
||||||
$a->strings["Blogger API URL"] = "Blogger API URL";
|
$a->strings['Blogger API URL'] = 'Blogger API URL';
|
||||||
$a->strings["Post to Blogger by default"] = "默认地转播到Blogger";
|
$a->strings['Post to Blogger by default'] = '默认地转播到Blogger';
|
||||||
$a->strings["Submit"] = "提交";
|
$a->strings['Submit'] = '提交';
|
||||||
$a->strings["Post from Friendica"] = "文章从Friendica";
|
$a->strings['Post from Friendica'] = '文章从Friendica';
|
||||||
|
|
|
@ -3,384 +3,415 @@
|
||||||
* Name: Buffer Post Connector
|
* Name: Buffer Post Connector
|
||||||
* Description: Post to Buffer (Linkedin, App.net, Google+, Facebook, Twitter)
|
* Description: Post to Buffer (Linkedin, App.net, Google+, Facebook, Twitter)
|
||||||
* Version: 0.2
|
* Version: 0.2
|
||||||
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
|
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>.
|
||||||
*/
|
*/
|
||||||
require('addon/buffer/bufferapp.php');
|
require 'addon/buffer/bufferapp.php';
|
||||||
|
|
||||||
function buffer_install() {
|
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('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
|
||||||
register_hook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
|
register_hook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
|
||||||
register_hook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
|
register_hook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
|
||||||
register_hook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
|
register_hook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
|
||||||
|
register_hook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_uninstall() {
|
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('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
|
||||||
unregister_hook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
|
unregister_hook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
|
||||||
unregister_hook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
|
unregister_hook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
|
||||||
unregister_hook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
|
unregister_hook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
|
||||||
|
unregister_hook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_module() {}
|
function buffer_module()
|
||||||
|
{
|
||||||
function buffer_content(&$a) {
|
|
||||||
|
|
||||||
if(! local_user()) {
|
|
||||||
notice( t('Permission denied.') . EOL);
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once("mod/settings.php");
|
|
||||||
settings_init($a);
|
|
||||||
|
|
||||||
if (isset($a->argv[1]))
|
|
||||||
switch ($a->argv[1]) {
|
|
||||||
case "connect":
|
|
||||||
$o = buffer_connect($a);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$o = print_r($a->argv, true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$o = buffer_connect($a);
|
|
||||||
|
|
||||||
return $o;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_plugin_admin(&$a, &$o){
|
function buffer_content(&$a)
|
||||||
$t = get_markup_template( "admin.tpl", "addon/buffer/" );
|
{
|
||||||
|
if (!local_user()) {
|
||||||
|
notice(t('Permission denied.').EOL);
|
||||||
|
|
||||||
$o = replace_macros($t, array(
|
return '';
|
||||||
'$submit' => t('Save Settings'),
|
}
|
||||||
// name, label, value, help, [extra values]
|
|
||||||
'$client_id' => array('client_id', t('Client ID'), get_config('buffer', 'client_id' ), ''),
|
require_once 'mod/settings.php';
|
||||||
'$client_secret' => array('client_secret', t('Client Secret'), get_config('buffer', 'client_secret' ), ''),
|
settings_init($a);
|
||||||
));
|
|
||||||
}
|
if (isset($a->argv[1])) {
|
||||||
function buffer_plugin_admin_post(&$a){
|
switch ($a->argv[1]) {
|
||||||
$client_id = ((x($_POST,'client_id')) ? notags(trim($_POST['client_id'])) : '');
|
case 'connect':
|
||||||
$client_secret = ((x($_POST,'client_secret')) ? notags(trim($_POST['client_secret'])): '');
|
$o = buffer_connect($a);
|
||||||
set_config('buffer','client_id',$client_id);
|
break;
|
||||||
set_config('buffer','client_secret',$client_secret);
|
default:
|
||||||
info( t('Settings updated.'). EOL );
|
$o = print_r($a->argv, true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$o = buffer_connect($a);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_connect(&$a) {
|
function buffer_plugin_admin(&$a, &$o)
|
||||||
|
{
|
||||||
|
$t = get_markup_template('admin.tpl', 'addon/buffer/');
|
||||||
|
|
||||||
if (isset($_REQUEST["error"])) {
|
$o = replace_macros($t, array(
|
||||||
$o = t('Error when registering buffer connection:')." ".$_REQUEST["error"];
|
'$submit' => t('Save Settings'),
|
||||||
return $o;
|
// name, label, value, help, [extra values]
|
||||||
}
|
'$client_id' => array('client_id', t('Client ID'), get_config('buffer', 'client_id'), ''),
|
||||||
// Start a session. This is necessary to hold on to a few keys the callback script will also need
|
'$client_secret' => array('client_secret', t('Client Secret'), get_config('buffer', 'client_secret'), ''),
|
||||||
session_start();
|
));
|
||||||
|
}
|
||||||
// Define the needed keys
|
function buffer_plugin_admin_post(&$a)
|
||||||
$client_id = get_config('buffer','client_id');
|
{
|
||||||
$client_secret = get_config('buffer','client_secret');
|
$client_id = ((x($_POST, 'client_id')) ? notags(trim($_POST['client_id'])) : '');
|
||||||
|
$client_secret = ((x($_POST, 'client_secret')) ? notags(trim($_POST['client_secret'])) : '');
|
||||||
// The callback URL is the script that gets called after the user authenticates with buffer
|
set_config('buffer', 'client_id', $client_id);
|
||||||
$callback_url = $a->get_baseurl()."/buffer/connect";
|
set_config('buffer', 'client_secret', $client_secret);
|
||||||
|
info(t('Settings updated.').EOL);
|
||||||
$buffer = new BufferApp($client_id, $client_secret, $callback_url);
|
|
||||||
|
|
||||||
if (!$buffer->ok) {
|
|
||||||
$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);
|
|
||||||
}
|
|
||||||
|
|
||||||
return($o);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_jot_nets(&$a,&$b) {
|
function buffer_connect(&$a)
|
||||||
if(! local_user())
|
{
|
||||||
return;
|
if (isset($_REQUEST['error'])) {
|
||||||
|
$o = t('Error when registering buffer connection:').' '.$_REQUEST['error'];
|
||||||
|
|
||||||
$buffer_post = get_pconfig(local_user(),'buffer','post');
|
return $o;
|
||||||
if(intval($buffer_post) == 1) {
|
}
|
||||||
$buffer_defpost = get_pconfig(local_user(),'buffer','post_by_default');
|
// Start a session. This is necessary to hold on to a few keys the callback script will also need
|
||||||
$selected = ((intval($buffer_defpost) == 1) ? ' checked="checked" ' : '');
|
session_start();
|
||||||
$b .= '<div class="profile-jot-net"><input type="checkbox" name="buffer_enable"' . $selected . ' value="1" /> '
|
|
||||||
. t('Post to Buffer') . '</div>';
|
// Define the needed keys
|
||||||
}
|
$client_id = get_config('buffer', 'client_id');
|
||||||
|
$client_secret = get_config('buffer', 'client_secret');
|
||||||
|
|
||||||
|
// The callback URL is the script that gets called after the user authenticates with buffer
|
||||||
|
$callback_url = $a->get_baseurl().'/buffer/connect';
|
||||||
|
|
||||||
|
$buffer = new BufferApp($client_id, $client_secret, $callback_url);
|
||||||
|
|
||||||
|
if (!$buffer->ok) {
|
||||||
|
$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);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_settings(&$a,&$s) {
|
function buffer_jot_nets(&$a, &$b)
|
||||||
|
{
|
||||||
if(! local_user())
|
if (!local_user()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
|
||||||
|
|
||||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/buffer/buffer.css' . '" media="all" />' . "\r\n";
|
|
||||||
|
|
||||||
/* Get the current state of our config variables */
|
|
||||||
|
|
||||||
$enabled = get_pconfig(local_user(),'buffer','post');
|
|
||||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
|
||||||
$css = (($enabled) ? '' : '-disabled');
|
|
||||||
|
|
||||||
$def_enabled = get_pconfig(local_user(),'buffer','post_by_default');
|
|
||||||
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
|
|
||||||
|
|
||||||
/* 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 .= '</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 .= '</span>';
|
|
||||||
|
|
||||||
$client_id = get_config("buffer", "client_id");
|
|
||||||
$client_secret = get_config("buffer", "client_secret");
|
|
||||||
$access_token = get_pconfig(local_user(), "buffer", "access_token");
|
|
||||||
|
|
||||||
$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 .= '</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 .= '<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 .= '<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 .= '<input id="buffer-delete" type="checkbox" name="buffer_delete" value="1" />';
|
|
||||||
$s .= '</div><div class="clear"></div>';
|
|
||||||
|
|
||||||
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
|
|
||||||
|
|
||||||
$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 .= "<ul>";
|
|
||||||
foreach ($profiles as $profile) {
|
|
||||||
if (!$profile->default)
|
|
||||||
continue;
|
|
||||||
$s .= "<li>";
|
|
||||||
//$s .= "<img src='".$profile->avatar_https."' width='16' />";
|
|
||||||
$s .= " ".$profile->formatted_username." (".$profile->formatted_service.")";
|
|
||||||
$s .= "</li>";
|
|
||||||
}
|
|
||||||
$s .= "</ul>";
|
|
||||||
$s .= '</div><div class="clear"></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$s .= '</div><div class="clear"></div>';
|
|
||||||
|
|
||||||
/* 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>';
|
|
||||||
|
|
||||||
|
$buffer_post = get_pconfig(local_user(), 'buffer', 'post');
|
||||||
|
if (intval($buffer_post) == 1) {
|
||||||
|
$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>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buffer_settings(&$a, &$s)
|
||||||
|
{
|
||||||
|
if (!local_user()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
function buffer_settings_post(&$a,&$b) {
|
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||||
|
|
||||||
if(x($_POST,'buffer-submit')) {
|
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/buffer/buffer.css'.'" media="all" />'."\r\n";
|
||||||
if(x($_POST,'buffer_delete')) {
|
|
||||||
set_pconfig(local_user(),'buffer','access_token','');
|
/* Get the current state of our config variables */
|
||||||
set_pconfig(local_user(),'buffer','post',false);
|
|
||||||
set_pconfig(local_user(),'buffer','post_by_default',false);
|
$enabled = get_pconfig(local_user(), 'buffer', 'post');
|
||||||
} else {
|
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||||
set_pconfig(local_user(),'buffer','post',intval($_POST['buffer']));
|
$css = (($enabled) ? '' : '-disabled');
|
||||||
set_pconfig(local_user(),'buffer','post_by_default',intval($_POST['buffer_bydefault']));
|
|
||||||
}
|
$def_enabled = get_pconfig(local_user(), 'buffer', 'post_by_default');
|
||||||
}
|
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
|
||||||
|
|
||||||
|
/* 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 .= '</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 .= '</span>';
|
||||||
|
|
||||||
|
$client_id = get_config('buffer', 'client_id');
|
||||||
|
$client_secret = get_config('buffer', 'client_secret');
|
||||||
|
$access_token = get_pconfig(local_user(), 'buffer', 'access_token');
|
||||||
|
|
||||||
|
$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 .= '</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 .= '<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 .= '<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 .= '<input id="buffer-delete" type="checkbox" name="buffer_delete" value="1" />';
|
||||||
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
|
||||||
|
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
|
||||||
|
|
||||||
|
$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 .= '<ul>';
|
||||||
|
foreach ($profiles as $profile) {
|
||||||
|
if (!$profile->default) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$s .= '<li>';
|
||||||
|
//$s .= "<img src='".$profile->avatar_https."' width='16' />";
|
||||||
|
$s .= ' '.$profile->formatted_username.' ('.$profile->formatted_service.')';
|
||||||
|
$s .= '</li>';
|
||||||
|
}
|
||||||
|
$s .= '</ul>';
|
||||||
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
|
||||||
|
/* 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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_post_local(&$a,&$b) {
|
function buffer_settings_post(&$a, &$b)
|
||||||
|
{
|
||||||
if((! local_user()) || (local_user() != $b['uid']))
|
if (x($_POST, 'buffer-submit')) {
|
||||||
return;
|
if (x($_POST, 'buffer_delete')) {
|
||||||
|
set_pconfig(local_user(), 'buffer', 'access_token', '');
|
||||||
$buffer_post = intval(get_pconfig(local_user(),'buffer','post'));
|
set_pconfig(local_user(), 'buffer', 'post', false);
|
||||||
|
set_pconfig(local_user(), 'buffer', 'post_by_default', false);
|
||||||
$buffer_enable = (($buffer_post && x($_REQUEST,'buffer_enable')) ? intval($_REQUEST['buffer_enable']) : 0);
|
} else {
|
||||||
|
set_pconfig(local_user(), 'buffer', 'post', intval($_POST['buffer']));
|
||||||
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'buffer','post_by_default')))
|
set_pconfig(local_user(), 'buffer', 'post_by_default', intval($_POST['buffer_bydefault']));
|
||||||
$buffer_enable = 1;
|
}
|
||||||
|
}
|
||||||
if(! $buffer_enable)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(strlen($b['postopts']))
|
|
||||||
$b['postopts'] .= ',';
|
|
||||||
|
|
||||||
$b['postopts'] .= 'buffer';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_send(&$a,&$b) {
|
function buffer_post_local(&$a, &$b)
|
||||||
|
{
|
||||||
|
if ((!local_user()) || (local_user() != $b['uid'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
|
$buffer_post = intval(get_pconfig(local_user(), 'buffer', 'post'));
|
||||||
return;
|
|
||||||
|
|
||||||
if(! strstr($b['postopts'],'buffer'))
|
$buffer_enable = (($buffer_post && x($_REQUEST, 'buffer_enable')) ? intval($_REQUEST['buffer_enable']) : 0);
|
||||||
return;
|
|
||||||
|
|
||||||
if($b['parent'] != $b['id'])
|
if ($_REQUEST['api_source'] && intval(get_pconfig(local_user(), 'buffer', 'post_by_default'))) {
|
||||||
return;
|
$buffer_enable = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// if post comes from buffer don't send it back
|
if (!$buffer_enable) {
|
||||||
//if($b['app'] == "Buffer")
|
return;
|
||||||
// return;
|
}
|
||||||
|
|
||||||
$client_id = get_config("buffer", "client_id");
|
if (strlen($b['postopts'])) {
|
||||||
$client_secret = get_config("buffer", "client_secret");
|
$b['postopts'] .= ',';
|
||||||
$access_token = get_pconfig($b['uid'], "buffer","access_token");
|
}
|
||||||
|
|
||||||
if($access_token) {
|
$b['postopts'] .= 'buffer';
|
||||||
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
|
}
|
||||||
|
|
||||||
require_once("include/plaintext.php");
|
function buffer_send(&$a, &$b)
|
||||||
require_once("include/network.php");
|
{
|
||||||
|
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
|
||||||
$profiles = $buffer->go('/profiles');
|
return;
|
||||||
if (is_array($profiles)) {
|
}
|
||||||
logger("Will send these parameter ".print_r($b, true), LOGGER_DEBUG);
|
|
||||||
|
if (!strstr($b['postopts'], 'buffer')) {
|
||||||
foreach ($profiles as $profile) {
|
return;
|
||||||
if (!$profile->default)
|
}
|
||||||
continue;
|
|
||||||
|
if ($b['parent'] != $b['id']) {
|
||||||
$send = false;
|
return;
|
||||||
|
}
|
||||||
switch ($profile->service) {
|
|
||||||
case 'appdotnet':
|
// if post comes from buffer don't send it back
|
||||||
$send = ($b["extid"] != NETWORK_APPNET);
|
//if($b['app'] == "Buffer")
|
||||||
$limit = 256;
|
// return;
|
||||||
$markup = false;
|
|
||||||
$includedlinks = true;
|
$client_id = get_config('buffer', 'client_id');
|
||||||
$htmlmode = 6;
|
$client_secret = get_config('buffer', 'client_secret');
|
||||||
break;
|
$access_token = get_pconfig($b['uid'], 'buffer', 'access_token');
|
||||||
case 'facebook':
|
|
||||||
$send = ($b["extid"] != NETWORK_FACEBOOK);
|
if ($access_token) {
|
||||||
$limit = 0;
|
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
|
||||||
$markup = false;
|
|
||||||
$includedlinks = false;
|
require_once 'include/plaintext.php';
|
||||||
$htmlmode = 9;
|
require_once 'include/network.php';
|
||||||
break;
|
|
||||||
case 'google':
|
$profiles = $buffer->go('/profiles');
|
||||||
$send = ($b["extid"] != NETWORK_GPLUS);
|
if (is_array($profiles)) {
|
||||||
$limit = 0;
|
logger('Will send these parameter '.print_r($b, true), LOGGER_DEBUG);
|
||||||
$markup = true;
|
|
||||||
$includedlinks = false;
|
foreach ($profiles as $profile) {
|
||||||
$htmlmode = 9;
|
if (!$profile->default) {
|
||||||
break;
|
continue;
|
||||||
case 'twitter':
|
}
|
||||||
$send = ($b["extid"] != NETWORK_TWITTER);
|
|
||||||
$limit = 140;
|
$send = false;
|
||||||
$markup = false;
|
|
||||||
$includedlinks = true;
|
switch ($profile->service) {
|
||||||
$htmlmode = 8;
|
case 'appdotnet':
|
||||||
break;
|
$send = ($b['extid'] != NETWORK_APPNET);
|
||||||
case 'linkedin':
|
$limit = 256;
|
||||||
$send = ($b["extid"] != NETWORK_LINKEDIN);
|
$markup = false;
|
||||||
$limit = 700;
|
$includedlinks = true;
|
||||||
$markup = false;
|
$htmlmode = 6;
|
||||||
$includedlinks = true;
|
break;
|
||||||
$htmlmode = 2;
|
case 'facebook':
|
||||||
break;
|
$send = ($b['extid'] != NETWORK_FACEBOOK);
|
||||||
}
|
$limit = 0;
|
||||||
|
$markup = false;
|
||||||
if (!$send)
|
$includedlinks = false;
|
||||||
continue;
|
$htmlmode = 9;
|
||||||
|
break;
|
||||||
$item = $b;
|
case 'google':
|
||||||
|
$send = ($b['extid'] != NETWORK_GPLUS);
|
||||||
// Markup for Google+
|
$limit = 0;
|
||||||
if ($markup) {
|
$markup = true;
|
||||||
if ($item["title"] != "")
|
$includedlinks = false;
|
||||||
$item["title"] = "*".$item["title"]."*";
|
$htmlmode = 9;
|
||||||
|
break;
|
||||||
$item["body"] = preg_replace("(\[b\](.*?)\[\/b\])ism",'*$1*',$item["body"]);
|
case 'twitter':
|
||||||
$item["body"] = preg_replace("(\[i\](.*?)\[\/i\])ism",'_$1_',$item["body"]);
|
$send = ($b['extid'] != NETWORK_TWITTER);
|
||||||
$item["body"] = preg_replace("(\[s\](.*?)\[\/s\])ism",'-$1-',$item["body"]);
|
$limit = 140;
|
||||||
}
|
$markup = false;
|
||||||
|
$includedlinks = true;
|
||||||
$post = plaintext($a, $item, $limit, $includedlinks, $htmlmode);
|
$htmlmode = 8;
|
||||||
logger("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG);
|
break;
|
||||||
|
case 'linkedin':
|
||||||
// The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures
|
$send = ($b['extid'] != NETWORK_LINKEDIN);
|
||||||
require_once("mod/proxy.php");
|
$limit = 700;
|
||||||
if (isset($post["image"]))
|
$markup = false;
|
||||||
$post["image"] = proxy_url($post["image"]);
|
$includedlinks = true;
|
||||||
|
$htmlmode = 2;
|
||||||
if (isset($post["preview"]))
|
break;
|
||||||
$post["preview"] = proxy_url($post["preview"]);
|
}
|
||||||
|
|
||||||
//if ($profile->service == "twitter") {
|
if (!$send) {
|
||||||
if ($includedlinks) {
|
continue;
|
||||||
if (isset($post["url"]))
|
}
|
||||||
$post["url"] = short_link($post["url"]);
|
|
||||||
if (isset($post["image"]))
|
$item = $b;
|
||||||
$post["image"] = short_link($post["image"]);
|
|
||||||
if (isset($post["preview"]))
|
// Markup for Google+
|
||||||
$post["preview"] = short_link($post["preview"]);
|
if ($markup) {
|
||||||
}
|
if ($item['title'] != '') {
|
||||||
|
$item['title'] = '*'.$item['title'].'*';
|
||||||
// Seems like a bug to me
|
}
|
||||||
// Buffer doesn't add links to Twitter and App.net (but pictures)
|
|
||||||
//if ($includedlinks AND isset($post["url"]))
|
$item['body'] = preg_replace("(\[b\](.*?)\[\/b\])ism", '*$1*', $item['body']);
|
||||||
if (($profile->service == "twitter") AND isset($post["url"]) AND ($post["type"] != "photo"))
|
$item['body'] = preg_replace("(\[i\](.*?)\[\/i\])ism", '_$1_', $item['body']);
|
||||||
$post["text"] .= " ".$post["url"];
|
$item['body'] = preg_replace("(\[s\](.*?)\[\/s\])ism", '-$1-', $item['body']);
|
||||||
elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND isset($post["title"]) AND ($post["type"] != "photo")) {
|
}
|
||||||
$post["title"] = shortenmsg($post["title"], 90);
|
|
||||||
$post["text"] = shortenmsg($post["text"], $limit - (24 + strlen($post["title"])));
|
$post = plaintext($a, $item, $limit, $includedlinks, $htmlmode);
|
||||||
$post["text"] .= "\n[".$post["title"]."](".$post["url"].")";
|
logger('buffer_send: converted message '.$b['id'].' result: '.print_r($post, true), LOGGER_DEBUG);
|
||||||
} elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND ($post["type"] != "photo"))
|
|
||||||
$post["text"] .= " ".$post["url"];
|
// The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures
|
||||||
elseif ($profile->service == "google")
|
require_once 'mod/proxy.php';
|
||||||
$post["text"] .= html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); // Send a special blank to identify the post through the "fromgplus" addon
|
if (isset($post['image'])) {
|
||||||
|
$post['image'] = proxy_url($post['image']);
|
||||||
$message = array();
|
}
|
||||||
$message["text"] = $post["text"];
|
|
||||||
$message["profile_ids[]"] = $profile->id;
|
if (isset($post['preview'])) {
|
||||||
$message["shorten"] = false;
|
$post['preview'] = proxy_url($post['preview']);
|
||||||
$message["now"] = true;
|
}
|
||||||
|
|
||||||
if (isset($post["title"]))
|
//if ($profile->service == "twitter") {
|
||||||
$message["media[title]"] = $post["title"];
|
if ($includedlinks) {
|
||||||
|
if (isset($post['url'])) {
|
||||||
if (isset($post["description"]))
|
$post['url'] = short_link($post['url']);
|
||||||
$message["media[description]"] = $post["description"];
|
}
|
||||||
|
if (isset($post['image'])) {
|
||||||
if (isset($post["url"]) AND ($post["type"] != "photo"))
|
$post['image'] = short_link($post['image']);
|
||||||
$message["media[link]"] = $post["url"];
|
}
|
||||||
|
if (isset($post['preview'])) {
|
||||||
if (isset($post["image"])) {
|
$post['preview'] = short_link($post['preview']);
|
||||||
$message["media[picture]"] = $post["image"];
|
}
|
||||||
if ($post["type"] == "photo")
|
}
|
||||||
$message["media[thumbnail]"] = $post["image"];
|
|
||||||
}
|
// Seems like a bug to me
|
||||||
|
// Buffer doesn't add links to Twitter and App.net (but pictures)
|
||||||
if (isset($post["preview"]))
|
//if ($includedlinks AND isset($post["url"]))
|
||||||
$message["media[thumbnail]"] = $post["preview"];
|
if (($profile->service == 'twitter') and isset($post['url']) and ($post['type'] != 'photo')) {
|
||||||
|
$post['text'] .= ' '.$post['url'];
|
||||||
//print_r($message);
|
} elseif (($profile->service == 'appdotnet') and isset($post['url']) and isset($post['title']) and ($post['type'] != 'photo')) {
|
||||||
logger("buffer_send: data for message ".$b["id"].": ".print_r($message, true), LOGGER_DEBUG);
|
$post['title'] = shortenmsg($post['title'], 90);
|
||||||
$ret = $buffer->go('/updates/create', $message);
|
$post['text'] = shortenmsg($post['text'], $limit - (24 + strlen($post['title'])));
|
||||||
logger("buffer_send: send message ".$b["id"]." result: ".print_r($ret, true), LOGGER_DEBUG);
|
$post['text'] .= "\n[".$post['title'].']('.$post['url'].')';
|
||||||
}
|
} elseif (($profile->service == 'appdotnet') and isset($post['url']) and ($post['type'] != 'photo')) {
|
||||||
}
|
$post['text'] .= ' '.$post['url'];
|
||||||
}
|
} elseif ($profile->service == 'google') {
|
||||||
|
$post['text'] .= html_entity_decode(' ', ENT_QUOTES, 'UTF-8');
|
||||||
|
} // Send a special blank to identify the post through the "fromgplus" addon
|
||||||
|
|
||||||
|
$message = array();
|
||||||
|
$message['text'] = $post['text'];
|
||||||
|
$message['profile_ids[]'] = $profile->id;
|
||||||
|
$message['shorten'] = false;
|
||||||
|
$message['now'] = true;
|
||||||
|
|
||||||
|
if (isset($post['title'])) {
|
||||||
|
$message['media[title]'] = $post['title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($post['description'])) {
|
||||||
|
$message['media[description]'] = $post['description'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($post['url']) and ($post['type'] != 'photo')) {
|
||||||
|
$message['media[link]'] = $post['url'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($post['image'])) {
|
||||||
|
$message['media[picture]'] = $post['image'];
|
||||||
|
if ($post['type'] == 'photo') {
|
||||||
|
$message['media[thumbnail]'] = $post['image'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($post['preview'])) {
|
||||||
|
$message['media[thumbnail]'] = $post['preview'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//print_r($message);
|
||||||
|
logger('buffer_send: data for message '.$b['id'].': '.print_r($message, true), LOGGER_DEBUG);
|
||||||
|
$ret = $buffer->go('/updates/create', $message);
|
||||||
|
logger('buffer_send: send message '.$b['id'].' result: '.print_r($ret, true), LOGGER_DEBUG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,205 +1,235 @@
|
||||||
<?php
|
<?php
|
||||||
class BufferApp {
|
class bufferapp
|
||||||
private $client_id;
|
{
|
||||||
private $client_secret;
|
private $client_id;
|
||||||
private $code;
|
private $client_secret;
|
||||||
public $access_token;
|
private $code;
|
||||||
|
public $access_token;
|
||||||
|
|
||||||
private $callback_url;
|
private $callback_url;
|
||||||
private $authorize_url = 'https://bufferapp.com/oauth2/authorize';
|
private $authorize_url = 'https://bufferapp.com/oauth2/authorize';
|
||||||
private $access_token_url = 'https://api.bufferapp.com/1/oauth2/token.json';
|
private $access_token_url = 'https://api.bufferapp.com/1/oauth2/token.json';
|
||||||
private $buffer_url = 'https://api.bufferapp.com/1';
|
private $buffer_url = 'https://api.bufferapp.com/1';
|
||||||
|
|
||||||
public $ok = false;
|
public $ok = false;
|
||||||
|
|
||||||
private $endpoints = array(
|
private $endpoints = array(
|
||||||
'/user' => 'get',
|
'/user' => 'get',
|
||||||
|
|
||||||
'/profiles' => 'get',
|
'/profiles' => 'get',
|
||||||
'/profiles/:id' => 'get',
|
'/profiles/:id' => 'get',
|
||||||
'/profiles/:id/schedules' => 'get',
|
'/profiles/:id/schedules' => 'get',
|
||||||
'/profiles/:id/schedules/update' => 'post', // Array schedules [0][days][]=mon, [0][times][]=12:00
|
'/profiles/:id/schedules/update' => 'post', // Array schedules [0][days][]=mon, [0][times][]=12:00
|
||||||
|
|
||||||
'/updates/:id' => 'get',
|
'/updates/:id' => 'get',
|
||||||
'/profiles/:id/updates/pending' => 'get',
|
'/profiles/:id/updates/pending' => 'get',
|
||||||
'/profiles/:id/updates/sent' => 'get',
|
'/profiles/:id/updates/sent' => 'get',
|
||||||
'/updates/:id/interactions' => 'get',
|
'/updates/:id/interactions' => 'get',
|
||||||
|
|
||||||
'/profiles/:id/updates/reorder' => 'post', // Array order, int offset, bool utc
|
'/profiles/:id/updates/reorder' => 'post', // Array order, int offset, bool utc
|
||||||
'/profiles/:id/updates/shuffle' => 'post',
|
'/profiles/:id/updates/shuffle' => 'post',
|
||||||
'/updates/create' => 'post', // String text, Array profile_ids, Aool shorten, Bool now, Array media ['link'], ['description'], ['picture']
|
'/updates/create' => 'post', // String text, Array profile_ids, Aool shorten, Bool now, Array media ['link'], ['description'], ['picture']
|
||||||
'/updates/:id/update' => 'post', // String text, Bool now, Array media ['link'], ['description'], ['picture'], Bool utc
|
'/updates/:id/update' => 'post', // String text, Bool now, Array media ['link'], ['description'], ['picture'], Bool utc
|
||||||
'/updates/:id/share' => 'post',
|
'/updates/:id/share' => 'post',
|
||||||
'/updates/:id/destroy' => 'post',
|
'/updates/:id/destroy' => 'post',
|
||||||
'/updates/:id/move_to_top' => 'post',
|
'/updates/:id/move_to_top' => 'post',
|
||||||
|
|
||||||
'/links/shares' => 'get',
|
'/links/shares' => 'get',
|
||||||
|
|
||||||
'/info/configuration' => 'get',
|
'/info/configuration' => 'get',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public $errors = array(
|
public $errors = array(
|
||||||
'invalid-endpoint' => 'The endpoint you supplied does not appear to be valid.',
|
'invalid-endpoint' => 'The endpoint you supplied does not appear to be valid.',
|
||||||
|
|
||||||
'403' => 'Permission denied.',
|
'403' => 'Permission denied.',
|
||||||
'404' => 'Endpoint not found.',
|
'404' => 'Endpoint not found.',
|
||||||
'405' => 'Method not allowed.',
|
'405' => 'Method not allowed.',
|
||||||
'1000' => 'An unknown error occurred.',
|
'1000' => 'An unknown error occurred.',
|
||||||
'1001' => 'Access token required.',
|
'1001' => 'Access token required.',
|
||||||
'1002' => 'Not within application scope.',
|
'1002' => 'Not within application scope.',
|
||||||
'1003' => 'Parameter not recognized.',
|
'1003' => 'Parameter not recognized.',
|
||||||
'1004' => 'Required parameter missing.',
|
'1004' => 'Required parameter missing.',
|
||||||
'1005' => 'Unsupported response format.',
|
'1005' => 'Unsupported response format.',
|
||||||
'1006' => 'Parameter value not within bounds.',
|
'1006' => 'Parameter value not within bounds.',
|
||||||
'1010' => 'Profile could not be found.',
|
'1010' => 'Profile could not be found.',
|
||||||
'1011' => 'No authorization to access profile.',
|
'1011' => 'No authorization to access profile.',
|
||||||
'1012' => 'Profile did not save successfully.',
|
'1012' => 'Profile did not save successfully.',
|
||||||
'1013' => 'Profile schedule limit reached.',
|
'1013' => 'Profile schedule limit reached.',
|
||||||
'1014' => 'Profile limit for user has been reached.',
|
'1014' => 'Profile limit for user has been reached.',
|
||||||
'1015' => 'Profile could not be destroyed.',
|
'1015' => 'Profile could not be destroyed.',
|
||||||
'1016' => 'Profile buffer could not be emptied.',
|
'1016' => 'Profile buffer could not be emptied.',
|
||||||
'1020' => 'Update could not be found.',
|
'1020' => 'Update could not be found.',
|
||||||
'1021' => 'No authorization to access update.',
|
'1021' => 'No authorization to access update.',
|
||||||
'1022' => 'Update did not save successfully.',
|
'1022' => 'Update did not save successfully.',
|
||||||
'1023' => 'Update limit for profile has been reached.',
|
'1023' => 'Update limit for profile has been reached.',
|
||||||
'1024' => 'Update limit for team profile has been reached.',
|
'1024' => 'Update limit for team profile has been reached.',
|
||||||
'1025' => "Update was recently posted, can't post duplicate content.",
|
'1025' => "Update was recently posted, can't post duplicate content.",
|
||||||
'1026' => 'Update must be in error status to requeue.',
|
'1026' => 'Update must be in error status to requeue.',
|
||||||
'1027' => 'Update must be in buffer and not custom scheduled in order to move to top.',
|
'1027' => 'Update must be in buffer and not custom scheduled in order to move to top.',
|
||||||
'1028' => 'Update soft limit for profile reached.',
|
'1028' => 'Update soft limit for profile reached.',
|
||||||
'1029' => 'Event type not supported.',
|
'1029' => 'Event type not supported.',
|
||||||
'1030' => 'Media filetype not supported.',
|
'1030' => 'Media filetype not supported.',
|
||||||
'1031' => 'Media filesize out of acceptable range.',
|
'1031' => 'Media filesize out of acceptable range.',
|
||||||
'1032' => 'Unable to post image to LinkedIn group(s).',
|
'1032' => 'Unable to post image to LinkedIn group(s).',
|
||||||
'1033' => 'Comments can only be posted to Facebook at this time.',
|
'1033' => 'Comments can only be posted to Facebook at this time.',
|
||||||
'1034' => 'Cannot schedule updates in the past.',
|
'1034' => 'Cannot schedule updates in the past.',
|
||||||
'1042' => 'User did not save successfully.',
|
'1042' => 'User did not save successfully.',
|
||||||
'1050' => 'Client could not be found.',
|
'1050' => 'Client could not be found.',
|
||||||
'1051' => 'No authorization to access client.',
|
'1051' => 'No authorization to access client.',
|
||||||
);
|
);
|
||||||
|
|
||||||
function __construct($client_id = '', $client_secret = '', $callback_url = '', $access_token = '') {
|
public function __construct($client_id = '', $client_secret = '', $callback_url = '', $access_token = '')
|
||||||
if ($client_id) $this->set_client_id($client_id);
|
{
|
||||||
if ($client_secret) $this->set_client_secret($client_secret);
|
if ($client_id) {
|
||||||
if ($callback_url) $this->set_callback_url($callback_url);
|
$this->set_client_id($client_id);
|
||||||
if ($access_token) $this->access_token = $access_token;
|
}
|
||||||
|
if ($client_secret) {
|
||||||
|
$this->set_client_secret($client_secret);
|
||||||
|
}
|
||||||
|
if ($callback_url) {
|
||||||
|
$this->set_callback_url($callback_url);
|
||||||
|
}
|
||||||
|
if ($access_token) {
|
||||||
|
$this->access_token = $access_token;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_GET['code']) AND $_GET['code']) {
|
if (isset($_GET['code']) and $_GET['code']) {
|
||||||
$this->code = $_GET['code'];
|
$this->code = $_GET['code'];
|
||||||
$this->create_access_token_url();
|
$this->create_access_token_url();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$access_token)
|
if (!$access_token) {
|
||||||
$this->retrieve_access_token();
|
$this->retrieve_access_token();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function go($endpoint = '', $data = '') {
|
public function go($endpoint = '', $data = '')
|
||||||
if (in_array($endpoint, array_keys($this->endpoints))) {
|
{
|
||||||
$done_endpoint = $endpoint;
|
if (in_array($endpoint, array_keys($this->endpoints))) {
|
||||||
} else {
|
$done_endpoint = $endpoint;
|
||||||
$ok = false;
|
} else {
|
||||||
|
$ok = false;
|
||||||
|
|
||||||
foreach (array_keys($this->endpoints) as $done_endpoint) {
|
foreach (array_keys($this->endpoints) as $done_endpoint) {
|
||||||
if (preg_match('/' . preg_replace('/(\:\w+)/i', '(\w+)', str_replace('/', '\/', $done_endpoint)) . '/i', $endpoint, $match)) {
|
if (preg_match('/'.preg_replace('/(\:\w+)/i', '(\w+)', str_replace('/', '\/', $done_endpoint)).'/i', $endpoint, $match)) {
|
||||||
$ok = true;
|
$ok = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$ok) return $this->error('invalid-endpoint');
|
if (!$ok) {
|
||||||
}
|
return $this->error('invalid-endpoint');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$data || !is_array($data)) $data = array();
|
if (!$data || !is_array($data)) {
|
||||||
$data['access_token'] = $this->access_token;
|
$data = array();
|
||||||
|
}
|
||||||
|
$data['access_token'] = $this->access_token;
|
||||||
|
|
||||||
$method = $this->endpoints[$done_endpoint]; //get() or post()
|
$method = $this->endpoints[$done_endpoint]; //get() or post()
|
||||||
return $this->$method($this->buffer_url . $endpoint . '.json', $data);
|
return $this->$method($this->buffer_url.$endpoint.'.json', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function store_access_token() {
|
public function store_access_token()
|
||||||
$_SESSION['oauth']['buffer']['access_token'] = $this->access_token;
|
{
|
||||||
}
|
$_SESSION['oauth']['buffer']['access_token'] = $this->access_token;
|
||||||
|
}
|
||||||
|
|
||||||
function retrieve_access_token() {
|
public function retrieve_access_token()
|
||||||
$this->access_token = $_SESSION['oauth']['buffer']['access_token'];
|
{
|
||||||
|
$this->access_token = $_SESSION['oauth']['buffer']['access_token'];
|
||||||
|
|
||||||
if ($this->access_token) {
|
if ($this->access_token) {
|
||||||
$this->ok = true;
|
$this->ok = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function error($error) {
|
public function error($error)
|
||||||
return (object) array('error' => $this->errors[$error]);
|
{
|
||||||
}
|
return (object) array('error' => $this->errors[$error]);
|
||||||
|
}
|
||||||
|
|
||||||
function create_access_token_url() {
|
public function create_access_token_url()
|
||||||
$data = array(
|
{
|
||||||
'code' => $this->code,
|
$data = array(
|
||||||
'grant_type' => 'authorization_code',
|
'code' => $this->code,
|
||||||
'client_id' => $this->client_id,
|
'grant_type' => 'authorization_code',
|
||||||
'client_secret' => $this->client_secret,
|
'client_id' => $this->client_id,
|
||||||
'redirect_uri' => $this->callback_url,
|
'client_secret' => $this->client_secret,
|
||||||
);
|
'redirect_uri' => $this->callback_url,
|
||||||
|
);
|
||||||
|
|
||||||
$obj = $this->post($this->access_token_url, $data);
|
$obj = $this->post($this->access_token_url, $data);
|
||||||
$this->access_token = $obj->access_token;
|
$this->access_token = $obj->access_token;
|
||||||
|
|
||||||
$this->store_access_token();
|
$this->store_access_token();
|
||||||
}
|
}
|
||||||
|
|
||||||
function req($url = '', $data = '', $post = true) {
|
public function req($url = '', $data = '', $post = true)
|
||||||
if (!$url) return false;
|
{
|
||||||
if (!$data || !is_array($data)) $data = array();
|
if (!$url) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!$data || !is_array($data)) {
|
||||||
|
$data = array();
|
||||||
|
}
|
||||||
|
|
||||||
$options = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false);
|
$options = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false);
|
||||||
|
|
||||||
if ($post) {
|
if ($post) {
|
||||||
$options += array(
|
$options += array(
|
||||||
CURLOPT_POST => $post,
|
CURLOPT_POST => $post,
|
||||||
CURLOPT_POSTFIELDS => $data
|
CURLOPT_POSTFIELDS => $data,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$url .= '?' . http_build_query($data);
|
$url .= '?'.http_build_query($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
curl_setopt_array($ch, $options);
|
curl_setopt_array($ch, $options);
|
||||||
$rs = curl_exec($ch);
|
$rs = curl_exec($ch);
|
||||||
|
|
||||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
if ($code >= 400) {
|
if ($code >= 400) {
|
||||||
return $this->error($code);
|
return $this->error($code);
|
||||||
}
|
}
|
||||||
|
|
||||||
return json_decode($rs);
|
return json_decode($rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get($url = '', $data = '') {
|
public function get($url = '', $data = '')
|
||||||
return $this->req($url, $data, false);
|
{
|
||||||
}
|
return $this->req($url, $data, false);
|
||||||
|
}
|
||||||
|
|
||||||
function post($url = '', $data = '') {
|
public function post($url = '', $data = '')
|
||||||
return $this->req($url, $data, true);
|
{
|
||||||
}
|
return $this->req($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
function get_login_url() {
|
public function get_login_url()
|
||||||
return $this->authorize_url . '?'
|
{
|
||||||
. 'client_id=' . $this->client_id
|
return $this->authorize_url.'?'
|
||||||
. '&redirect_uri=' . urlencode($this->callback_url)
|
.'client_id='.$this->client_id
|
||||||
. '&response_type=code';
|
.'&redirect_uri='.urlencode($this->callback_url)
|
||||||
}
|
.'&response_type=code';
|
||||||
|
}
|
||||||
|
|
||||||
function set_client_id($client_id) {
|
public function set_client_id($client_id)
|
||||||
$this->client_id = $client_id;
|
{
|
||||||
}
|
$this->client_id = $client_id;
|
||||||
|
}
|
||||||
|
|
||||||
function set_client_secret($client_secret) {
|
public function set_client_secret($client_secret)
|
||||||
$this->client_secret = $client_secret;
|
{
|
||||||
}
|
$this->client_secret = $client_secret;
|
||||||
|
}
|
||||||
|
|
||||||
function set_callback_url($callback_url) {
|
public function set_callback_url($callback_url)
|
||||||
$this->callback_url = $callback_url;
|
{
|
||||||
}
|
$this->callback_url = $callback_url;
|
||||||
}
|
}
|
||||||
?>
|
}
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
if (!function_exists('string_plural_select_cs')) {
|
||||||
function string_plural_select_cs($n){
|
function string_plural_select_cs($n)
|
||||||
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
{
|
||||||
}}
|
return ($n == 1) ? 0 : ($n >= 2 && $n <= 4) ? 1 : 2;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Přístup odmítnut.";
|
}
|
||||||
$a->strings["Save Settings"] = "Uložit Nastavení";
|
|
||||||
$a->strings["Client ID"] = "Client ID";
|
$a->strings['Permission denied.'] = 'Přístup odmítnut.';
|
||||||
$a->strings["Client Secret"] = "Client Secret";
|
$a->strings['Save Settings'] = 'Uložit Nastavení';
|
||||||
$a->strings["Error when registering buffer connection:"] = "Chyba při registraci buffer spojená";
|
$a->strings['Client ID'] = 'Client ID';
|
||||||
$a->strings["You are now authenticated to buffer. "] = "Nyní jste přihlášen k bufferu.";
|
$a->strings['Client Secret'] = 'Client Secret';
|
||||||
$a->strings["return to the connector page"] = "návrat ke stránce konektor";
|
$a->strings['Error when registering buffer connection:'] = 'Chyba při registraci buffer spojená';
|
||||||
$a->strings["Post to Buffer"] = "Příspěvek na Buffer";
|
$a->strings['You are now authenticated to buffer. '] = 'Nyní jste přihlášen k bufferu.';
|
||||||
$a->strings["Buffer Export"] = "Buffer Export";
|
$a->strings['return to the connector page'] = 'návrat ke stránce konektor';
|
||||||
$a->strings["Authenticate your Buffer connection"] = "Přihlásit ke spojení na Buffer";
|
$a->strings['Post to Buffer'] = 'Příspěvek na Buffer';
|
||||||
$a->strings["Enable Buffer Post Plugin"] = "Povolit Buffer Post Plugin";
|
$a->strings['Buffer Export'] = 'Buffer Export';
|
||||||
$a->strings["Post to Buffer by default"] = "Defaultně zaslat na Buffer";
|
$a->strings['Authenticate your Buffer connection'] = 'Přihlásit ke spojení na Buffer';
|
||||||
$a->strings["Check to delete this preset"] = "Zaškrtnout pro smazání tohoto nastavení";
|
$a->strings['Enable Buffer Post Plugin'] = 'Povolit Buffer Post Plugin';
|
||||||
$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:";
|
$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:';
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if (!function_exists('string_plural_select_de')) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Zugriff verweigert.";
|
}
|
||||||
$a->strings["Save Settings"] = "Einstellungen speichern";
|
|
||||||
$a->strings["Client ID"] = "Client ID";
|
$a->strings['Permission denied.'] = 'Zugriff verweigert.';
|
||||||
$a->strings["Client Secret"] = "Client Secret";
|
$a->strings['Save Settings'] = 'Einstellungen speichern';
|
||||||
$a->strings["Error when registering buffer connection:"] = "Fehler beim Registrieren des buffer Connectors.";
|
$a->strings['Client ID'] = 'Client ID';
|
||||||
$a->strings["You are now authenticated to buffer. "] = "Du bist nun auf buffer authentifiziert.";
|
$a->strings['Client Secret'] = 'Client Secret';
|
||||||
$a->strings["return to the connector page"] = "zurück zur Connector Seite";
|
$a->strings['Error when registering buffer connection:'] = 'Fehler beim Registrieren des buffer Connectors.';
|
||||||
$a->strings["Post to Buffer"] = "Auf buffer veröffentlichen";
|
$a->strings['You are now authenticated to buffer. '] = 'Du bist nun auf buffer authentifiziert.';
|
||||||
$a->strings["Buffer Export"] = "Buffer Export";
|
$a->strings['return to the connector page'] = 'zurück zur Connector Seite';
|
||||||
$a->strings["Authenticate your Buffer connection"] = "Authentifiziere deine Verbindung zu buffer";
|
$a->strings['Post to Buffer'] = 'Auf buffer veröffentlichen';
|
||||||
$a->strings["Enable Buffer Post Plugin"] = "Buffer Post-Plugin aktivieren";
|
$a->strings['Buffer Export'] = 'Buffer Export';
|
||||||
$a->strings["Post to Buffer by default"] = "Standardmäßig auf buffer veröffentlichen";
|
$a->strings['Authenticate your Buffer connection'] = 'Authentifiziere deine Verbindung zu buffer';
|
||||||
$a->strings["Check to delete this preset"] = "Markieren um dieses Preset zu löschen";
|
$a->strings['Enable Buffer Post Plugin'] = 'Buffer Post-Plugin aktivieren';
|
||||||
$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.";
|
$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.';
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fr")) {
|
if (!function_exists('string_plural_select_fr')) {
|
||||||
function string_plural_select_fr($n){
|
function string_plural_select_fr($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Permission refusée.";
|
}
|
||||||
$a->strings["Save Settings"] = "Enregistrer les Paramètres";
|
|
||||||
$a->strings["Client ID"] = "Identifiant client";
|
$a->strings['Permission denied.'] = 'Permission refusée.';
|
||||||
$a->strings["Client Secret"] = "Secret Client";
|
$a->strings['Save Settings'] = 'Enregistrer les Paramètres';
|
||||||
$a->strings["Error when registering buffer connection:"] = "Une erreur est survenue lors de la connexion à Buffer :";
|
$a->strings['Client ID'] = 'Identifiant client';
|
||||||
$a->strings["You are now authenticated to buffer. "] = "Vous êtes maintenant authentifié sur Buffer.";
|
$a->strings['Client Secret'] = 'Secret Client';
|
||||||
$a->strings["return to the connector page"] = "revenir à la page du connecteur";
|
$a->strings['Error when registering buffer connection:'] = 'Une erreur est survenue lors de la connexion à Buffer :';
|
||||||
$a->strings["Post to Buffer"] = "Publier sur Buffer";
|
$a->strings['You are now authenticated to buffer. '] = 'Vous êtes maintenant authentifié sur Buffer.';
|
||||||
$a->strings["Buffer Export"] = "Export Buffer";
|
$a->strings['return to the connector page'] = 'revenir à la page du connecteur';
|
||||||
$a->strings["Authenticate your Buffer connection"] = "Authentifier votre connexion à Buffer";
|
$a->strings['Post to Buffer'] = 'Publier sur Buffer';
|
||||||
$a->strings["Enable Buffer Post Plugin"] = "Activer le connecteur Buffer";
|
$a->strings['Buffer Export'] = 'Export Buffer';
|
||||||
$a->strings["Post to Buffer by default"] = "Publier sur Buffer par défaut";
|
$a->strings['Authenticate your Buffer connection'] = 'Authentifier votre connexion à Buffer';
|
||||||
$a->strings["Check to delete this preset"] = "Cocher pour supprimer ce préréglage";
|
$a->strings['Enable Buffer Post Plugin'] = 'Activer le connecteur Buffer';
|
||||||
$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:";
|
$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:';
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if (!function_exists('string_plural_select_it')) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Permesso negato.";
|
}
|
||||||
$a->strings["Save Settings"] = "Salva Impostazioni";
|
|
||||||
$a->strings["Client ID"] = "Client ID";
|
$a->strings['Permission denied.'] = 'Permesso negato.';
|
||||||
$a->strings["Client Secret"] = "Client Secret";
|
$a->strings['Save Settings'] = 'Salva Impostazioni';
|
||||||
$a->strings["Error when registering buffer connection:"] = "Errore registrando la connessione a buffer:";
|
$a->strings['Client ID'] = 'Client ID';
|
||||||
$a->strings["You are now authenticated to buffer. "] = "Sei autenticato su buffer.";
|
$a->strings['Client Secret'] = 'Client Secret';
|
||||||
$a->strings["return to the connector page"] = "ritorna alla pagina del connettore";
|
$a->strings['Error when registering buffer connection:'] = 'Errore registrando la connessione a buffer:';
|
||||||
$a->strings["Post to Buffer"] = "Invia a Buffer";
|
$a->strings['You are now authenticated to buffer. '] = 'Sei autenticato su buffer.';
|
||||||
$a->strings["Buffer Export"] = "Esporta Buffer";
|
$a->strings['return to the connector page'] = 'ritorna alla pagina del connettore';
|
||||||
$a->strings["Authenticate your Buffer connection"] = "Autentica la tua connessione a Buffer";
|
$a->strings['Post to Buffer'] = 'Invia a Buffer';
|
||||||
$a->strings["Enable Buffer Post Plugin"] = "Abilita il plugin di invio a Buffer";
|
$a->strings['Buffer Export'] = 'Esporta Buffer';
|
||||||
$a->strings["Post to Buffer by default"] = "Invia sempre a Buffer";
|
$a->strings['Authenticate your Buffer connection'] = 'Autentica la tua connessione a Buffer';
|
||||||
$a->strings["Check to delete this preset"] = "Seleziona per eliminare questo preset";
|
$a->strings['Enable Buffer Post Plugin'] = 'Abilita il plugin di invio a Buffer';
|
||||||
$a->strings["Posts are going to all accounts that are enabled by default:"] = "I messaggi andranno a tutti gli account che sono abilitati:";
|
$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:';
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_pt_br")) {
|
if (!function_exists('string_plural_select_pt_br')) {
|
||||||
function string_plural_select_pt_br($n){
|
function string_plural_select_pt_br($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Permissão negada.";
|
}
|
||||||
$a->strings["Save Settings"] = "Salvar configurações";
|
|
||||||
$a->strings["Client ID"] = "";
|
$a->strings['Permission denied.'] = 'Permissão negada.';
|
||||||
$a->strings["Client Secret"] = "";
|
$a->strings['Save Settings'] = 'Salvar configurações';
|
||||||
$a->strings["Error when registering buffer connection:"] = "Erro ao registrar conexão de buffer:";
|
$a->strings['Client ID'] = '';
|
||||||
$a->strings["You are now authenticated to buffer. "] = "Você está autenticado no buffer.";
|
$a->strings['Client Secret'] = '';
|
||||||
$a->strings["return to the connector page"] = "Volte a página de conectores.";
|
$a->strings['Error when registering buffer connection:'] = 'Erro ao registrar conexão de buffer:';
|
||||||
$a->strings["Post to Buffer"] = "Publicar no Buffer";
|
$a->strings['You are now authenticated to buffer. '] = 'Você está autenticado no buffer.';
|
||||||
$a->strings["Buffer Export"] = "Exportar Buffer";
|
$a->strings['return to the connector page'] = 'Volte a página de conectores.';
|
||||||
$a->strings["Authenticate your Buffer connection"] = "Autenticar sua conexão de Buffer";
|
$a->strings['Post to Buffer'] = 'Publicar no Buffer';
|
||||||
$a->strings["Enable Buffer Post Plugin"] = "Habilita plugin para publicar no Buffer";
|
$a->strings['Buffer Export'] = 'Exportar Buffer';
|
||||||
$a->strings["Post to Buffer by default"] = "Publica no Buffer por padrão";
|
$a->strings['Authenticate your Buffer connection'] = 'Autenticar sua conexão de Buffer';
|
||||||
$a->strings["Check to delete this preset"] = "Marque para excluir este perfil";
|
$a->strings['Enable Buffer Post Plugin'] = 'Habilita plugin para publicar no Buffer';
|
||||||
$a->strings["Posts are going to all accounts that are enabled by default:"] = "";
|
$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:'] = '';
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
if (!function_exists('string_plural_select_ro')) {
|
||||||
function string_plural_select_ro($n){
|
function string_plural_select_ro($n)
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
{
|
||||||
}}
|
return $n == 1 ? 0 : ((($n % 100 > 19) || (($n % 100 == 0) && ($n != 0))) ? 2 : 1);
|
||||||
;
|
}
|
||||||
$a->strings["Permission denied."] = "Permisiune refuzată.";
|
}
|
||||||
$a->strings["Save Settings"] = "Salvare Configurări";
|
|
||||||
$a->strings["Client ID"] = "ID Client";
|
$a->strings['Permission denied.'] = 'Permisiune refuzată.';
|
||||||
$a->strings["Client Secret"] = "Cheia Secretă Client";
|
$a->strings['Save Settings'] = 'Salvare Configurări';
|
||||||
$a->strings["Error when registering buffer connection:"] = "Eroare la înregistrarea conexiunii Buffer:";
|
$a->strings['Client ID'] = 'ID Client';
|
||||||
$a->strings["You are now authenticated to buffer. "] = "Acum sunteți autentificat pe Buffer.";
|
$a->strings['Client Secret'] = 'Cheia Secretă Client';
|
||||||
$a->strings["return to the connector page"] = "revenire la pagina de conectare";
|
$a->strings['Error when registering buffer connection:'] = 'Eroare la înregistrarea conexiunii Buffer:';
|
||||||
$a->strings["Post to Buffer"] = "Postați pe Buffer";
|
$a->strings['You are now authenticated to buffer. '] = 'Acum sunteți autentificat pe Buffer.';
|
||||||
$a->strings["Buffer Export"] = "Export pe Buffer ";
|
$a->strings['return to the connector page'] = 'revenire la pagina de conectare';
|
||||||
$a->strings["Authenticate your Buffer connection"] = "Autentificați-vă conectarea la Buffer";
|
$a->strings['Post to Buffer'] = 'Postați pe Buffer';
|
||||||
$a->strings["Enable Buffer Post Plugin"] = "Activare Modul Postare pe Buffer";
|
$a->strings['Buffer Export'] = 'Export pe Buffer ';
|
||||||
$a->strings["Post to Buffer by default"] = "Postați implicit pe Buffer";
|
$a->strings['Authenticate your Buffer connection'] = 'Autentificați-vă conectarea la Buffer';
|
||||||
$a->strings["Check to delete this preset"] = "Bifați pentru a șterge această presetare";
|
$a->strings['Enable Buffer Post Plugin'] = 'Activare Modul Postare pe Buffer';
|
||||||
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Posturile merg către toate conturile care sunt activate implicit:";
|
$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:';
|
||||||
|
|
|
@ -3,13 +3,19 @@
|
||||||
* Name: BugLink
|
* Name: BugLink
|
||||||
* Description: Show link to Friendica bug site at bottom of page
|
* Description: Show link to Friendica bug site at bottom of page
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <mike@macgirvin.com>
|
* Author: Mike Macgirvin <mike@macgirvin.com>.
|
||||||
*/
|
*/
|
||||||
|
function buglink_install()
|
||||||
|
{
|
||||||
|
register_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
|
||||||
|
}
|
||||||
|
|
||||||
|
function buglink_uninstall()
|
||||||
|
{
|
||||||
|
unregister_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
|
||||||
|
}
|
||||||
|
|
||||||
function buglink_install() { register_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_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>'; }
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "Informar de problema";
|
$a->strings['Report Bug'] = 'Informar de problema';
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
if (!function_exists('string_plural_select_cs')) {
|
||||||
function string_plural_select_cs($n){
|
function string_plural_select_cs($n)
|
||||||
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
{
|
||||||
}}
|
return ($n == 1) ? 0 : ($n >= 2 && $n <= 4) ? 1 : 2;
|
||||||
;
|
}
|
||||||
$a->strings["Report Bug"] = "Nahlásit chybu";
|
}
|
||||||
|
|
||||||
|
$a->strings['Report Bug'] = 'Nahlásit chybu';
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if (!function_exists('string_plural_select_de')) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Report Bug"] = "Fehler melden.";
|
}
|
||||||
|
|
||||||
|
$a->strings['Report Bug'] = 'Fehler melden.';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "Skribi cimraporton";
|
$a->strings['Report Bug'] = 'Skribi cimraporton';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "Informe de errores";
|
$a->strings['Report Bug'] = 'Informe de errores';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "Signaler un bug";
|
$a->strings['Report Bug'] = 'Signaler un bug';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "Tilkynna bilun";
|
$a->strings['Report Bug'] = 'Tilkynna bilun';
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if (!function_exists('string_plural_select_it')) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Report Bug"] = "Segnala un Bug";
|
}
|
||||||
|
|
||||||
|
$a->strings['Report Bug'] = 'Segnala un Bug';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "";
|
$a->strings['Report Bug'] = '';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "Zgłoś problem";
|
$a->strings['Report Bug'] = 'Zgłoś problem';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "Relate um Bug";
|
$a->strings['Report Bug'] = 'Relate um Bug';
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
if (!function_exists('string_plural_select_ro')) {
|
||||||
function string_plural_select_ro($n){
|
function string_plural_select_ro($n)
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
{
|
||||||
}}
|
return $n == 1 ? 0 : ((($n % 100 > 19) || (($n % 100 == 0) && ($n != 0))) ? 2 : 1);
|
||||||
;
|
}
|
||||||
$a->strings["Report Bug"] = "Raportează Problema";
|
}
|
||||||
|
|
||||||
|
$a->strings['Report Bug'] = 'Raportează Problema';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "Сообщить об ошибке";
|
$a->strings['Report Bug'] = 'Сообщить об ошибке';
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Report Bug"] = "报案程序错误";
|
$a->strings['Report Bug'] = '报案程序错误';
|
||||||
|
|
254
cal/cal.php
254
cal/cal.php
|
@ -8,7 +8,6 @@
|
||||||
* Status: Unsupported
|
* Status: Unsupported
|
||||||
* ******************************************************************/
|
* ******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
function cal_install()
|
function cal_install()
|
||||||
{
|
{
|
||||||
register_hook('plugin_settings', 'addon/cal/cal.php', 'cal_addon_settings');
|
register_hook('plugin_settings', 'addon/cal/cal.php', 'cal_addon_settings');
|
||||||
|
@ -29,86 +28,89 @@ function cal_module()
|
||||||
function cal_content()
|
function cal_content()
|
||||||
{
|
{
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$o = "";
|
$o = '';
|
||||||
if ($a->argc == 1) {
|
if ($a->argc == 1) {
|
||||||
$o .= "<h3>".t('Event Export')."</h3><p>".t('You can download public events from: ').$a->get_baseurl()."/cal/username/export/ical</p>";
|
$o .= '<h3>'.t('Event Export').'</h3><p>'.t('You can download public events from: ').$a->get_baseurl().'/cal/username/export/ical</p>';
|
||||||
} elseif ($a->argc==4) {
|
} elseif ($a->argc == 4) {
|
||||||
// get the parameters from the request we just received
|
// get the parameters from the request we just received
|
||||||
$username = $a->argv[1];
|
$username = $a->argv[1];
|
||||||
$do = $a->argv[2];
|
$do = $a->argv[2];
|
||||||
$format = $a->argv[3];
|
$format = $a->argv[3];
|
||||||
// check that there is a user matching the requested profile
|
// check that there is a user matching the requested profile
|
||||||
$r = q("SELECT uid FROM user WHERE nickname='".$username."' LIMIT 1;");
|
$r = q("SELECT uid FROM user WHERE nickname='".$username."' LIMIT 1;");
|
||||||
if (count($r))
|
if (count($r)) {
|
||||||
{
|
$uid = $r[0]['uid'];
|
||||||
$uid = $r[0]['uid'];
|
} else {
|
||||||
} else {
|
killme();
|
||||||
killme();
|
}
|
||||||
}
|
// if we shall do anything other then export, end here
|
||||||
// if we shall do anything other then export, end here
|
if (!$do == 'export') {
|
||||||
if (! $do == 'export' )
|
killme();
|
||||||
killme();
|
|
||||||
// check if the user allows us to share the profile
|
|
||||||
$enable = get_pconfig( $uid, 'cal', 'enable');
|
|
||||||
if (! $enable == 1) {
|
|
||||||
info(t('The user does not export the calendar.'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// we are allowed to show events
|
|
||||||
// get the timezone the user is in
|
|
||||||
$r = q("SELECT timezone FROM user WHERE uid=".$uid." LIMIT 1;");
|
|
||||||
if (count($r))
|
|
||||||
$timezone = $r[0]['timezone'];
|
|
||||||
// does the user who requests happen to be the owner of the events
|
|
||||||
// requested? then show all of your events, otherwise only those that
|
|
||||||
// don't have limitations set in allow_cid and allow_gid
|
|
||||||
if (local_user() == $uid) {
|
|
||||||
$r = q("SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `uid`=".$uid." and `cid`=0;");
|
|
||||||
} else {
|
|
||||||
$r = q("SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `allow_cid`='' and `allow_gid`='' and `uid`='".$uid."' and `cid`='0';");
|
|
||||||
}
|
|
||||||
// we have the events that are available for the requestor
|
|
||||||
// now format the output according to the requested format
|
|
||||||
$res = cal_format_output($r, $format, $timezone);
|
|
||||||
if (! $res=='')
|
|
||||||
info($res);
|
|
||||||
} else {
|
|
||||||
// wrong number of parameters
|
|
||||||
killme();
|
|
||||||
}
|
}
|
||||||
|
// check if the user allows us to share the profile
|
||||||
|
$enable = get_pconfig($uid, 'cal', 'enable');
|
||||||
|
if (!$enable == 1) {
|
||||||
|
info(t('The user does not export the calendar.'));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// we are allowed to show events
|
||||||
|
// get the timezone the user is in
|
||||||
|
$r = q('SELECT timezone FROM user WHERE uid='.$uid.' LIMIT 1;');
|
||||||
|
if (count($r)) {
|
||||||
|
$timezone = $r[0]['timezone'];
|
||||||
|
}
|
||||||
|
// does the user who requests happen to be the owner of the events
|
||||||
|
// requested? then show all of your events, otherwise only those that
|
||||||
|
// don't have limitations set in allow_cid and allow_gid
|
||||||
|
if (local_user() == $uid) {
|
||||||
|
$r = q('SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `uid`='.$uid.' and `cid`=0;');
|
||||||
|
} else {
|
||||||
|
$r = q("SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `allow_cid`='' and `allow_gid`='' and `uid`='".$uid."' and `cid`='0';");
|
||||||
|
}
|
||||||
|
// we have the events that are available for the requestor
|
||||||
|
// now format the output according to the requested format
|
||||||
|
$res = cal_format_output($r, $format, $timezone);
|
||||||
|
if (!$res == '') {
|
||||||
|
info($res);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// wrong number of parameters
|
||||||
|
killme();
|
||||||
|
}
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cal_format_output ($r, $f, $tz)
|
function cal_format_output($r, $f, $tz)
|
||||||
{
|
{
|
||||||
$res = t('This calendar format is not supported');
|
$res = t('This calendar format is not supported');
|
||||||
switch ($f)
|
switch ($f) {
|
||||||
{
|
// format the exported data as a CSV file
|
||||||
// format the exported data as a CSV file
|
case 'csv':
|
||||||
case "csv":
|
header('Content-type: text/csv');
|
||||||
header("Content-type: text/csv");
|
$o = '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"'.PHP_EOL;
|
||||||
$o = '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"' . PHP_EOL;
|
foreach ($r as $rr) {
|
||||||
foreach ($r as $rr) {
|
// TODO the time / date entries don't include any information about the
|
||||||
// TODO the time / date entries don't include any information about the
|
|
||||||
// timezone the event is scheduled in :-/
|
// timezone the event is scheduled in :-/
|
||||||
$tmp1 = strtotime($rr['start']);
|
$tmp1 = strtotime($rr['start']);
|
||||||
$tmp2 = strtotime($rr['finish']);
|
$tmp2 = strtotime($rr['finish']);
|
||||||
$time_format = "%H:%M:%S";
|
$time_format = '%H:%M:%S';
|
||||||
$date_format = "%Y-%m-%d";
|
$date_format = '%Y-%m-%d';
|
||||||
$o .= '"'.$rr['summary'].'", "'.strftime($date_format, $tmp1) .
|
$o .= '"'.$rr['summary'].'", "'.strftime($date_format, $tmp1).
|
||||||
'", "'.strftime($time_format, $tmp1).'", "'.$rr['desc'] .
|
'", "'.strftime($time_format, $tmp1).'", "'.$rr['desc'].
|
||||||
'", "'.strftime($date_format, $tmp2) .
|
'", "'.strftime($date_format, $tmp2).
|
||||||
'", "'.strftime($time_format, $tmp2) .
|
'", "'.strftime($time_format, $tmp2).
|
||||||
'", "'.$rr['location'].'"' . PHP_EOL;
|
'", "'.$rr['location'].'"'.PHP_EOL;
|
||||||
}
|
}
|
||||||
echo $o;
|
echo $o;
|
||||||
killme();
|
killme();
|
||||||
|
|
||||||
case "ical":
|
case 'ical':
|
||||||
header("Content-type: text/ics");
|
header('Content-type: text/ics');
|
||||||
$o = 'BEGIN:VCALENDAR'. PHP_EOL
|
$o = 'BEGIN:VCALENDAR'.PHP_EOL
|
||||||
. 'VERSION:2.0' . PHP_EOL
|
.'VERSION:2.0'.PHP_EOL
|
||||||
. 'PRODID:-//friendica calendar export//0.1//EN' . PHP_EOL;
|
.'PRODID:-//friendica calendar export//0.1//EN'.PHP_EOL;
|
||||||
// TODO include timezone informations in cases were the time is not in UTC
|
// TODO include timezone informations in cases were the time is not in UTC
|
||||||
// see http://tools.ietf.org/html/rfc2445#section-4.8.3
|
// see http://tools.ietf.org/html/rfc2445#section-4.8.3
|
||||||
// . 'BEGIN:VTIMEZONE' . PHP_EOL
|
// . 'BEGIN:VTIMEZONE' . PHP_EOL
|
||||||
|
@ -117,62 +119,68 @@ function cal_format_output ($r, $f, $tz)
|
||||||
// TODO instead of PHP_EOL CRLF should be used for long entries
|
// TODO instead of PHP_EOL CRLF should be used for long entries
|
||||||
// but test your solution against http://icalvalid.cloudapp.net/
|
// but test your solution against http://icalvalid.cloudapp.net/
|
||||||
// also long lines SHOULD be split at 75 characters length
|
// also long lines SHOULD be split at 75 characters length
|
||||||
foreach ($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
if ($rr['adjust'] == 1) {
|
if ($rr['adjust'] == 1) {
|
||||||
$UTC = 'Z';
|
$UTC = 'Z';
|
||||||
} else {
|
} else {
|
||||||
$UTC = '';
|
$UTC = '';
|
||||||
}
|
}
|
||||||
$o .= 'BEGIN:VEVENT' . PHP_EOL;
|
$o .= 'BEGIN:VEVENT'.PHP_EOL;
|
||||||
if ($rr[start]) {
|
if ($rr[start]) {
|
||||||
$tmp = strtotime($rr['start']);
|
$tmp = strtotime($rr['start']);
|
||||||
$dtformat = "%Y%m%dT%H%M%S".$UTC;
|
$dtformat = '%Y%m%dT%H%M%S'.$UTC;
|
||||||
$o .= 'DTSTART:'.strftime($dtformat, $tmp).PHP_EOL;
|
$o .= 'DTSTART:'.strftime($dtformat, $tmp).PHP_EOL;
|
||||||
}
|
}
|
||||||
if ($rr['finish']) {
|
if ($rr['finish']) {
|
||||||
$tmp = strtotime($rr['finish']);
|
$tmp = strtotime($rr['finish']);
|
||||||
$dtformat = "%Y%m%dT%H%M%S".$UTC;
|
$dtformat = '%Y%m%dT%H%M%S'.$UTC;
|
||||||
$o .= 'DTEND:'.strftime($dtformat, $tmp).PHP_EOL;
|
$o .= 'DTEND:'.strftime($dtformat, $tmp).PHP_EOL;
|
||||||
}
|
}
|
||||||
if ($rr['summary'])
|
if ($rr['summary']) {
|
||||||
$tmp = $rr['summary'];
|
$tmp = $rr['summary'];
|
||||||
$tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp);
|
}
|
||||||
$tmp = addcslashes($tmp, ',;');
|
$tmp = str_replace(PHP_EOL, PHP_EOL.' ', $tmp);
|
||||||
$o .= 'SUMMARY:' . $tmp . PHP_EOL;
|
$tmp = addcslashes($tmp, ',;');
|
||||||
if ($rr['desc'])
|
$o .= 'SUMMARY:'.$tmp.PHP_EOL;
|
||||||
$tmp = $rr['desc'];
|
if ($rr['desc']) {
|
||||||
$tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp);
|
$tmp = $rr['desc'];
|
||||||
$tmp = addcslashes($tmp, ',;');
|
}
|
||||||
$o .= 'DESCRIPTION:' . $tmp . PHP_EOL;
|
$tmp = str_replace(PHP_EOL, PHP_EOL.' ', $tmp);
|
||||||
if ($rr['location']) {
|
$tmp = addcslashes($tmp, ',;');
|
||||||
$tmp = $rr['location'];
|
$o .= 'DESCRIPTION:'.$tmp.PHP_EOL;
|
||||||
$tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp);
|
if ($rr['location']) {
|
||||||
$tmp = addcslashes($tmp, ',;');
|
$tmp = $rr['location'];
|
||||||
$o .= 'LOCATION:' . $tmp . PHP_EOL;
|
$tmp = str_replace(PHP_EOL, PHP_EOL.' ', $tmp);
|
||||||
}
|
$tmp = addcslashes($tmp, ',;');
|
||||||
$o .= 'END:VEVENT' . PHP_EOL;
|
$o .= 'LOCATION:'.$tmp.PHP_EOL;
|
||||||
}
|
}
|
||||||
$o .= 'END:VCALENDAR' . PHP_EOL;
|
$o .= 'END:VEVENT'.PHP_EOL;
|
||||||
echo $o;
|
}
|
||||||
killme();
|
$o .= 'END:VCALENDAR'.PHP_EOL;
|
||||||
|
echo $o;
|
||||||
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cal_addon_settings_post ( &$a, &$b )
|
function cal_addon_settings_post(&$a, &$b)
|
||||||
{
|
{
|
||||||
if (! local_user())
|
if (!local_user()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!x($_POST,'cal-submit'))
|
if (!x($_POST, 'cal-submit')) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
set_pconfig(local_user(),'cal','enable',intval($_POST['cal-enable']));
|
set_pconfig(local_user(), 'cal', 'enable', intval($_POST['cal-enable']));
|
||||||
}
|
}
|
||||||
function cal_addon_settings ( &$a, &$s )
|
function cal_addon_settings(&$a, &$s)
|
||||||
{
|
{
|
||||||
if (! local_user())
|
if (!local_user()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$enabled = get_pconfig(local_user(), 'cal', 'enable');
|
$enabled = get_pconfig(local_user(), 'cal', 'enable');
|
||||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||||
|
@ -189,12 +197,10 @@ function cal_addon_settings ( &$a, &$s )
|
||||||
$s .= '<div id="cal-wrapper">';
|
$s .= '<div id="cal-wrapper">';
|
||||||
$s .= '<p>'.t('If this is enabled, your public events will be available at').' <strong>'.$url.'</strong></p>';
|
$s .= '<p>'.t('If this is enabled, your public events will be available at').' <strong>'.$url.'</strong></p>';
|
||||||
$s .= '<p>'.t('Currently supported formats are ical and csv.').'</p>';
|
$s .= '<p>'.t('Currently supported formats are ical and csv.').'</p>';
|
||||||
$s .= '<label id="cal-enable-label" for="cal-checkbox">'. t('Enable calendar export') .'</label>';
|
$s .= '<label id="cal-enable-label" for="cal-checkbox">'.t('Enable calendar export').'</label>';
|
||||||
$s .= '<input id="cal-checkbox" type="checkbox" name="cal-enable" value="1" ' . $checked . '/>';
|
$s .= '<input id="cal-checkbox" type="checkbox" name="cal-enable" value="1" '.$checked.'/>';
|
||||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="cal-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div>';
|
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="cal-submit" class="settings-submit" value="'.t('Save Settings').'" /></div>';
|
||||||
$s .= '<div class="clear"></div>';
|
$s .= '<div class="clear"></div>';
|
||||||
$s .= '</div>';
|
$s .= '</div>';
|
||||||
$s .= '</div>';
|
$s .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
;
|
|
||||||
$a->strings["Event Export"] = "";
|
$a->strings['Event Export'] = '';
|
||||||
$a->strings["You can download public events from: "] = "";
|
$a->strings['You can download public events from: '] = '';
|
||||||
$a->strings["The user does not export the calendar."] = "";
|
$a->strings['The user does not export the calendar.'] = '';
|
||||||
$a->strings["This calendar format is not supported"] = "";
|
$a->strings['This calendar format is not supported'] = '';
|
||||||
$a->strings["Export Events"] = "";
|
$a->strings['Export Events'] = '';
|
||||||
$a->strings["If this is enabled, your public events will be available at"] = "";
|
$a->strings['If this is enabled, your public events will be available at'] = '';
|
||||||
$a->strings["Currently supported formats are ical and csv."] = "";
|
$a->strings['Currently supported formats are ical and csv.'] = '';
|
||||||
$a->strings["Enable calendar export"] = "";
|
$a->strings['Enable calendar export'] = '';
|
||||||
$a->strings["Submit"] = "";
|
$a->strings['Submit'] = '';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
if (!function_exists('string_plural_select_cs')) {
|
||||||
function string_plural_select_cs($n){
|
function string_plural_select_cs($n)
|
||||||
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
{
|
||||||
}}
|
return ($n == 1) ? 0 : ($n >= 2 && $n <= 4) ? 1 : 2;
|
||||||
;
|
}
|
||||||
$a->strings["Event Export"] = "Export událostí";
|
}
|
||||||
$a->strings["You can download public events from: "] = "Veřejné události si můžete stánout z:";
|
|
||||||
$a->strings["The user does not export the calendar."] = "Uživatel kalenář neexportuje.";
|
$a->strings['Event Export'] = 'Export událostí';
|
||||||
$a->strings["This calendar format is not supported"] = "Tento kalendářový formát není podporován.";
|
$a->strings['You can download public events from: '] = 'Veřejné události si můžete stánout z:';
|
||||||
$a->strings["Export Events"] = "Export událostí";
|
$a->strings['The user does not export the calendar.'] = 'Uživatel kalenář neexportuje.';
|
||||||
$a->strings["If this is enabled, your public events will be available at"] = "Pokud je toto povoleno, vaše veřejné události budou viditelné na";
|
$a->strings['This calendar format is not supported'] = 'Tento kalendářový formát není podporován.';
|
||||||
$a->strings["Currently supported formats are ical and csv."] = "Aktuálně podporované formáty jsou ical a csv.";
|
$a->strings['Export Events'] = 'Export událostí';
|
||||||
$a->strings["Enable calendar export"] = "Povolit export kalendáře";
|
$a->strings['If this is enabled, your public events will be available at'] = 'Pokud je toto povoleno, vaše veřejné události budou viditelné na';
|
||||||
$a->strings["Save Settings"] = "Uložit Nastavení";
|
$a->strings['Currently supported formats are ical and csv.'] = 'Aktuálně podporované formáty jsou ical a csv.';
|
||||||
|
$a->strings['Enable calendar export'] = 'Povolit export kalendáře';
|
||||||
|
$a->strings['Save Settings'] = 'Uložit Nastavení';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if (!function_exists('string_plural_select_de')) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Event Export"] = "Ereignis Export";
|
}
|
||||||
$a->strings["You can download public events from: "] = "Du kannst öffentliche Ereignisse hier herunterladen;";
|
|
||||||
$a->strings["The user does not export the calendar."] = "Diese_r Nutzer_in exportiert den Kalender nicht.";
|
$a->strings['Event Export'] = 'Ereignis Export';
|
||||||
$a->strings["This calendar format is not supported"] = "Dieses Kalenderformat wird nicht unterstützt.";
|
$a->strings['You can download public events from: '] = 'Du kannst öffentliche Ereignisse hier herunterladen;';
|
||||||
$a->strings["Export Events"] = "Exportiere Ereignisse";
|
$a->strings['The user does not export the calendar.'] = 'Diese_r Nutzer_in exportiert den Kalender nicht.';
|
||||||
$a->strings["If this is enabled, your public events will be available at"] = "Wenn dies aktiviert ist, werden alle öffentliche Ereignisse unter folgender URL verfügbar sein";
|
$a->strings['This calendar format is not supported'] = 'Dieses Kalenderformat wird nicht unterstützt.';
|
||||||
$a->strings["Currently supported formats are ical and csv."] = "Derzeit werden die Formate ical und csv unterstützt.";
|
$a->strings['Export Events'] = 'Exportiere Ereignisse';
|
||||||
$a->strings["Enable calendar export"] = "Kalenderexport aktivieren";
|
$a->strings['If this is enabled, your public events will be available at'] = 'Wenn dies aktiviert ist, werden alle öffentliche Ereignisse unter folgender URL verfügbar sein';
|
||||||
$a->strings["Save Settings"] = "Einstellungen speichern";
|
$a->strings['Currently supported formats are ical and csv.'] = 'Derzeit werden die Formate ical und csv unterstützt.';
|
||||||
|
$a->strings['Enable calendar export'] = 'Kalenderexport aktivieren';
|
||||||
|
$a->strings['Save Settings'] = 'Einstellungen speichern';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fr")) {
|
if (!function_exists('string_plural_select_fr')) {
|
||||||
function string_plural_select_fr($n){
|
function string_plural_select_fr($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Event Export"] = "Exportation d'événement";
|
}
|
||||||
$a->strings["You can download public events from: "] = "Vous pouvez télécharger les événements publiques de :";
|
|
||||||
$a->strings["The user does not export the calendar."] = "L'utilisateur n'exporte pas le calendrier.";
|
$a->strings['Event Export'] = "Exportation d'événement";
|
||||||
$a->strings["This calendar format is not supported"] = "Ce format de calendrier n'est pas pris en charge";
|
$a->strings['You can download public events from: '] = 'Vous pouvez télécharger les événements publiques de :';
|
||||||
$a->strings["Export Events"] = "Exporter les événements";
|
$a->strings['The user does not export the calendar.'] = "L'utilisateur n'exporte pas le calendrier.";
|
||||||
$a->strings["If this is enabled, your public events will be available at"] = "Si activé, vos événements publiques seront disponible à";
|
$a->strings['This calendar format is not supported'] = "Ce format de calendrier n'est pas pris en charge";
|
||||||
$a->strings["Currently supported formats are ical and csv."] = "Les formats actuellement pris en charge sont ical et csv.";
|
$a->strings['Export Events'] = 'Exporter les événements';
|
||||||
$a->strings["Enable calendar export"] = "Activer l'export de calendrier";
|
$a->strings['If this is enabled, your public events will be available at'] = 'Si activé, vos événements publiques seront disponible à';
|
||||||
$a->strings["Save Settings"] = "Sauvegarder les paramètres";
|
$a->strings['Currently supported formats are ical and csv.'] = 'Les formats actuellement pris en charge sont ical et csv.';
|
||||||
|
$a->strings['Enable calendar export'] = "Activer l'export de calendrier";
|
||||||
|
$a->strings['Save Settings'] = 'Sauvegarder les paramètres';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if (!function_exists('string_plural_select_it')) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Event Export"] = "Esporta Evento";
|
}
|
||||||
$a->strings["You can download public events from: "] = "Puoi scaricare gli eventi publici da:";
|
|
||||||
$a->strings["The user does not export the calendar."] = "L'utente non esporta il calendario.";
|
$a->strings['Event Export'] = 'Esporta Evento';
|
||||||
$a->strings["This calendar format is not supported"] = "Il formato del calendario non è supportato";
|
$a->strings['You can download public events from: '] = 'Puoi scaricare gli eventi publici da:';
|
||||||
$a->strings["Export Events"] = "Esporta Eventi";
|
$a->strings['The user does not export the calendar.'] = "L'utente non esporta il calendario.";
|
||||||
$a->strings["If this is enabled, your public events will be available at"] = "Se abilitato, i tuoi eventi pubblici saranno disponibili a";
|
$a->strings['This calendar format is not supported'] = 'Il formato del calendario non è supportato';
|
||||||
$a->strings["Currently supported formats are ical and csv."] = "I formati supportati sono ical e csv.";
|
$a->strings['Export Events'] = 'Esporta Eventi';
|
||||||
$a->strings["Enable calendar export"] = "Abilita esporazione calendario";
|
$a->strings['If this is enabled, your public events will be available at'] = 'Se abilitato, i tuoi eventi pubblici saranno disponibili a';
|
||||||
$a->strings["Save Settings"] = "Salva Impostazioni";
|
$a->strings['Currently supported formats are ical and csv.'] = 'I formati supportati sono ical e csv.';
|
||||||
|
$a->strings['Enable calendar export'] = 'Abilita esporazione calendario';
|
||||||
|
$a->strings['Save Settings'] = 'Salva Impostazioni';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_pt_br")) {
|
if (!function_exists('string_plural_select_pt_br')) {
|
||||||
function string_plural_select_pt_br($n){
|
function string_plural_select_pt_br($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Event Export"] = "Exportar Evento";
|
}
|
||||||
$a->strings["You can download public events from: "] = "Você pode baixar eventos públicos de:";
|
|
||||||
$a->strings["The user does not export the calendar."] = "O usuário não exportou o calendário.";
|
$a->strings['Event Export'] = 'Exportar Evento';
|
||||||
$a->strings["This calendar format is not supported"] = "Esse formato de calendário não é suportado.";
|
$a->strings['You can download public events from: '] = 'Você pode baixar eventos públicos de:';
|
||||||
$a->strings["Export Events"] = "Exporta Eventos";
|
$a->strings['The user does not export the calendar.'] = 'O usuário não exportou o calendário.';
|
||||||
$a->strings["If this is enabled, your public events will be available at"] = "Se isso estiver habiltiado, seus eventos públicos estarão disponíveis";
|
$a->strings['This calendar format is not supported'] = 'Esse formato de calendário não é suportado.';
|
||||||
$a->strings["Currently supported formats are ical and csv."] = "Os formatos disponíveis atualmente são ical e csv.";
|
$a->strings['Export Events'] = 'Exporta Eventos';
|
||||||
$a->strings["Enable calendar export"] = "Habilite exportar calendário";
|
$a->strings['If this is enabled, your public events will be available at'] = 'Se isso estiver habiltiado, seus eventos públicos estarão disponíveis';
|
||||||
$a->strings["Save Settings"] = "Salvar as Configurações";
|
$a->strings['Currently supported formats are ical and csv.'] = 'Os formatos disponíveis atualmente são ical e csv.';
|
||||||
|
$a->strings['Enable calendar export'] = 'Habilite exportar calendário';
|
||||||
|
$a->strings['Save Settings'] = 'Salvar as Configurações';
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
if (!function_exists('string_plural_select_ro')) {
|
||||||
function string_plural_select_ro($n){
|
function string_plural_select_ro($n)
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
{
|
||||||
}}
|
return $n == 1 ? 0 : ((($n % 100 > 19) || (($n % 100 == 0) && ($n != 0))) ? 2 : 1);
|
||||||
;
|
}
|
||||||
$a->strings["Event Export"] = "Exportare Eveniment";
|
}
|
||||||
$a->strings["You can download public events from: "] = "Puteți descărca evenimente publice de la:";
|
|
||||||
$a->strings["The user does not export the calendar."] = "Utilizatorul nu își exportă calendarul.";
|
$a->strings['Event Export'] = 'Exportare Eveniment';
|
||||||
$a->strings["This calendar format is not supported"] = "Acest format de calendar nu este acceptat";
|
$a->strings['You can download public events from: '] = 'Puteți descărca evenimente publice de la:';
|
||||||
$a->strings["Export Events"] = "Exportați Evenimente";
|
$a->strings['The user does not export the calendar.'] = 'Utilizatorul nu își exportă calendarul.';
|
||||||
$a->strings["If this is enabled, your public events will be available at"] = "Dacă este activat, evenimente dvs publice vor fi disponibile pe";
|
$a->strings['This calendar format is not supported'] = 'Acest format de calendar nu este acceptat';
|
||||||
$a->strings["Currently supported formats are ical and csv."] = "Formate acceptate în prezent sunt ical şi csv.";
|
$a->strings['Export Events'] = 'Exportați Evenimente';
|
||||||
$a->strings["Enable calendar export"] = "Activați exportarea calendarului";
|
$a->strings['If this is enabled, your public events will be available at'] = 'Dacă este activat, evenimente dvs publice vor fi disponibile pe';
|
||||||
$a->strings["Save Settings"] = "Salvare Configurări";
|
$a->strings['Currently supported formats are ical and csv.'] = 'Formate acceptate în prezent sunt ical şi csv.';
|
||||||
|
$a->strings['Enable calendar export'] = 'Activați exportarea calendarului';
|
||||||
|
$a->strings['Save Settings'] = 'Salvare Configurări';
|
||||||
|
|
|
@ -3,32 +3,30 @@
|
||||||
* Name: Calculator App
|
* Name: Calculator App
|
||||||
* Description: Simple Calculator Application
|
* Description: Simple Calculator Application
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>.
|
||||||
*/
|
*/
|
||||||
|
function calc_install()
|
||||||
|
{
|
||||||
function calc_install() {
|
register_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
|
||||||
register_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function calc_uninstall() {
|
function calc_uninstall()
|
||||||
unregister_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
|
{
|
||||||
|
unregister_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function calc_app_menu($a,&$b) {
|
function calc_app_menu($a, &$b)
|
||||||
$b['app_menu'][] = '<div class="app-title"><a href="calc">Calculator</a></div>';
|
{
|
||||||
|
$b['app_menu'][] = '<div class="app-title"><a href="calc">Calculator</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function calc_module()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
function calc_module() {}
|
function calc_init($a)
|
||||||
|
{
|
||||||
|
$x = <<< 'EOT'
|
||||||
|
|
||||||
|
|
||||||
function calc_init($a) {
|
|
||||||
|
|
||||||
$x = <<< EOT
|
|
||||||
|
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
/**************************************
|
/**************************************
|
||||||
|
@ -284,14 +282,14 @@ id.value = ""
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
EOT;
|
EOT;
|
||||||
$a->page['htmlhead'] .= $x;
|
$a->page['htmlhead'] .= $x;
|
||||||
}
|
}
|
||||||
|
|
||||||
function calc_content($app) {
|
function calc_content($app)
|
||||||
|
{
|
||||||
|
$o = '';
|
||||||
|
|
||||||
$o = '';
|
$o .= <<< 'EOT'
|
||||||
|
|
||||||
$o .= <<< EOT
|
|
||||||
|
|
||||||
<h3>Calculator</h3>
|
<h3>Calculator</h3>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
@ -358,6 +356,6 @@ $o .= <<< EOT
|
||||||
</td></tr></tbody></table>
|
</td></tr></tbody></table>
|
||||||
|
|
||||||
EOT;
|
EOT;
|
||||||
return $o;
|
|
||||||
|
|
||||||
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,78 +3,79 @@
|
||||||
* Name: Community home
|
* Name: Community home
|
||||||
* Description: Show last community activity in homepage
|
* Description: Show last community activity in homepage
|
||||||
* Version: 2.0
|
* Version: 2.0
|
||||||
* Author: Fabio Comuni <http://kirgroup.com/profile/fabrixxm>
|
* Author: Fabio Comuni <http://kirgroup.com/profile/fabrixxm>.
|
||||||
*/
|
*/
|
||||||
|
require_once 'mod/community.php';
|
||||||
|
|
||||||
|
function communityhome_install()
|
||||||
require_once('mod/community.php');
|
{
|
||||||
|
register_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
|
||||||
|
logger('installed communityhome');
|
||||||
function communityhome_install() {
|
|
||||||
register_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
|
|
||||||
logger("installed communityhome");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function communityhome_uninstall() {
|
function communityhome_uninstall()
|
||||||
unregister_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
|
{
|
||||||
logger("removed communityhome");
|
unregister_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
|
||||||
|
logger('removed communityhome');
|
||||||
}
|
}
|
||||||
|
|
||||||
function communityhome_home(&$a, &$o){
|
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" />';
|
// custom css
|
||||||
|
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/communityhome/communityhome.css" media="all" />';
|
||||||
|
|
||||||
if (!get_config('communityhome','hidelogin')){
|
if (!get_config('communityhome', 'hidelogin')) {
|
||||||
$aside = array(
|
$aside = array(
|
||||||
'$tab_1' => t('Login'),
|
'$tab_1' => t('Login'),
|
||||||
'$tab_2' => t('OpenID'),
|
'$tab_2' => t('OpenID'),
|
||||||
'$noOid' => get_config('system','no_openid'),
|
'$noOid' => get_config('system', 'no_openid'),
|
||||||
);
|
);
|
||||||
|
|
||||||
// login form
|
// login form
|
||||||
$aside['$login_title'] = t('Login');
|
$aside['$login_title'] = t('Login');
|
||||||
$aside['$login_form'] = login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);
|
$aside['$login_form'] = login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);
|
||||||
} else
|
} else {
|
||||||
$aside = array(
|
$aside = array(
|
||||||
//'$tab_1' => t('Login'),
|
//'$tab_1' => t('Login'),
|
||||||
//'$tab_2' => t('OpenID'),
|
//'$tab_2' => t('OpenID'),
|
||||||
//'$noOid' => get_config('system','no_openid'),
|
//'$noOid' => get_config('system','no_openid'),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// last 12 users
|
// last 12 users
|
||||||
if (get_config('communityhome','showlastusers')===true){
|
if (get_config('communityhome', 'showlastusers') === true) {
|
||||||
$aside['$lastusers_title'] = t('Latest users');
|
$aside['$lastusers_title'] = t('Latest users');
|
||||||
$aside['$lastusers_items'] = array();
|
$aside['$lastusers_items'] = array();
|
||||||
$sql_extra = "";
|
$sql_extra = '';
|
||||||
$publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " );
|
$publish = (get_config('system', 'publish_all') ? '' : ' AND `publish` = 1 ');
|
||||||
$order = " ORDER BY `register_date` DESC ";
|
$order = ' ORDER BY `register_date` DESC ';
|
||||||
|
|
||||||
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`
|
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`
|
||||||
FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
|
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 ",
|
WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ",
|
||||||
0,
|
0,
|
||||||
12
|
12
|
||||||
);
|
);
|
||||||
# $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl');
|
// $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl');
|
||||||
$tpl = get_markup_template( 'directory_item.tpl', 'addon/communityhome/' );
|
$tpl = get_markup_template('directory_item.tpl', 'addon/communityhome/');
|
||||||
if(count($r)) {
|
if (count($r)) {
|
||||||
$photo = 'thumb';
|
$photo = 'thumb';
|
||||||
foreach($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
|
$profile_link = $a->get_baseurl().'/profile/'.((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
|
||||||
$entry = replace_macros($tpl,array(
|
$entry = replace_macros($tpl, array(
|
||||||
'$id' => $rr['id'],
|
'$id' => $rr['id'],
|
||||||
'$profile_link' => $profile_link,
|
'$profile_link' => $profile_link,
|
||||||
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
|
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
|
||||||
'$alt_text' => $rr['name'],
|
'$alt_text' => $rr['name'],
|
||||||
));
|
));
|
||||||
$aside['$lastusers_items'][] = $entry;
|
$aside['$lastusers_items'][] = $entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 12 most active users (by posts and contacts)
|
// 12 most active users (by posts and contacts)
|
||||||
// this query don't work on some mysql versions
|
// this query don't work on some mysql versions
|
||||||
if (get_config('communityhome','showactiveusers')===true){
|
if (get_config('communityhome', 'showactiveusers') === true) {
|
||||||
$r = q("SELECT `uni`.`contacts`,`uni`.`items`, `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` FROM
|
$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 `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 COUNT(*) as `items`, `uid` FROM `item` WHERE `item`.`changed` > DATE(NOW() - INTERVAL 1 MONTH) AND `item`.`wall` = 1 GROUP BY `uid`) AS `ite`,
|
||||||
(
|
(
|
||||||
|
@ -86,29 +87,29 @@ function communityhome_home(&$a, &$o){
|
||||||
AND `uni`.`uid`=`profile`.`uid` AND `profile`.`publish`=1
|
AND `uni`.`uid`=`profile`.`uid` AND `profile`.`publish`=1
|
||||||
GROUP BY `uid`
|
GROUP BY `uid`
|
||||||
ORDER BY `items` DESC,`contacts` DESC
|
ORDER BY `items` DESC,`contacts` DESC
|
||||||
LIMIT 0,10");
|
LIMIT 0,10');
|
||||||
if($r && count($r)) {
|
if ($r && count($r)) {
|
||||||
$aside['$activeusers_title'] = t('Most active users');
|
$aside['$activeusers_title'] = t('Most active users');
|
||||||
$aside['$activeusers_items'] = array();
|
$aside['$activeusers_items'] = array();
|
||||||
|
|
||||||
$photo = 'thumb';
|
$photo = 'thumb';
|
||||||
foreach($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
|
$profile_link = $a->get_baseurl().'/profile/'.((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
|
||||||
$entry = replace_macros($tpl,array(
|
$entry = replace_macros($tpl, array(
|
||||||
'$id' => $rr['id'],
|
'$id' => $rr['id'],
|
||||||
'$profile_link' => $profile_link,
|
'$profile_link' => $profile_link,
|
||||||
'$photo' => $rr[$photo],
|
'$photo' => $rr[$photo],
|
||||||
'$alt_text' => sprintf("%s (%s posts, %s contacts)",$rr['name'], ($rr['items']?$rr['items']:'0'), ($rr['contacts']?$rr['contacts']:'0'))
|
'$alt_text' => sprintf('%s (%s posts, %s contacts)', $rr['name'], ($rr['items'] ? $rr['items'] : '0'), ($rr['contacts'] ? $rr['contacts'] : '0')),
|
||||||
));
|
));
|
||||||
$aside['$activeusers_items'][] = $entry;
|
$aside['$activeusers_items'][] = $entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// last 12 photos
|
// last 12 photos
|
||||||
if (get_config('communityhome','showlastphotos')===true){
|
if (get_config('communityhome', 'showlastphotos') === true) {
|
||||||
$aside['$photos_title'] = t('Latest photos');
|
$aside['$photos_title'] = t('Latest photos');
|
||||||
$aside['$photos_items'] = array();
|
$aside['$photos_items'] = array();
|
||||||
$r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM
|
$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`
|
(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')
|
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`
|
AND `allow_cid`='' AND `allow_gid`='' AND `deny_cid`='' AND `deny_gid`='' GROUP BY `resource-id`) AS `t1`
|
||||||
|
@ -119,35 +120,34 @@ function communityhome_home(&$a, &$o){
|
||||||
AND `user`.`hidewall` = 0
|
AND `user`.`hidewall` = 0
|
||||||
ORDER BY `photo`.`edited` DESC
|
ORDER BY `photo`.`edited` DESC
|
||||||
LIMIT 0, 12",
|
LIMIT 0, 12",
|
||||||
dbesc(t('Contact Photos')),
|
dbesc(t('Contact Photos')),
|
||||||
dbesc(t('Profile Photos'))
|
dbesc(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) {
|
||||||
|
$photo_page = $a->get_baseurl().'/photos/'.$rr['nickname'].'/image/'.$rr['resource-id'];
|
||||||
|
$photo_url = $a->get_baseurl().'/photo/'.$rr['resource-id'].'-'.$rr['scale'].'.jpg';
|
||||||
|
|
||||||
if(count($r)) {
|
$entry = replace_macros($tpl, array(
|
||||||
# $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl');
|
'$id' => $rr['id'],
|
||||||
$tpl = get_markup_template( 'directory_item.tpl', 'addon/communityhome/' );
|
'$profile_link' => $photo_page,
|
||||||
foreach($r as $rr) {
|
'$photo' => $photo_url,
|
||||||
$photo_page = $a->get_baseurl() . '/photos/' . $rr['nickname'] . '/image/' . $rr['resource-id'];
|
'$alt_text' => $rr['username'].' : '.$rr['desc'],
|
||||||
$photo_url = $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] .'.jpg';
|
));
|
||||||
|
|
||||||
$entry = replace_macros($tpl,array(
|
$aside['$photos_items'][] = $entry;
|
||||||
'$id' => $rr['id'],
|
}
|
||||||
'$profile_link' => $photo_page,
|
}
|
||||||
'$photo' => $photo_url,
|
}
|
||||||
'$alt_text' => $rr['username']." : ".$rr['desc'],
|
|
||||||
));
|
|
||||||
|
|
||||||
$aside['$photos_items'][] = $entry;
|
// 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
|
||||||
// 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`
|
(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
|
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`
|
INNER JOIN `item` ON `item`.`uri`=`T1`.`parent-uri`
|
||||||
|
@ -155,57 +155,60 @@ function communityhome_home(&$a, &$o){
|
||||||
GROUP BY `uri`
|
GROUP BY `uri`
|
||||||
ORDER BY `T1`.`created` DESC
|
ORDER BY `T1`.`created` DESC
|
||||||
LIMIT 0,10",
|
LIMIT 0,10",
|
||||||
$a->get_baseurl(),$a->get_baseurl()
|
$a->get_baseurl(), $a->get_baseurl()
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
$author = '<a href="' . $rr['liker-link'] . '">' . $rr['liker'] . '</a>';
|
$author = '<a href="'.$rr['liker-link'].'">'.$rr['liker'].'</a>';
|
||||||
$objauthor = '<a href="' . $rr['author-link'] . '">' . $rr['author-name'] . '</a>';
|
$objauthor = '<a href="'.$rr['author-link'].'">'.$rr['author-name'].'</a>';
|
||||||
|
|
||||||
//var_dump($rr['verb'],$rr['object-type']); killme();
|
//var_dump($rr['verb'],$rr['object-type']); killme();
|
||||||
switch($rr['verb']){
|
switch ($rr['verb']) {
|
||||||
case 'http://activitystrea.ms/schema/1.0/post':
|
case 'http://activitystrea.ms/schema/1.0/post':
|
||||||
switch ($rr['object-type']){
|
switch ($rr['object-type']) {
|
||||||
case 'http://activitystrea.ms/schema/1.0/event':
|
case 'http://activitystrea.ms/schema/1.0/event':
|
||||||
$post_type = t('event');
|
$post_type = t('event');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$post_type = t('status');
|
$post_type = t('status');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ($rr['resource-id']){
|
if ($rr['resource-id']) {
|
||||||
$post_type = t('photo');
|
$post_type = t('photo');
|
||||||
$m=array(); preg_match("/\[url=([^]]*)\]/", $rr['body'], $m);
|
$m = array();
|
||||||
$rr['plink'] = $m[1];
|
preg_match("/\[url=([^]]*)\]/", $rr['body'], $m);
|
||||||
} else {
|
$rr['plink'] = $m[1];
|
||||||
$post_type = t('status');
|
} else {
|
||||||
}
|
$post_type = t('status');
|
||||||
}
|
}
|
||||||
$plink = '<a href="' . $rr['plink'] . '">' . $post_type . '</a>';
|
}
|
||||||
|
$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'][] = sprintf(t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl');
|
||||||
}
|
$tpl = get_markup_template('communityhome.tpl', 'addon/communityhome/');
|
||||||
|
$a->page['aside'] = replace_macros($tpl, $aside);
|
||||||
|
|
||||||
# $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl');
|
$o = '<h1>'.((x($a->config, 'sitename')) ? sprintf(t('Welcome to %s'), $a->config['sitename']) : '').'</h1>';
|
||||||
$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>';
|
if (file_exists('home.html')) {
|
||||||
|
$o = file_get_contents('home.html');
|
||||||
|
}
|
||||||
|
|
||||||
if(file_exists('home.html'))
|
if (get_config('communityhome', 'showcommunitystream') === true) {
|
||||||
$o = file_get_contents('home.html');
|
$oldset = get_config('system', 'community_page_style');
|
||||||
|
if ($oldset == CP_NO_COMMUNITY_PAGE) {
|
||||||
|
set_config('system', 'community_page_style', CP_USERS_ON_SERVER);
|
||||||
|
}
|
||||||
|
|
||||||
if (get_config('communityhome','showcommunitystream')===true){
|
$o .= community_content($a, 1);
|
||||||
$oldset = get_config('system','community_page_style');
|
|
||||||
if ($oldset == CP_NO_COMMUNITY_PAGE)
|
|
||||||
set_config('system','community_page_style', CP_USERS_ON_SERVER);
|
|
||||||
|
|
||||||
$o .= community_content($a,1);
|
if ($oldset == CP_NO_COMMUNITY_PAGE) {
|
||||||
|
set_config('system', 'community_page_style', $oldset);
|
||||||
if ($oldset == CP_NO_COMMUNITY_PAGE)
|
}
|
||||||
set_config('system','community_page_style', $oldset);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Login"] = "Identifica't";
|
$a->strings['Login'] = "Identifica't";
|
||||||
$a->strings["OpenID"] = "OpenID";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest users"] = "Últims usuaris";
|
$a->strings['Latest users'] = 'Últims usuaris';
|
||||||
$a->strings["Most active users"] = "Usuaris més actius";
|
$a->strings['Most active users'] = 'Usuaris més actius';
|
||||||
$a->strings["Latest photos"] = "Darreres fotos";
|
$a->strings['Latest photos'] = 'Darreres fotos';
|
||||||
$a->strings["Contact Photos"] = "Fotos de Contacte";
|
$a->strings['Contact Photos'] = 'Fotos de Contacte';
|
||||||
$a->strings["Profile Photos"] = "Fotos del Perfil";
|
$a->strings['Profile Photos'] = 'Fotos del Perfil';
|
||||||
$a->strings["Latest likes"] = "Darrers agrada";
|
$a->strings['Latest likes'] = 'Darrers agrada';
|
||||||
$a->strings["event"] = "esdeveniment";
|
$a->strings['event'] = 'esdeveniment';
|
||||||
$a->strings["status"] = "estatus";
|
$a->strings['status'] = 'estatus';
|
||||||
$a->strings["photo"] = "foto";
|
$a->strings['photo'] = 'foto';
|
||||||
$a->strings["Welcome to %s"] = "Benvingut a %s";
|
$a->strings['Welcome to %s'] = 'Benvingut a %s';
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
if (!function_exists('string_plural_select_cs')) {
|
||||||
function string_plural_select_cs($n){
|
function string_plural_select_cs($n)
|
||||||
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
{
|
||||||
}}
|
return ($n == 1) ? 0 : ($n >= 2 && $n <= 4) ? 1 : 2;
|
||||||
;
|
}
|
||||||
$a->strings["Login"] = "Přihlásit se";
|
}
|
||||||
$a->strings["OpenID"] = "OpenID";
|
|
||||||
$a->strings["Latest users"] = "Poslední uživatelé";
|
$a->strings['Login'] = 'Přihlásit se';
|
||||||
$a->strings["Most active users"] = "Nejaktivnější uživatelé";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest photos"] = "Poslední fotky";
|
$a->strings['Latest users'] = 'Poslední uživatelé';
|
||||||
$a->strings["Contact Photos"] = "Fotogalerie kontaktu";
|
$a->strings['Most active users'] = 'Nejaktivnější uživatelé';
|
||||||
$a->strings["Profile Photos"] = "Profilové fotografie";
|
$a->strings['Latest photos'] = 'Poslední fotky';
|
||||||
$a->strings["Latest likes"] = "Poslední \"líbí se mi\"";
|
$a->strings['Contact Photos'] = 'Fotogalerie kontaktu';
|
||||||
$a->strings["event"] = "událost";
|
$a->strings['Profile Photos'] = 'Profilové fotografie';
|
||||||
$a->strings["status"] = "Stav";
|
$a->strings['Latest likes'] = 'Poslední "líbí se mi"';
|
||||||
$a->strings["photo"] = "fotografie";
|
$a->strings['event'] = 'událost';
|
||||||
$a->strings["%1\$s likes %2\$s's %3\$s"] = "Uživateli %1\$s se líbí %3\$s uživatele %2\$s";
|
$a->strings['status'] = 'Stav';
|
||||||
$a->strings["Welcome to %s"] = "Vítá Vás %s";
|
$a->strings['photo'] = 'fotografie';
|
||||||
|
$a->strings["%1\$s likes %2\$s's %3\$s"] = 'Uživateli %1$s se líbí %3$s uživatele %2$s';
|
||||||
|
$a->strings['Welcome to %s'] = 'Vítá Vás %s';
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if (!function_exists('string_plural_select_de')) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Login"] = "Anmeldung";
|
}
|
||||||
$a->strings["OpenID"] = "OpenID";
|
|
||||||
$a->strings["Latest users"] = "Letzte Benutzer";
|
$a->strings['Login'] = 'Anmeldung';
|
||||||
$a->strings["Most active users"] = "Aktivste Nutzer";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest photos"] = "Neueste Fotos";
|
$a->strings['Latest users'] = 'Letzte Benutzer';
|
||||||
$a->strings["Contact Photos"] = "Kontaktbilder";
|
$a->strings['Most active users'] = 'Aktivste Nutzer';
|
||||||
$a->strings["Profile Photos"] = "Profilbilder";
|
$a->strings['Latest photos'] = 'Neueste Fotos';
|
||||||
$a->strings["Latest likes"] = "Neueste Favoriten";
|
$a->strings['Contact Photos'] = 'Kontaktbilder';
|
||||||
$a->strings["event"] = "Veranstaltung";
|
$a->strings['Profile Photos'] = 'Profilbilder';
|
||||||
$a->strings["status"] = "Status";
|
$a->strings['Latest likes'] = 'Neueste Favoriten';
|
||||||
$a->strings["photo"] = "Foto";
|
$a->strings['event'] = 'Veranstaltung';
|
||||||
|
$a->strings['status'] = 'Status';
|
||||||
|
$a->strings['photo'] = 'Foto';
|
||||||
$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s mag %2\$s's %3\$s";
|
$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s mag %2\$s's %3\$s";
|
||||||
$a->strings["Welcome to %s"] = "Willkommen zu %s";
|
$a->strings['Welcome to %s'] = 'Willkommen zu %s';
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Login"] = "Ensaluti";
|
$a->strings['Login'] = 'Ensaluti';
|
||||||
$a->strings["OpenID"] = "OpenID";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest users"] = "Ĵusaj uzantoj";
|
$a->strings['Latest users'] = 'Ĵusaj uzantoj';
|
||||||
$a->strings["Most active users"] = "Plej aktivaj uzantoj";
|
$a->strings['Most active users'] = 'Plej aktivaj uzantoj';
|
||||||
$a->strings["Latest photos"] = "Ĵusaj bildoj";
|
$a->strings['Latest photos'] = 'Ĵusaj bildoj';
|
||||||
$a->strings["Contact Photos"] = "Kontaktbildoj";
|
$a->strings['Contact Photos'] = 'Kontaktbildoj';
|
||||||
$a->strings["Profile Photos"] = "Profilbildoj";
|
$a->strings['Profile Photos'] = 'Profilbildoj';
|
||||||
$a->strings["Latest likes"] = "Ĵusaj ŝatitaĵoj";
|
$a->strings['Latest likes'] = 'Ĵusaj ŝatitaĵoj';
|
||||||
$a->strings["event"] = "okazo";
|
$a->strings['event'] = 'okazo';
|
||||||
$a->strings["status"] = "staton";
|
$a->strings['status'] = 'staton';
|
||||||
$a->strings["photo"] = "bildo";
|
$a->strings['photo'] = 'bildo';
|
||||||
$a->strings["Welcome to %s"] = "Bonvenon ĉe %s";
|
$a->strings['Welcome to %s'] = 'Bonvenon ĉe %s';
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Login"] = "Acceder";
|
$a->strings['Login'] = 'Acceder';
|
||||||
$a->strings["OpenID"] = "OpenID";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest users"] = "Últimos usuarios";
|
$a->strings['Latest users'] = 'Últimos usuarios';
|
||||||
$a->strings["Most active users"] = "Usuarios más activos";
|
$a->strings['Most active users'] = 'Usuarios más activos';
|
||||||
$a->strings["Latest photos"] = "Últimas fotos";
|
$a->strings['Latest photos'] = 'Últimas fotos';
|
||||||
$a->strings["Contact Photos"] = "Foto del contacto";
|
$a->strings['Contact Photos'] = 'Foto del contacto';
|
||||||
$a->strings["Profile Photos"] = "Foto del perfil";
|
$a->strings['Profile Photos'] = 'Foto del perfil';
|
||||||
$a->strings["Latest likes"] = "Últimos me gusta";
|
$a->strings['Latest likes'] = 'Últimos me gusta';
|
||||||
$a->strings["event"] = "evento";
|
$a->strings['event'] = 'evento';
|
||||||
$a->strings["status"] = "estado";
|
$a->strings['status'] = 'estado';
|
||||||
$a->strings["photo"] = "foto";
|
$a->strings['photo'] = 'foto';
|
||||||
$a->strings["Welcome to %s"] = "Bienvenido a %s";
|
$a->strings['Welcome to %s'] = 'Bienvenido a %s';
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fr")) {
|
if (!function_exists('string_plural_select_fr')) {
|
||||||
function string_plural_select_fr($n){
|
function string_plural_select_fr($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Login"] = "Identifiant";
|
}
|
||||||
$a->strings["OpenID"] = "OpenID";
|
|
||||||
$a->strings["Latest users"] = "Derniers utilisateurs";
|
$a->strings['Login'] = 'Identifiant';
|
||||||
$a->strings["Most active users"] = "Utilisateurs les plus actifs";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest photos"] = "Dernières photos";
|
$a->strings['Latest users'] = 'Derniers utilisateurs';
|
||||||
$a->strings["Contact Photos"] = "Photos du contact";
|
$a->strings['Most active users'] = 'Utilisateurs les plus actifs';
|
||||||
$a->strings["Profile Photos"] = "Photos de profil";
|
$a->strings['Latest photos'] = 'Dernières photos';
|
||||||
$a->strings["Latest likes"] = "Derniers likes";
|
$a->strings['Contact Photos'] = 'Photos du contact';
|
||||||
$a->strings["event"] = "événement";
|
$a->strings['Profile Photos'] = 'Photos de profil';
|
||||||
$a->strings["status"] = "statut";
|
$a->strings['Latest likes'] = 'Derniers likes';
|
||||||
$a->strings["photo"] = "photo";
|
$a->strings['event'] = 'événement';
|
||||||
$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s aime %3\$s de %2\$s";
|
$a->strings['status'] = 'statut';
|
||||||
$a->strings["Welcome to %s"] = "Bienvenue sur %s";
|
$a->strings['photo'] = 'photo';
|
||||||
|
$a->strings["%1\$s likes %2\$s's %3\$s"] = '%1$s aime %3$s de %2$s';
|
||||||
|
$a->strings['Welcome to %s'] = 'Bienvenue sur %s';
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Login"] = "Innskrá";
|
$a->strings['Login'] = 'Innskrá';
|
||||||
$a->strings["OpenID"] = "OpenID";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest users"] = "";
|
$a->strings['Latest users'] = '';
|
||||||
$a->strings["Most active users"] = "Ofvirkustu notendurnir";
|
$a->strings['Most active users'] = 'Ofvirkustu notendurnir';
|
||||||
$a->strings["Latest photos"] = "";
|
$a->strings['Latest photos'] = '';
|
||||||
$a->strings["Contact Photos"] = "Myndir tengiliðs";
|
$a->strings['Contact Photos'] = 'Myndir tengiliðs';
|
||||||
$a->strings["Profile Photos"] = "Forsíðu myndir";
|
$a->strings['Profile Photos'] = 'Forsíðu myndir';
|
||||||
$a->strings["Latest likes"] = "";
|
$a->strings['Latest likes'] = '';
|
||||||
$a->strings["event"] = "atburður";
|
$a->strings['event'] = 'atburður';
|
||||||
$a->strings["status"] = "staða";
|
$a->strings['status'] = 'staða';
|
||||||
$a->strings["photo"] = "mynd";
|
$a->strings['photo'] = 'mynd';
|
||||||
$a->strings["Welcome to %s"] = "Velkomin(n) til %s";
|
$a->strings['Welcome to %s'] = 'Velkomin(n) til %s';
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if (!function_exists('string_plural_select_it')) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n)
|
||||||
return ($n != 1);;
|
{
|
||||||
}}
|
return $n != 1;
|
||||||
;
|
}
|
||||||
$a->strings["Login"] = "Accedi";
|
}
|
||||||
$a->strings["OpenID"] = "OpenID";
|
|
||||||
$a->strings["Latest users"] = "Ultimi utenti";
|
$a->strings['Login'] = 'Accedi';
|
||||||
$a->strings["Most active users"] = "Utenti più attivi";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest photos"] = "Ultime foto";
|
$a->strings['Latest users'] = 'Ultimi utenti';
|
||||||
$a->strings["Contact Photos"] = "Foto dei contatti";
|
$a->strings['Most active users'] = 'Utenti più attivi';
|
||||||
$a->strings["Profile Photos"] = "Foto del profilo";
|
$a->strings['Latest photos'] = 'Ultime foto';
|
||||||
$a->strings["Latest likes"] = "Ultimi \"mi piace\"";
|
$a->strings['Contact Photos'] = 'Foto dei contatti';
|
||||||
$a->strings["event"] = "l'evento";
|
$a->strings['Profile Photos'] = 'Foto del profilo';
|
||||||
$a->strings["status"] = "lo stato";
|
$a->strings['Latest likes'] = 'Ultimi "mi piace"';
|
||||||
$a->strings["photo"] = "la foto";
|
$a->strings['event'] = "l'evento";
|
||||||
$a->strings["%1\$s likes %2\$s's %3\$s"] = "a %1\$s piace %2\$s di %3\$s";
|
$a->strings['status'] = 'lo stato';
|
||||||
$a->strings["Welcome to %s"] = "Benvenuto su %s";
|
$a->strings['photo'] = 'la foto';
|
||||||
|
$a->strings["%1\$s likes %2\$s's %3\$s"] = 'a %1$s piace %2$s di %3$s';
|
||||||
|
$a->strings['Welcome to %s'] = 'Benvenuto su %s';
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Login"] = "Logg inn";
|
$a->strings['Login'] = 'Logg inn';
|
||||||
$a->strings["OpenID"] = "";
|
$a->strings['OpenID'] = '';
|
||||||
$a->strings["Latest users"] = "";
|
$a->strings['Latest users'] = '';
|
||||||
$a->strings["Most active users"] = "";
|
$a->strings['Most active users'] = '';
|
||||||
$a->strings["Latest photos"] = "";
|
$a->strings['Latest photos'] = '';
|
||||||
$a->strings["Contact Photos"] = "Kontaktbilder";
|
$a->strings['Contact Photos'] = 'Kontaktbilder';
|
||||||
$a->strings["Profile Photos"] = "Profilbilder";
|
$a->strings['Profile Photos'] = 'Profilbilder';
|
||||||
$a->strings["Latest likes"] = "";
|
$a->strings['Latest likes'] = '';
|
||||||
$a->strings["event"] = "hendelse";
|
$a->strings['event'] = 'hendelse';
|
||||||
$a->strings["status"] = "status";
|
$a->strings['status'] = 'status';
|
||||||
$a->strings["photo"] = "bilde";
|
$a->strings['photo'] = 'bilde';
|
||||||
$a->strings["Welcome to %s"] = "Velkommen til %s";
|
$a->strings['Welcome to %s'] = 'Velkommen til %s';
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$a->strings["Login"] = "Login";
|
$a->strings['Login'] = 'Login';
|
||||||
$a->strings["OpenID"] = "OpenID";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest users"] = "Ostatni użytkownicy";
|
$a->strings['Latest users'] = 'Ostatni użytkownicy';
|
||||||
$a->strings["Most active users"] = "najaktywniejsi użytkownicy";
|
$a->strings['Most active users'] = 'najaktywniejsi użytkownicy';
|
||||||
$a->strings["Latest photos"] = "Ostatnie zdjęcia";
|
$a->strings['Latest photos'] = 'Ostatnie zdjęcia';
|
||||||
$a->strings["Contact Photos"] = "Zdjęcia kontaktu";
|
$a->strings['Contact Photos'] = 'Zdjęcia kontaktu';
|
||||||
$a->strings["Profile Photos"] = "Zdjęcia profilowe";
|
$a->strings['Profile Photos'] = 'Zdjęcia profilowe';
|
||||||
$a->strings["Latest likes"] = "Ostatnie polubienia";
|
$a->strings['Latest likes'] = 'Ostatnie polubienia';
|
||||||
$a->strings["event"] = "wydarzenie";
|
$a->strings['event'] = 'wydarzenie';
|
||||||
$a->strings["status"] = "status";
|
$a->strings['status'] = 'status';
|
||||||
$a->strings["photo"] = "zdjęcie";
|
$a->strings['photo'] = 'zdjęcie';
|
||||||
$a->strings["Welcome to %s"] = "Witamy w %s";
|
$a->strings['Welcome to %s'] = 'Witamy w %s';
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_pt_br")) {
|
if (!function_exists('string_plural_select_pt_br')) {
|
||||||
function string_plural_select_pt_br($n){
|
function string_plural_select_pt_br($n)
|
||||||
return ($n > 1);;
|
{
|
||||||
}}
|
return $n > 1;
|
||||||
;
|
}
|
||||||
$a->strings["Login"] = "Entrar";
|
}
|
||||||
$a->strings["OpenID"] = "OpenID";
|
|
||||||
$a->strings["Latest users"] = "Usuários mais recentes";
|
$a->strings['Login'] = 'Entrar';
|
||||||
$a->strings["Most active users"] = "Usuários mais ativos";
|
$a->strings['OpenID'] = 'OpenID';
|
||||||
$a->strings["Latest photos"] = "Fotos mais recentes";
|
$a->strings['Latest users'] = 'Usuários mais recentes';
|
||||||
$a->strings["Contact Photos"] = "Fotos dos Contatos";
|
$a->strings['Most active users'] = 'Usuários mais ativos';
|
||||||
$a->strings["Profile Photos"] = "Fotos do Perfil";
|
$a->strings['Latest photos'] = 'Fotos mais recentes';
|
||||||
$a->strings["Latest likes"] = "Curtidas recentes";
|
$a->strings['Contact Photos'] = 'Fotos dos Contatos';
|
||||||
$a->strings["event"] = "evento";
|
$a->strings['Profile Photos'] = 'Fotos do Perfil';
|
||||||
$a->strings["status"] = "status";
|
$a->strings['Latest likes'] = 'Curtidas recentes';
|
||||||
$a->strings["photo"] = "foto";
|
$a->strings['event'] = 'evento';
|
||||||
$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s curtiu %2\$s que publicou %3\$s";
|
$a->strings['status'] = 'status';
|
||||||
$a->strings["Welcome to %s"] = "Bem-vindo a %s";
|
$a->strings['photo'] = 'foto';
|
||||||
|
$a->strings["%1\$s likes %2\$s's %3\$s"] = '%1$s curtiu %2$s que publicou %3$s';
|
||||||
|
$a->strings['Welcome to %s'] = 'Bem-vindo a %s';
|
||||||
|
|
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