Merge pull request #346 from annando/1603-remove-unsupported

Removed addons that are unsupported for a long time
pull/347/head
Tobias Diekershoff 2016-03-14 14:36:56 +01:00
commit 4b47bcc884
72 changed files with 0 additions and 2369 deletions

View File

@ -1,14 +0,0 @@
#altpager-label {
float: left;
width: 200px;
margin-bottom: 25px;
}
#altpager {
float: left;
}

View File

@ -1,108 +0,0 @@
<?php
/**
* Name: Alternate Pagination
* Description: Change pagination from using explicit page numbers to simple "newer" and "older" page links. This will speed up page load times.
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Status: Unsupported
*/
function altpager_install() {
register_hook('plugin_settings', 'addon/altpager/altpager.php', 'altpager_settings');
register_hook('plugin_settings_post', 'addon/altpager/altpager.php', 'altpager_settings_post');
logger("installed altpager");
}
function altpager_uninstall() {
unregister_hook('plugin_settings', 'addon/altpager/altpager.php', 'altpager_settings');
unregister_hook('plugin_settings_post', 'addon/altpager/altpager.php', 'altpager_settings_post');
logger("removed altpager");
}
/**
*
* Callback from the settings post function.
* $post contains the $_POST array.
* We will make sure we've got a valid user account
* and if so set our configuration setting for this person.
*
*/
function altpager_settings_post($a,$post) {
if(! local_user() || (! x($_POST,'altpager-submit')))
return;
set_pconfig(local_user(),'system','alt_pager',intval($_POST['altpager']));
info( t('Altpager settings updated.') . EOL);
}
/**
*
* Called from the Plugin Setting form.
* Add our own settings info to the page.
*
*/
function altpager_settings(&$a,&$s) {
if(! local_user())
return;
$global = get_config("alt_pager", "global");
if($global == 1)
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/altpager/altpager.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */
$altpager = get_pconfig(local_user(),'system','alt_pager');
if($altpager === false)
$altpager = 0;
$checked = (($altpager) ? ' checked="checked" ' : '');
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('Alternate Pagination Setting') . '</h3>';
$s .= '<div id="altpager-wrapper">';
$s .= '<label id="altpager-label" for="altpager">' . t('Use links to "newer" and "older" pages in place of page numbers?') . '</label>';
$s .= '<input id="altpager-input" type="checkbox" name="altpager" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="altpager-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
}
function altpager_plugin_admin(&$a, &$o){
$t = get_markup_template( "admin.tpl", "addon/altpager/" );
$o = replace_macros($t, array(
'$submit' => t('Save Settings'),
'$global' => array('altpagerchoice', t('Global'), 1, t('Force global use of the alternate pager'), get_config('alt_pager', 'global') == 1),
'$individual' => array('altpagerchoice', t('Individual'), 2, t('Each user chooses whether to use the alternate pager'), get_config('alt_pager', 'global') == 0)
));
}
function altpager_plugin_admin_post(&$a){
$choice = ((x($_POST,'altpagerchoice')) ? notags(trim($_POST['altpagerchoice'])) : '');
set_config('alt_pager','global',($choice == 1 ? 1 : 0));
info( t('Settings updated.'). EOL );
}

View File

@ -1,54 +0,0 @@
# ADDON altpager
# Copyright (C)
# This file is distributed under the same license as the Friendica altpager addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: altpager.php:46
msgid "Altpager settings updated."
msgstr ""
#: altpager.php:83
msgid "Alternate Pagination Setting"
msgstr ""
#: altpager.php:85
msgid "Use links to \"newer\" and \"older\" pages in place of page numbers?"
msgstr ""
#: altpager.php:91 altpager.php:98
msgid "Submit"
msgstr ""
#: altpager.php:99
msgid "Global"
msgstr ""
#: altpager.php:99
msgid "Force global use of the alternate pager"
msgstr ""
#: altpager.php:100
msgid "Individual"
msgstr ""
#: altpager.php:100
msgid "Each user chooses whether to use the alternate pager"
msgstr ""
#: altpager.php:107
msgid "Settings updated."
msgstr ""

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Altpager settings updated."] = "Ajustos de Altpagerr actualitzats.";
$a->strings["Alternate Pagination Setting"] = "Alternate Pagination Setting";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "Emprar enllaç a \"més nova\" i \"més antiga\" pàgina, en lloc de números de pàgina? ";
$a->strings["Submit"] = "Enviar";
$a->strings["Global"] = "";
$a->strings["Force global use of the alternate pager"] = "";
$a->strings["Individual"] = "";
$a->strings["Each user chooses whether to use the alternate pager"] = "";
$a->strings["Settings updated."] = "Ajustos actualitzats.";

View File

@ -1,56 +0,0 @@
# ADDON altpager
# Copyright (C)
# This file is distributed under the same license as the Friendica altpager addon package.
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-07-02 15:15+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: altpager.php:46
msgid "Altpager settings updated."
msgstr "Nastavení Altpager aktualizováno."
#: altpager.php:83
msgid "Alternate Pagination Setting"
msgstr "Alternate Pagination nastavení"
#: altpager.php:85
msgid "Use links to \"newer\" and \"older\" pages in place of page numbers?"
msgstr "Použít odkazy na \"novější\" a \"starší\" stránky místo čísel stránek?"
#: altpager.php:91 altpager.php:98
msgid "Submit"
msgstr "Odeslat"
#: altpager.php:99
msgid "Global"
msgstr "Globální"
#: altpager.php:99
msgid "Force global use of the alternate pager"
msgstr "Vynutit globální použití alternativního stránkování"
#: altpager.php:100
msgid "Individual"
msgstr "Individuálové"
#: altpager.php:100
msgid "Each user chooses whether to use the alternate pager"
msgstr "Každý uživatel si vybere, zda-li použije alternativní stránkování."
#: altpager.php:107
msgid "Settings updated."
msgstr "Nastavení aktualizováno."

View File

@ -1,16 +0,0 @@
<?php
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
}}
;
$a->strings["Altpager settings updated."] = "Nastavení Altpager aktualizováno.";
$a->strings["Alternate Pagination Setting"] = "Alternate Pagination nastavení";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "Použít odkazy na \"novější\" a \"starší\" stránky místo čísel stránek?";
$a->strings["Submit"] = "Odeslat";
$a->strings["Global"] = "Globální";
$a->strings["Force global use of the alternate pager"] = "Vynutit globální použití alternativního stránkování";
$a->strings["Individual"] = "Individuálové";
$a->strings["Each user chooses whether to use the alternate pager"] = "Každý uživatel si vybere, zda-li použije alternativní stránkování.";
$a->strings["Settings updated."] = "Nastavení aktualizováno.";

View File

@ -1,56 +0,0 @@
# ADDON altpager
# Copyright (C)
# This file is distributed under the same license as the Friendica altpager addon package.
#
#
# Translators:
# bavatar <tobias.diekershoff@gmx.net>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-06-24 04:36+0000\n"
"Last-Translator: bavatar <tobias.diekershoff@gmx.net>\n"
"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: altpager.php:46
msgid "Altpager settings updated."
msgstr "Altpager Einstellungen wurden aktualisiert."
#: altpager.php:83
msgid "Alternate Pagination Setting"
msgstr "Alternative Seitenumbruch Einstellung"
#: altpager.php:85
msgid "Use links to \"newer\" and \"older\" pages in place of page numbers?"
msgstr "Nutze Links zu \"neuer\" und \"älter\" Seiten, statt Seiten Nummern?"
#: altpager.php:91 altpager.php:98
msgid "Submit"
msgstr "Senden"
#: altpager.php:99
msgid "Global"
msgstr "Global"
#: altpager.php:99
msgid "Force global use of the alternate pager"
msgstr "Erzwinge die Verwendung des \"Alternate Pager\" auf diesem Server"
#: altpager.php:100
msgid "Individual"
msgstr "Individuell"
#: altpager.php:100
msgid "Each user chooses whether to use the alternate pager"
msgstr "Jede/r Nutzer/in kann wählen ob der \"Alternate Pager\" verwendet werden soll"
#: altpager.php:107
msgid "Settings updated."
msgstr "Einstellungen gespeichert."

View File

@ -1,16 +0,0 @@
<?php
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
return ($n != 1);;
}}
;
$a->strings["Altpager settings updated."] = "Altpager Einstellungen wurden aktualisiert.";
$a->strings["Alternate Pagination Setting"] = "Alternative Seitenumbruch Einstellung";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "Nutze Links zu \"neuer\" und \"älter\" Seiten, statt Seiten Nummern?";
$a->strings["Submit"] = "Senden";
$a->strings["Global"] = "Global";
$a->strings["Force global use of the alternate pager"] = "Erzwinge die Verwendung des \"Alternate Pager\" auf diesem Server";
$a->strings["Individual"] = "Individuell";
$a->strings["Each user chooses whether to use the alternate pager"] = "Jede/r Nutzer/in kann wählen ob der \"Alternate Pager\" verwendet werden soll";
$a->strings["Settings updated."] = "Einstellungen gespeichert.";

View File

@ -1,7 +0,0 @@
<?php
$a->strings["Altpager settings updated."] = "Ĝisdatigis Altpager agordojn.";
$a->strings["Alternate Pagination Setting"] = "Alternativa paĝonumerado agordoj";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "Uzi ligilojn al \"pli nova\" kaj \"pli malnova\" paĝoj anstataŭ paĝnombrojn?";
$a->strings["Submit"] = "Sendi";
$a->strings["Settings updated."] = "Agordoj ĝisdatigita.";

View File

@ -1,9 +0,0 @@
<?php
$a->strings["Altpager settings updated."] = "Configuración de paginador alternativo actualizada.";
$a->strings["Alternate Pagination Setting"] = "Configuración de paginación alternativa";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "¿Usar \"más nuevo\" y \"más antiguo\" en vez de números en las páginas?";
$a->strings["Submit"] = "Envíar";
$a->strings["Global"] = "";
$a->strings["Individual"] = "";
$a->strings["Settings updated."] = "Configuración actualizada.";

View File

@ -1,57 +0,0 @@
# ADDON altpager
# Copyright (C)
# This file is distributed under the same license as the Friendica altpager addon package.
#
#
# Translators:
# Cyboulette <cyboulette58@hotmail.fr>, 2014
# Jak <jacques@riseup.net>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-12-09 10:57+0000\n"
"Last-Translator: Jak <jacques@riseup.net>\n"
"Language-Team: French (http://www.transifex.com/projects/p/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: altpager.php:46
msgid "Altpager settings updated."
msgstr "Les paramètres d'Altpager ont été mis à jour"
#: altpager.php:83
msgid "Alternate Pagination Setting"
msgstr "Paramètre de pagination"
#: altpager.php:85
msgid "Use links to \"newer\" and \"older\" pages in place of page numbers?"
msgstr "Utiliser les liens \"plus récent\" et \"plus ancien\" à la place de la numérotation des pages ?"
#: altpager.php:91 altpager.php:98
msgid "Submit"
msgstr "Valider"
#: altpager.php:99
msgid "Global"
msgstr "Global"
#: altpager.php:99
msgid "Force global use of the alternate pager"
msgstr "Forcer l'utilisation globale des pages alternatives"
#: altpager.php:100
msgid "Individual"
msgstr "Individuel"
#: altpager.php:100
msgid "Each user chooses whether to use the alternate pager"
msgstr "Chaque utilisateur choisi d'utiliser ou non les pages alternatives"
#: altpager.php:107
msgid "Settings updated."
msgstr "Paramètres sauvegardés"

View File

@ -1,16 +0,0 @@
<?php
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
return ($n > 1);;
}}
;
$a->strings["Altpager settings updated."] = "Les paramètres d'Altpager ont été mis à jour";
$a->strings["Alternate Pagination Setting"] = "Paramètre de pagination";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "Utiliser les liens \"plus récent\" et \"plus ancien\" à la place de la numérotation des pages ?";
$a->strings["Submit"] = "Valider";
$a->strings["Global"] = "Global";
$a->strings["Force global use of the alternate pager"] = "Forcer l'utilisation globale des pages alternatives";
$a->strings["Individual"] = "Individuel";
$a->strings["Each user chooses whether to use the alternate pager"] = "Chaque utilisateur choisi d'utiliser ou non les pages alternatives";
$a->strings["Settings updated."] = "Paramètres sauvegardés";

View File

@ -1,7 +0,0 @@
<?php
$a->strings["Altpager settings updated."] = "";
$a->strings["Alternate Pagination Setting"] = "";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "";
$a->strings["Submit"] = "Senda inn";
$a->strings["Settings updated."] = "Stillingar uppfærðar";

View File

@ -1,56 +0,0 @@
# ADDON altpager
# Copyright (C)
# This file is distributed under the same license as the Friendica altpager addon package.
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-09-10 10:12+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: altpager.php:46
msgid "Altpager settings updated."
msgstr "Impostazioni Altpager aggiornate."
#: altpager.php:83
msgid "Alternate Pagination Setting"
msgstr "Impostazioni Paginatore Alternativo"
#: altpager.php:85
msgid "Use links to \"newer\" and \"older\" pages in place of page numbers?"
msgstr "Usa i collegamenti \"nuovi\" e \"vecchi\" al posto dei numeri di pagina?"
#: altpager.php:91 altpager.php:98
msgid "Submit"
msgstr "Invia"
#: altpager.php:99
msgid "Global"
msgstr "Globale"
#: altpager.php:99
msgid "Force global use of the alternate pager"
msgstr "Forza l'uso del paginatore alternativo globalmente"
#: altpager.php:100
msgid "Individual"
msgstr "Individuale"
#: altpager.php:100
msgid "Each user chooses whether to use the alternate pager"
msgstr "Ogni utente può decidere se usare il paginatore alternativo"
#: altpager.php:107
msgid "Settings updated."
msgstr "Impostazioni aggiornate."

View File

@ -1,16 +0,0 @@
<?php
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
return ($n != 1);;
}}
;
$a->strings["Altpager settings updated."] = "Impostazioni Altpager aggiornate.";
$a->strings["Alternate Pagination Setting"] = "Impostazioni Paginatore Alternativo";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "Usa i collegamenti \"nuovi\" e \"vecchi\" al posto dei numeri di pagina?";
$a->strings["Submit"] = "Invia";
$a->strings["Global"] = "Globale";
$a->strings["Force global use of the alternate pager"] = "Forza l'uso del paginatore alternativo globalmente";
$a->strings["Individual"] = "Individuale";
$a->strings["Each user chooses whether to use the alternate pager"] = "Ogni utente può decidere se usare il paginatore alternativo";
$a->strings["Settings updated."] = "Impostazioni aggiornate.";

View File

@ -1,9 +0,0 @@
<?php
$a->strings["Altpager settings updated."] = "";
$a->strings["Alternate Pagination Setting"] = "";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "";
$a->strings["Submit"] = "Lagre";
$a->strings["Global"] = "";
$a->strings["Individual"] = "";
$a->strings["Settings updated."] = "Innstillinger oppdatert.";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Altpager settings updated."] = "";
$a->strings["Alternate Pagination Setting"] = "";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "";
$a->strings["Submit"] = "Potwierdź";
$a->strings["Global"] = "Ogólne";
$a->strings["Force global use of the alternate pager"] = "";
$a->strings["Individual"] = "Indywidualne";
$a->strings["Each user chooses whether to use the alternate pager"] = "";
$a->strings["Settings updated."] = "Zaktualizowano ustawienia.";

View File

@ -1,56 +0,0 @@
# ADDON altpager
# Copyright (C)
# This file is distributed under the same license as the Friendica altpager addon package.
#
#
# Translators:
# Sérgio Lima <oigreslima@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-06-23 16:15+0000\n"
"Last-Translator: Sérgio Lima <oigreslima@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/friendica/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: altpager.php:46
msgid "Altpager settings updated."
msgstr "Configurações de paginações atualizada."
#: altpager.php:83
msgid "Alternate Pagination Setting"
msgstr "Configurações de Paginação alternativa"
#: altpager.php:85
msgid "Use links to \"newer\" and \"older\" pages in place of page numbers?"
msgstr "Usar links para \"Mais recentes\" e \"Mais antigos\" no lugar do número de páginas?"
#: altpager.php:91 altpager.php:98
msgid "Submit"
msgstr "Enviar"
#: altpager.php:99
msgid "Global"
msgstr "Global"
#: altpager.php:99
msgid "Force global use of the alternate pager"
msgstr "Força uso global da paginação alternativa"
#: altpager.php:100
msgid "Individual"
msgstr "Individual"
#: altpager.php:100
msgid "Each user chooses whether to use the alternate pager"
msgstr "Cada usuário escolhe se usa a paginação alternativa"
#: altpager.php:107
msgid "Settings updated."
msgstr "Configurações atualizadas."

View File

@ -1,16 +0,0 @@
<?php
if(! function_exists("string_plural_select_pt_br")) {
function string_plural_select_pt_br($n){
return ($n > 1);;
}}
;
$a->strings["Altpager settings updated."] = "Configurações de paginações atualizada.";
$a->strings["Alternate Pagination Setting"] = "Configurações de Paginação alternativa";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "Usar links para \"Mais recentes\" e \"Mais antigos\" no lugar do número de páginas?";
$a->strings["Submit"] = "Enviar";
$a->strings["Global"] = "Global";
$a->strings["Force global use of the alternate pager"] = "Força uso global da paginação alternativa";
$a->strings["Individual"] = "Individual";
$a->strings["Each user chooses whether to use the alternate pager"] = "Cada usuário escolhe se usa a paginação alternativa";
$a->strings["Settings updated."] = "Configurações atualizadas.";

View File

@ -1,55 +0,0 @@
# ADDON altpager
# Copyright (C)
# This file is distributed under the same license as the Friendica altpager addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-07-08 11:39+0000\n"
"Last-Translator: Arian - Cazare Muncitori <arianserv@gmail.com>\n"
"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ro_RO\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
#: altpager.php:46
msgid "Altpager settings updated."
msgstr "Configurările Altpager au fost actualizate."
#: altpager.php:83
msgid "Alternate Pagination Setting"
msgstr "Configurare Paginație Alternantă"
#: altpager.php:85
msgid "Use links to \"newer\" and \"older\" pages in place of page numbers?"
msgstr "Se utilizează legături pentru paginile \"mai noi\" şi \"mai vechi\", în locul de numerelor de pagină?"
#: altpager.php:91 altpager.php:98
msgid "Submit"
msgstr "Trimite"
#: altpager.php:99
msgid "Global"
msgstr "Global"
#: altpager.php:99
msgid "Force global use of the alternate pager"
msgstr "Se forțează utilizarea globală a paginatorului alternant"
#: altpager.php:100
msgid "Individual"
msgstr "Individual"
#: altpager.php:100
msgid "Each user chooses whether to use the alternate pager"
msgstr "Fiecare utilizator alege dacă va utiliza paginatorul alternant"
#: altpager.php:107
msgid "Settings updated."
msgstr "Configurări actualizate."

View File

@ -1,16 +0,0 @@
<?php
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
}}
;
$a->strings["Altpager settings updated."] = "Configurările Altpager au fost actualizate.";
$a->strings["Alternate Pagination Setting"] = "Configurare Paginație Alternantă";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "Se utilizează legături pentru paginile \"mai noi\" şi \"mai vechi\", în locul de numerelor de pagină?";
$a->strings["Submit"] = "Trimite";
$a->strings["Global"] = "Global";
$a->strings["Force global use of the alternate pager"] = "Se forțează utilizarea globală a paginatorului alternant";
$a->strings["Individual"] = "Individual";
$a->strings["Each user chooses whether to use the alternate pager"] = "Fiecare utilizator alege dacă va utiliza paginatorul alternant";
$a->strings["Settings updated."] = "Configurări actualizate.";

View File

@ -1,9 +0,0 @@
<?php
$a->strings["Altpager settings updated."] = "";
$a->strings["Alternate Pagination Setting"] = "";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "";
$a->strings["Submit"] = "Подтвердить";
$a->strings["Global"] = "";
$a->strings["Individual"] = "";
$a->strings["Settings updated."] = "Настройки обновлены.";

View File

@ -1,4 +0,0 @@
<?php
$a->strings["Submit"] = "Spara";
$a->strings["Settings updated."] = "Inst&auml;llningarna har uppdaterats.";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Altpager settings updated."] = "Altpager设置更新了。";
$a->strings["Alternate Pagination Setting"] = "供替换的分页设置";
$a->strings["Use links to \"newer\" and \"older\" pages in place of page numbers?"] = "用到「更新」和「更旧」页代替页数?";
$a->strings["Submit"] = "提交";
$a->strings["Global"] = "综合";
$a->strings["Force global use of the alternate pager"] = "让大家用供替换的分页";
$a->strings["Individual"] = "一个人的";
$a->strings["Each user chooses whether to use the alternate pager"] = "每用户选择是否用供替换的分页";
$a->strings["Settings updated."] = "设置跟新了";

View File

@ -1,3 +0,0 @@
{{include file="field_radio.tpl" field=$global}}
{{include file="field_radio.tpl" field=$individual}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

View File

@ -1,15 +0,0 @@
#appnetpost-enable-label, #appnetpost-bydefault-label {
float: left;
width: 200px;
margin-top: 10px;
}
#appnetpost-checkbox, #appnetpost-bydefault {
float: left;
margin-top: 10px;
}
#appnetpost-submit {
margin-top: 15px;
}

View File

@ -1,334 +0,0 @@
<?php
/**
* Name: App.net Post
* Description: Posts to app.net with the help of ifttt.com
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
* Status: Unsupported
*/
function appnetpost_install() {
register_hook('post_local', 'addon/appnetpost/appnetpost.php', 'appnetpost_post_local');
register_hook('notifier_normal', 'addon/appnetpost/appnetpost.php', 'appnetpost_send');
register_hook('jot_networks', 'addon/appnetpost/appnetpost.php', 'appnetpost_jot_nets');
register_hook('connector_settings', 'addon/appnetpost/appnetpost.php', 'appnetpost_settings');
register_hook('connector_settings_post', 'addon/appnetpost/appnetpost.php', 'appnetpost_settings_post');
}
function appnetpost_uninstall() {
unregister_hook('post_local', 'addon/appnetpost/appnetpost.php', 'appnetpost_post_local');
unregister_hook('notifier_normal', 'addon/appnetpost/appnetpost.php', 'appnetpost_send');
unregister_hook('jot_networks', 'addon/appnetpost/appnetpost.php', 'appnetpost_jot_nets');
unregister_hook('connector_settings', 'addon/appnetpost/appnetpost.php', 'appnetpost_settings');
unregister_hook('connector_settings_post', 'addon/appnetpost/appnetpost.php', 'appnetpost_settings_post');
}
function appnetpost_jot_nets(&$a,&$b) {
if(! local_user())
return;
$post = get_pconfig(local_user(),'appnetpost','post');
if(intval($post) == 1) {
$defpost = get_pconfig(local_user(),'appnetpost','post_by_default');
$selected = ((intval($defpost) == 1) ? ' checked="checked" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="appnetpost_enable"' . $selected . ' value="1" /> '
. t('Post to app.net') . '</div>';
}
}
function appnetpost_settings(&$a,&$s) {
if(! local_user())
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/appnetpost/appnetpost.css' . '" media="all" />' . "\r\n";
$enabled = get_pconfig(local_user(),'appnetpost','post');
$checked = (($enabled) ? ' checked="checked" ' : '');
$css = (($enabled) ? '' : '-disabled');
$def_enabled = get_pconfig(local_user(),'appnetpost','post_by_default');
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
$s .= '<span id="settings_appnetpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_appnetpost_expanded\'); openClose(\'settings_appnetpost_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/appnet.png" /><h3 class="connector">'. t('App.net Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_appnetpost_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_appnetpost_expanded\'); openClose(\'settings_appnetpost_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/appnet.png" /><h3 class="connector">'. t('App.net Export').'</h3>';
$s .= '</span>';
$s .= '<div id="appnetpost-enable-wrapper">';
$s .= '<label id="appnetpost-enable-label" for="appnetpost-checkbox">' . t('Enable App.net Post Plugin') . '</label>';
$s .= '<input id="appnetpost-checkbox" type="checkbox" name="appnetpost" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="appnetpost-bydefault-wrapper">';
$s .= '<label id="appnetpost-bydefault-label" for="appnetpost-bydefault">' . t('Post to App.net by default') . '</label>';
$s .= '<input id="appnetpost-bydefault" type="checkbox" name="appnetpost_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="appnetpost-submit" name="appnetpost-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div>';
$s .= '<p>Register an account at <a href="https://ifttt.com">IFTTT</a> and create a recipe with the following values:';
$s .= '<ul><li>If: New feed item (via RSS)</li>';
$s .= '<li>Then: Post an update (via app.net)</li>';
$s .= '<li>Feed URL: '.$a->get_baseurl().'/appnetpost/'.urlencode($a->user["nickname"]).'</li>';
$s .= '<li>Message: {{EntryContent}}</li>';
$s .= '<li>Original URL: {{EntryUrl}}</li></ul></div>';
}
function appnetpost_settings_post(&$a,&$b) {
if(x($_POST,'appnetpost-submit')) {
set_pconfig(local_user(),'appnetpost','post',intval($_POST['appnetpost']));
set_pconfig(local_user(),'appnetpost','post_by_default',intval($_POST['appnetpost_bydefault']));
}
}
function appnetpost_post_local(&$a,&$b) {
if($b['edit'])
return;
if((! local_user()) || (local_user() != $b['uid']))
return;
if($b['private'] || $b['parent'])
return;
$post = intval(get_pconfig(local_user(),'appnetpost','post'));
$enable = (($post && x($_REQUEST,'appnetpost_enable')) ? intval($_REQUEST['appnetpost_enable']) : 0);
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'appnetpost','post_by_default')))
$enable = 1;
if(!$enable)
return;
if(strlen($b['postopts']))
$b['postopts'] .= ',';
$b['postopts'] .= 'gplus';
}
function appnetpost_send(&$a,&$b) {
logger('appnetpost_send: invoked for post '.$b['id']." ".$b['app']);
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
return;
if(! strstr($b['postopts'],'gplus'))
return;
if($b['parent'] != $b['id'])
return;
$itemlist = get_pconfig($b["uid"],'appnetpost','itemlist');
$items = explode(",", $itemlist);
$i = 0;
$newitems = array($b['id']);
foreach ($items AS $item)
if ($i++ < 9)
$newitems[] = $item;
$itemlist = implode(",", $newitems);
logger('appnetpost_send: new itemlist: '.$itemlist." for uid ".$b["uid"]);
set_pconfig($b["uid"],'appnetpost','itemlist', $itemlist);
}
function appnetpost_module() {}
function appnetpost_init() {
global $a, $_SERVER;
$uid = 0;
if (isset($a->argv[1])) {
$uid = (int)$a->argv[1];
if ($uid == 0) {
$contacts = q("SELECT `username`, `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1", dbesc($a->argv[1]));
if ($contacts) {
$uid = $contacts[0]["uid"];
$nick = $a->argv[1];
}
} else {
$contacts = q("SELECT `username` FROM `user` WHERE `uid`=%d LIMIT 1", intval($uid));
$nick = $uid;
}
}
header("content-type: application/atom+xml");
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
echo '<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">'."\n";
echo "\t".'<title type="html"><![CDATA['.$a->config['sitename'].']]></title>'."\n";
if ($uid != 0) {
echo "\t".'<subtitle type="html"><![CDATA['.$contacts[0]["username"]."]]></subtitle>\n";
echo "\t".'<link rel="self" href="'.$a->get_baseurl().'/appnetpost/'.$nick.'"/>'."\n";
} else
echo "\t".'<link rel="self" href="'.$a->get_baseurl().'/appnetpost"/>'."\n";
echo "\t<id>".$a->get_baseurl()."/</id>\n";
echo "\t".'<link rel="alternate" type="text/html" href="'.$a->get_baseurl().'"/>'."\n";
echo "\t<updated>".date("c")."</updated>\n"; // To-Do
// <rights>Copyright ... </rights>
echo "\t".'<generator uri="'.$a->get_baseurl().'">'.$a->config['sitename'].'</generator>'."\n";
if ($uid != 0) {
$itemlist = get_pconfig($uid,'appnetpost','itemlist');
$items = explode(",", $itemlist);
foreach ($items AS $item)
appnetpost_feeditem($item, $uid);
} else {
$items = q("SELECT `id` FROM `item` FORCE INDEX (`received`) WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `item`.`id` = `item`.`parent` ORDER BY `received` DESC LIMIT 10");
foreach ($items AS $item)
appnetpost_feeditem($item["id"], $uid);
}
echo "</feed>\n";
killme();
}
function appnetpost_feeditem($pid, $uid) {
global $a;
require_once('include/bbcode.php');
require_once("include/html2plain.php");
require_once("include/network.php");
$items = q("SELECT `uri`, `plink`, `author-link`, `author-name`, `created`, `edited`, `id`, `title`, `body` from `item` WHERE id=%d", intval($pid));
foreach ($items AS $item) {
$item['body'] = bb_CleanPictureLinks($item['body']);
// Looking for the first image
$image = '';
if(preg_match("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/is",$item['body'],$matches))
$image = $matches[3];
if ($image == '')
if(preg_match("/\[img\](.*?)\[\/img\]/is",$item['body'],$matches))
$image = $matches[1];
$multipleimages = (strpos($item['body'], "[img") != strrpos($item['body'], "[img"));
// When saved into the database the content is sent through htmlspecialchars
// That means that we have to decode all image-urls
$image = htmlspecialchars_decode($image);
$link = '';
// look for bookmark-bbcode and handle it with priority
if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$item['body'],$matches))
$link = $matches[1];
$multiplelinks = (strpos($item['body'], "[bookmark") != strrpos($item['body'], "[bookmark"));
$body = $item['body'];
// At first convert the text to html
$html = bbcode($body, false, false, 2);
// Then convert it to plain text
$msg = trim(html2plain($html, 0, true));
$msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8');
// If there is no bookmark element then take the first link
if ($link == '') {
$links = collecturls($html);
if (sizeof($links) > 0) {
reset($links);
$link = current($links);
}
$multiplelinks = (sizeof($links) > 1);
if ($multiplelinks) {
$html2 = bbcode($msg, false, false);
$links2 = collecturls($html2);
if (sizeof($links2) > 0) {
reset($links2);
$link = current($links2);
$multiplelinks = (sizeof($links2) > 1);
}
}
}
$msglink = "";
if ($multiplelinks)
$msglink = $item["plink"];
else if ($link != "")
$msglink = $link;
else if ($multipleimages)
$msglink = $item["plink"];
else if ($image != "")
$msglink = $image;
// Fetching the title and add all lines
if ($item["title"] != "")
$title = $item["title"];
$lines = explode("\n", $msg);
foreach ($lines AS $line)
$title .= "\n".$line;
$max_char = 256;
$origlink = $msglink;
if (strlen($msglink) > 20)
$msglink = short_link($msglink);
$title = trim(str_replace($origlink, $msglink, $title));
if (strlen(trim($title." ".$msglink)) > $max_char) {
$title = substr($title, 0, $max_char - (strlen($msglink)));
$lastchar = substr($title, -1);
$title = substr($title, 0, -1);
$pos = strrpos($title, "\n");
if ($pos > 0)
$title = substr($title, 0, $pos);
else if ($lastchar != "\n")
$title = substr($title, 0, -3)."...";
}
if (($msglink != "") AND !strstr($title, $msglink))
$title = trim($title." ".$msglink);
else
$title = trim($title);
if ($title == "")
continue;
//$origlink = original_url($origlink);
$html = nl2br($title);
$origlink = $item["plink"];
$origlink = htmlspecialchars(html_entity_decode($origlink));
$title = str_replace("&", "&amp;", $title);
//$html = str_replace("&", "&amp;", $html);
echo "\t".'<entry xmlns="http://www.w3.org/2005/Atom">'."\n";
echo "\t\t".'<title type="html" xml:space="preserve"><![CDATA['.$title."]]></title>\n";
echo "\t\t".'<link rel="alternate" type="text/html" href="'.$origlink.'" />'."\n";
// <link rel="enclosure" type="audio/mpeg" length="1337" href="http://example.org/audio/ph34r_my_podcast.mp3"/>
echo "\t\t<id>".$item["uri"]."</id>\n";
echo "\t\t<updated>".date("c", strtotime($item["edited"]))."</updated>\n";
echo "\t\t<published>".date("c", strtotime($item["created"]))."</published>\n";
echo "\t\t<author>\n\t\t\t<name><![CDATA[".$item["author-name"]."]]></name>\n";
echo "\t\t\t<uri>".$item["author-link"]."</uri>\n\t\t</author>\n";
//echo '<content type="image/png" src="http://media.example.org/the_beach.png"/>';
echo "\t\t".'<content type="html" xml:space="preserve" xml:base="'.$item["plink"].'"><![CDATA['.$html."]]></content>\n";
echo "\t</entry>\n";
}
}

View File

@ -1,38 +0,0 @@
# ADDON appnetpost
# Copyright (C)
# This file is distributed under the same license as the Friendica appnetpost addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 11:47+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: appnetpost.php:37
msgid "Post to app.net"
msgstr ""
#: appnetpost.php:59 appnetpost.php:63
msgid "App.net Export"
msgstr ""
#: appnetpost.php:67
msgid "Enable App.net Post Plugin"
msgstr ""
#: appnetpost.php:72
msgid "Post to App.net by default"
msgstr ""
#: appnetpost.php:78
msgid "Save Settings"
msgstr ""

View File

@ -1,40 +0,0 @@
# ADDON appnetpost
# Copyright (C)
# This file is distributed under the same license as the Friendica appnetpost addon package.
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 11:47+0200\n"
"PO-Revision-Date: 2014-07-02 15:25+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: appnetpost.php:37
msgid "Post to app.net"
msgstr "Poslat příspěvek na app.net"
#: appnetpost.php:59 appnetpost.php:63
msgid "App.net Export"
msgstr "App.net Export"
#: appnetpost.php:67
msgid "Enable App.net Post Plugin"
msgstr "Aktivovat App.net Post Plugin"
#: appnetpost.php:72
msgid "Post to App.net by default"
msgstr "Defaultně poslat na App.net"
#: appnetpost.php:78
msgid "Save Settings"
msgstr "Uložit Nastavení"

View File

@ -1,12 +0,0 @@
<?php
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
}}
;
$a->strings["Post to app.net"] = "Poslat příspěvek na app.net";
$a->strings["App.net Export"] = "App.net Export";
$a->strings["Enable App.net Post Plugin"] = "Aktivovat App.net Post Plugin";
$a->strings["Post to App.net by default"] = "Defaultně poslat na App.net";
$a->strings["Save Settings"] = "Uložit Nastavení";

View File

@ -1,40 +0,0 @@
# ADDON appnetpost
# Copyright (C)
# This file is distributed under the same license as the Friendica appnetpost addon package.
#
#
# Translators:
# bavatar <tobias.diekershoff@gmx.net>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 11:47+0200\n"
"PO-Revision-Date: 2014-07-03 05:42+0000\n"
"Last-Translator: bavatar <tobias.diekershoff@gmx.net>\n"
"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: appnetpost.php:37
msgid "Post to app.net"
msgstr "Bei app.net veröffentlichen"
#: appnetpost.php:59 appnetpost.php:63
msgid "App.net Export"
msgstr "App.net Export"
#: appnetpost.php:67
msgid "Enable App.net Post Plugin"
msgstr "Veröffentlichungen bei App.net erlauben"
#: appnetpost.php:72
msgid "Post to App.net by default"
msgstr "Standardmäßig bei App.net veröffentlichen"
#: appnetpost.php:78
msgid "Save Settings"
msgstr "Einstellungen speichern"

View File

@ -1,12 +0,0 @@
<?php
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
return ($n != 1);;
}}
;
$a->strings["Post to app.net"] = "Bei app.net veröffentlichen";
$a->strings["App.net Export"] = "App.net Export";
$a->strings["Enable App.net Post Plugin"] = "Veröffentlichungen bei App.net erlauben";
$a->strings["Post to App.net by default"] = "Standardmäßig bei App.net veröffentlichen";
$a->strings["Save Settings"] = "Einstellungen speichern";

View File

@ -1,40 +0,0 @@
# ADDON appnetpost
# Copyright (C)
# This file is distributed under the same license as the Friendica appnetpost addon package.
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 11:47+0200\n"
"PO-Revision-Date: 2014-09-10 10:18+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: appnetpost.php:37
msgid "Post to app.net"
msgstr "Invia ad app.net"
#: appnetpost.php:59 appnetpost.php:63
msgid "App.net Export"
msgstr "Esporta App.net"
#: appnetpost.php:67
msgid "Enable App.net Post Plugin"
msgstr "Abilita il plugin di invio ad App.net"
#: appnetpost.php:72
msgid "Post to App.net by default"
msgstr "Invia sempre ad App.net"
#: appnetpost.php:78
msgid "Save Settings"
msgstr "Salva Impostazioni"

View File

@ -1,12 +0,0 @@
<?php
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
return ($n != 1);;
}}
;
$a->strings["Post to app.net"] = "Invia ad app.net";
$a->strings["App.net Export"] = "Esporta App.net";
$a->strings["Enable App.net Post Plugin"] = "Abilita il plugin di invio ad App.net";
$a->strings["Post to App.net by default"] = "Invia sempre ad App.net";
$a->strings["Save Settings"] = "Salva Impostazioni";

View File

@ -1,40 +0,0 @@
# ADDON appnetpost
# Copyright (C)
# This file is distributed under the same license as the Friendica appnetpost addon package.
#
#
# Translators:
# André Alves <and2099@riseup.net>, 2016
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 11:47+0200\n"
"PO-Revision-Date: 2016-01-03 06:26+0000\n"
"Last-Translator: André Alves <and2099@riseup.net>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/Friendica/friendica/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: appnetpost.php:37
msgid "Post to app.net"
msgstr ""
#: appnetpost.php:59 appnetpost.php:63
msgid "App.net Export"
msgstr "Exportar de App.net"
#: appnetpost.php:67
msgid "Enable App.net Post Plugin"
msgstr "Habilitar Plugin de publicação App.net"
#: appnetpost.php:72
msgid "Post to App.net by default"
msgstr "Postar em App.net por padrão"
#: appnetpost.php:78
msgid "Save Settings"
msgstr "Salvar Configurações"

View File

@ -1,12 +0,0 @@
<?php
if(! function_exists("string_plural_select_pt_br")) {
function string_plural_select_pt_br($n){
return ($n > 1);;
}}
;
$a->strings["Post to app.net"] = "";
$a->strings["App.net Export"] = "Exportar de App.net";
$a->strings["Enable App.net Post Plugin"] = "Habilitar Plugin de publicação App.net";
$a->strings["Post to App.net by default"] = "Postar em App.net por padrão";
$a->strings["Save Settings"] = "Salvar Configurações";

View File

@ -1,39 +0,0 @@
# ADDON appnetpost
# Copyright (C)
# This file is distributed under the same license as the Friendica appnetpost addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 11:47+0200\n"
"PO-Revision-Date: 2014-07-08 11:41+0000\n"
"Last-Translator: Arian - Cazare Muncitori <arianserv@gmail.com>\n"
"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ro_RO\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
#: appnetpost.php:37
msgid "Post to app.net"
msgstr "Postați pe App.net"
#: appnetpost.php:59 appnetpost.php:63
msgid "App.net Export"
msgstr "Exportare pe App.net"
#: appnetpost.php:67
msgid "Enable App.net Post Plugin"
msgstr "Activare Modul Postare pe App.net"
#: appnetpost.php:72
msgid "Post to App.net by default"
msgstr "Postați implicit pe App.net"
#: appnetpost.php:78
msgid "Save Settings"
msgstr "Salvare Configurări"

View File

@ -1,12 +0,0 @@
<?php
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
}}
;
$a->strings["Post to app.net"] = "Postați pe App.net";
$a->strings["App.net Export"] = "Exportare pe App.net";
$a->strings["Enable App.net Post Plugin"] = "Activare Modul Postare pe App.net";
$a->strings["Post to App.net by default"] = "Postați implicit pe App.net";
$a->strings["Save Settings"] = "Salvare Configurări";

View File

@ -1,54 +0,0 @@
# ADDON page
# Copyright (C)
# This file is distributed under the same license as the Friendica page addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: page.php:62 page.php:92
msgid "Forums"
msgstr ""
#: page.php:77 page.php:111
msgid "show more"
msgstr ""
#: page.php:130
msgid "Forums:"
msgstr ""
#: page.php:166
msgid "Page settings updated."
msgstr ""
#: page.php:195
msgid "Page Settings"
msgstr ""
#: page.php:197
msgid "How many forums to display on sidebar without paging"
msgstr ""
#: page.php:200
msgid "Randomise Page/Forum list"
msgstr ""
#: page.php:203
msgid "Show pages/forums on profile page"
msgstr ""
#: page.php:211
msgid "Submit"
msgstr ""

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Forums";
$a->strings["show more"] = "Mostrar més";
$a->strings["Forums:"] = "Fòrums:";
$a->strings["Page settings updated."] = "Actualitzats els ajustos de pàgina.";
$a->strings["Page Settings"] = "Ajustos de pàgina";
$a->strings["How many forums to display on sidebar without paging"] = "Quants fòrums per mostrar a la barra lateral per pàgina";
$a->strings["Randomise Page/Forum list"] = "Aleatoritza la llista de Pàgina/Fòrum";
$a->strings["Show pages/forums on profile page"] = "Mostra pàgines/fòrums a la pàgina de perfil";
$a->strings["Submit"] = "Enviar";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Fóra";
$a->strings["show more"] = "zobrazit více";
$a->strings["Forums:"] = "Fóra:";
$a->strings["Page settings updated."] = "Nastavení stránky aktualizováno.";
$a->strings["Page Settings"] = "Nastavení stránky";
$a->strings["How many forums to display on sidebar without paging"] = "Kolik diskuzních fór zobrazit v bočním panelu bez použití stránkování";
$a->strings["Randomise Page/Forum list"] = "Náhodný stránka/fórum seznam";
$a->strings["Show pages/forums on profile page"] = "Zobrazit stránky/fóra na profilové stránce";
$a->strings["Submit"] = "Odeslat";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Foren";
$a->strings["show more"] = "mehr anzeigen";
$a->strings["Forums:"] = "Foren:";
$a->strings["Page settings updated."] = "Seiteneinstellungen aktualisiert.";
$a->strings["Page Settings"] = "Seiteneinstellungen";
$a->strings["How many forums to display on sidebar without paging"] = "Wie viele Foren sollen in der Seitenleiste ohne Umblättern angezeigt werden";
$a->strings["Randomise Page/Forum list"] = "Zufällige Seiten/Foren Liste";
$a->strings["Show pages/forums on profile page"] = "Foren/Seiten auf der Profilseite anzeigen";
$a->strings["Submit"] = "Senden";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Forumoj";
$a->strings["show more"] = "montri pli";
$a->strings["Forums:"] = "Forumoj:";
$a->strings["Page settings updated."] = "Paĝajn agordojn ĝisdatigita.";
$a->strings["Page Settings"] = "Paĝaj Agordoj";
$a->strings["How many forums to display on sidebar without paging"] = "Montri tiom da forumoj en la flanka strio sen paĝigo";
$a->strings["Randomise Page/Forum list"] = "Hazardigi la liston de Paĝoj/Forumoj";
$a->strings["Show pages/forums on profile page"] = "Montri paĝojn/forumojn sur la profilpaĝo";
$a->strings["Submit"] = "Sendi";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Foros";
$a->strings["show more"] = "ver más";
$a->strings["Forums:"] = "Foros:";
$a->strings["Page settings updated."] = "Configuración de la página actualizada";
$a->strings["Page Settings"] = "Configuración de la página";
$a->strings["How many forums to display on sidebar without paging"] = "¿Cuántos foros se mostrarán en la barra lateral?";
$a->strings["Randomise Page/Forum list"] = "Lista de Página/Foro al azar";
$a->strings["Show pages/forums on profile page"] = "Mostrar páginas/foros en tu perfil";
$a->strings["Submit"] = "Envíar";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Forums";
$a->strings["show more"] = "montrer plus";
$a->strings["Forums:"] = "Forums:";
$a->strings["Page settings updated."] = "Paramètres des pages mis à jour.";
$a->strings["Page Settings"] = "Paramètres des pages";
$a->strings["How many forums to display on sidebar without paging"] = "Nombre de forums à afficher sur la barre de côté sans changer de page";
$a->strings["Randomise Page/Forum list"] = "Rendre aléatoire la liste des pages/forums";
$a->strings["Show pages/forums on profile page"] = "Montrer les forums sur le profil";
$a->strings["Submit"] = "Envoyer";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "";
$a->strings["show more"] = "sýna meira";
$a->strings["Forums:"] = "";
$a->strings["Page settings updated."] = "";
$a->strings["Page Settings"] = "";
$a->strings["How many forums to display on sidebar without paging"] = "";
$a->strings["Randomise Page/Forum list"] = "";
$a->strings["Show pages/forums on profile page"] = "";
$a->strings["Submit"] = "Senda inn";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Forum";
$a->strings["show more"] = "mostra di più";
$a->strings["Forums:"] = "Forum:";
$a->strings["Page settings updated."] = "";
$a->strings["Page Settings"] = "";
$a->strings["How many forums to display on sidebar without paging"] = "";
$a->strings["Randomise Page/Forum list"] = "";
$a->strings["Show pages/forums on profile page"] = "Mostra pagine/forum sulla pagina profilo";
$a->strings["Submit"] = "Invia";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "";
$a->strings["show more"] = "";
$a->strings["Forums:"] = "";
$a->strings["Page settings updated."] = "";
$a->strings["Page Settings"] = "";
$a->strings["How many forums to display on sidebar without paging"] = "";
$a->strings["Randomise Page/Forum list"] = "";
$a->strings["Show pages/forums on profile page"] = "";
$a->strings["Submit"] = "Lagre";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Fora";
$a->strings["show more"] = "Pokaż więcej";
$a->strings["Forums:"] = "";
$a->strings["Page settings updated."] = "Zaktualizowano ustawienia strony.";
$a->strings["Page Settings"] = "Ustawienia strony";
$a->strings["How many forums to display on sidebar without paging"] = "";
$a->strings["Randomise Page/Forum list"] = "";
$a->strings["Show pages/forums on profile page"] = "";
$a->strings["Submit"] = "Potwierdź";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Fóruns";
$a->strings["show more"] = "exibir mais";
$a->strings["Forums:"] = "Fóruns:";
$a->strings["Page settings updated."] = "As configurações da página foram atualizadas.";
$a->strings["Page Settings"] = "Configurações da página";
$a->strings["How many forums to display on sidebar without paging"] = "";
$a->strings["Randomise Page/Forum list"] = "";
$a->strings["Show pages/forums on profile page"] = "";
$a->strings["Submit"] = "Enviar";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "Форумы";
$a->strings["show more"] = "показать больше";
$a->strings["Forums:"] = "";
$a->strings["Page settings updated."] = "";
$a->strings["Page Settings"] = "";
$a->strings["How many forums to display on sidebar without paging"] = "";
$a->strings["Randomise Page/Forum list"] = "";
$a->strings["Show pages/forums on profile page"] = "";
$a->strings["Submit"] = "Подтвердить";

View File

@ -1,3 +0,0 @@
<?php
$a->strings["Submit"] = "Spara";

View File

@ -1,11 +0,0 @@
<?php
$a->strings["Forums"] = "论坛";
$a->strings["show more"] = "看多";
$a->strings["Forums:"] = "评坛:";
$a->strings["Page settings updated."] = "页设置更新了";
$a->strings["Page Settings"] = "页设置";
$a->strings["How many forums to display on sidebar without paging"] = "多少评坛要在工具栏上表示无分页";
$a->strings["Randomise Page/Forum list"] = "把页/评坛单洗牌";
$a->strings["Show pages/forums on profile page"] = "表示页/评坛在简介页";
$a->strings["Submit"] = "提交";

View File

@ -1,13 +0,0 @@
#page-settings-label, #page-random-label, #page-profile-label {
float: left;
width: 200px;
margin-bottom: 25px;
}
#page-max-pages, #page-random, #page-profile {
float: left;
}

View File

@ -1,216 +0,0 @@
<?php
/**
* Name: Page
* Description: This addon is now deprecated. Administrators should switch to forumlist instead. Developers should also add any functionality to forumlist instead of here.
* Version: 1.0
* Author: Mike Macgirvin <mike@macgirvin.com>
* based on pages plugin by
* Author: Michael Vogel <ike@piratenpartei.de>
* Status: Unsupported
*
*/
function page_install() {
register_hook('network_mod_init', 'addon/page/page.php', 'page_network_mod_init');
register_hook('plugin_settings', 'addon/page/page.php', 'page_plugin_settings');
register_hook('plugin_settings_post', 'addon/page/page.php', 'page_plugin_settings_post');
register_hook('profile_advanced', 'addon/page/page.php', 'page_profile_advanced');
}
function page_uninstall() {
unregister_hook('network_mod_init', 'addon/page/page.php', 'page_network_mod_init');
unregister_hook('plugin_settings', 'addon/page/page.php', 'page_plugin_settings');
unregister_hook('plugin_settings_post', 'addon/page/page.php', 'page_plugin_settings_post');
unregister_hook('profile_advanced', 'addon/page/page.php', 'page_profile_advanced');
// remove only - obsolete
unregister_hook('page_end', 'addon/page/page.php', 'page_page_end');
}
function page_getpage($uid,$showhidden = true,$randomise = false) {
$pagelist = array();
$order = (($showhidden) ? '' : " and hidden = 0 ");
$order .= (($randomise) ? ' order by rand() ' : ' order by name asc ');
$contacts = q("SELECT `id`, `url`, `name`, `micro` FROM `contact`
WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d
and blocked = 0 and hidden = 0 and pending = 0 and archive = 0
$order ",
intval($uid)
);
$page = array();
// Look if the profile is a community page
foreach($contacts as $contact) {
$page[] = array("url"=>$contact["url"], "name"=>$contact["name"], "id"=>$contact["id"], "micro"=>$contact['micro']);
}
return($page);
}
function page_page_end($a,&$b) {
// Only move on if if it's the "network" module and there is a logged on user
if (($a->module != "network") OR ($a->user['uid'] == 0))
return;
$page = '<div id="page-sidebar" class="widget">
<div class="title tool">
<h3>'.t("Forums").'</h3></div>
<div id="sidebar-page-list"><ul>';
$contacts = page_getpage($a->user['uid']);
$total_shown = 0;
$more = false;
foreach($contacts as $contact) {
$page .= '<li style="list-style-type: none;" class="tool"><img height="20" width="20" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" title="' . $contact['url'] . '" class="label sparkle" target="_blank">'.
$contact["name"]."</a></li>";
$total_shown ++;
if($total_shown == 6) {
$more = true;
$page .= '</ul><div id="hide-comments-page-widget" class="fakelink" onclick="showHideComments(\'page-widget\');" >' . t('show more')
. '</div><div id="collapsed-comments-page-widget" style="display: none;" ><ul>';
}
}
if($more)
$page .= '</div>';
$page .= "</ul></div></div>";
if (sizeof($contacts) > 0)
$a->page['aside'] = $page . $a->page['aside'];
}
function page_network_mod_init($a,$b) {
$page = '<div id="page-sidebar" class="widget">
<div class="title tool">
<h3>'.t("Forums").'</h3></div>
<div id="sidebar-page-list"><ul>';
$show_total = intval(get_pconfig(local_user(),'page','max_pages'));
if($show_total === false)
$show_total = 6;
$randomise = intval(get_pconfig(local_user(),'page','randomise'));
$contacts = page_getpage($a->user['uid'],true,$randomise);
$total_shown = 0;
$more = false;
foreach($contacts as $contact) {
$page .= '<li style="list-style-type: none;" class="tool"><img height="20" width="20" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" title="' . $contact['url'] . '" class="label sparkle" target="_blank">'.
$contact["name"]."</a></li>";
$total_shown ++;
if(($show_total) && ($total_shown == $show_total)) {
$more = true;
$page .= '</ul><div id="hide-comments-page-widget" class="fakelink" onclick="showHideComments(\'page-widget\');" >' . t('show more')
. '</div><div id="collapsed-comments-page-widget" style="display: none;" ><ul>';
}
}
if($more)
$page .= '</div>';
$page .= "</ul></div></div>";
if (sizeof($contacts) > 0)
$a->page['aside'] = $page . $a->page['aside'];
}
function page_profile_advanced($a,&$b) {
$profile = intval(get_pconfig($a->profile['profile_uid'],'page','show_on_profile'));
if(! $profile)
return;
$page = '<div id="page-profile">
<div class="title">'.t("Forums:").'</div>
<div id="profile-page-list">';
// place holder in case somebody wants configurability
$show_total = 9999;
$randomise = true;
$contacts = page_getpage($a->user['uid'],false,$randomise);
$total_shown = 0;
$more = false;
foreach($contacts as $contact) {
$page .= micropro($contact,false,'page-profile-advanced');
$total_shown ++;
if($total_shown == $show_total)
break;
}
$page .= '</div></div><div class="clear"></div>';
if(count($contacts) > 0)
$b .= $page;
}
function page_plugin_settings_post($a,$post) {
if(! local_user() || (! x($_POST,'page-settings-submit')))
return;
set_pconfig(local_user(),'page','max_pages',intval($_POST['page_max_pages']));
set_pconfig(local_user(),'page','randomise',intval($_POST['page_random']));
set_pconfig(local_user(),'page','show_on_profile',intval($_POST['page_profile']));
info( t('Page settings updated.') . EOL);
}
function page_plugin_settings(&$a,&$s) {
if(! local_user())
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/page/page.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */
$max_pages = get_pconfig(local_user(),'page','max_pages');
if($max_pages === false)
$max_pages = 6;
$randomise = intval(get_pconfig(local_user(),'page','randomise'));
$randomise_checked = (($randomise) ? ' checked="checked" ' : '');
$profile = intval(get_pconfig(local_user(),'page','show_on_profile'));
$profile_checked = (($profile) ? ' checked="checked" ' : '');
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('Page Settings') . '</h3>';
$s .= '<div id="page-settings-wrapper">';
$s .= '<label id="page-settings-label" for="page-max-pages">' . t('How many forums to display on sidebar without paging') . '</label>';
$s .= '<input id="page-max-pages" type="text" name="page_max_pages" value="' . intval($max_pages) . '" ' . '/>';
$s .= '<div class="clear"></div>';
$s .= '<label id="page-random-label" for="page-random">' . t('Randomise Page/Forum list') . '</label>';
$s .= '<input id="page-random" type="checkbox" name="page_random" value="1" ' . $randomise_checked . '/>';
$s .= '<div class="clear"></div>';
$s .= '<label id="page-profile-label" for="page-profile">' . t('Show pages/forums on profile page') . '</label>';
$s .= '<input id="page-profile" type="checkbox" name="page_profile" value="1" ' . $profile_checked . '/>';
$s .= '<div class="clear"></div>';
$s .= '</div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="page-settings-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
}

View File

@ -1,4 +0,0 @@
Once activated, this addon acs as a proxy between the user and external image resources.
If external images are to be shown, like avatars or embedded images, the server retrieves the image and the local link is sent to the user.
By using this proxy, the server hosting the original image cannot retrieve personal information of the user like the IP address, User Agent or Cookies.
However, the remote server will be able to track the IP address of the server hosting the friendica installation.

View File

@ -1,42 +0,0 @@
# ADDON privacy_image_cache
# Copyright (C)
# This file is distributed under the same license as the Friendica privacy_image_cache addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: privacy_image_cache.php:364
msgid "Lifetime of the cache (in hours)"
msgstr ""
#: privacy_image_cache.php:367
msgid "Save"
msgstr ""
#: privacy_image_cache.php:369
msgid "Cache Statistics"
msgstr ""
#: privacy_image_cache.php:372
msgid "Number of items"
msgstr ""
#: privacy_image_cache.php:374
msgid "Size of the cache"
msgstr ""
#: privacy_image_cache.php:376
msgid "Delete the whole cache"
msgstr ""

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "Temps de vida de la caché (en hores)";
$a->strings["Save"] = "Guardar";
$a->strings["Cache Statistics"] = "Estadístiques de la caché";
$a->strings["Number of items"] = "Nombre d'elements";
$a->strings["Size of the cache"] = "Mida de la caché";
$a->strings["Delete the whole cache"] = "Esborra tota la cachè";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "Životnost vyrovnávací paměti (v hodinách)";
$a->strings["Save"] = "Uložit";
$a->strings["Cache Statistics"] = "Statistika vyrovnávací paměti";
$a->strings["Number of items"] = "Počet položek";
$a->strings["Size of the cache"] = "Velikost vyrovnávací paměti";
$a->strings["Delete the whole cache"] = "Vymazat celou vyrovnávací paměť";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "Lebenszeit des Caches (in Stunden)";
$a->strings["Save"] = "Speichern";
$a->strings["Cache Statistics"] = "Cache Statistik";
$a->strings["Number of items"] = "Anzahl der Einträge";
$a->strings["Size of the cache"] = "Größe des Caches";
$a->strings["Delete the whole cache"] = "Cache leeren";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "Vivodaŭro de kaŝmemoro (horoj)";
$a->strings["Save"] = "Konservi";
$a->strings["Cache Statistics"] = "Statistikoj pri kaŝmemoro";
$a->strings["Number of items"] = "Kvanto da eroj";
$a->strings["Size of the cache"] = "Grando de la kaŝmemoro";
$a->strings["Delete the whole cache"] = "Forviŝi la kaŝmemoron";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "Vida útil de la caché (en horas)";
$a->strings["Save"] = "Guardar";
$a->strings["Cache Statistics"] = "Estadísticas de la caché";
$a->strings["Number of items"] = "Número de ítems";
$a->strings["Size of the cache"] = "Tamaño de la caché";
$a->strings["Delete the whole cache"] = "Borrar toda la caché";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "Durée de vie du cache (en heures)";
$a->strings["Save"] = "Sauver";
$a->strings["Cache Statistics"] = "Statistiques du cache";
$a->strings["Number of items"] = "Nombre d'éléments";
$a->strings["Size of the cache"] = "Taille du cache";
$a->strings["Delete the whole cache"] = "Vider le cache";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "";
$a->strings["Save"] = "Vista";
$a->strings["Cache Statistics"] = "Tölfræði skyndiminnis";
$a->strings["Number of items"] = "Fjöldi færslna";
$a->strings["Size of the cache"] = "Stærð skyndiminnis";
$a->strings["Delete the whole cache"] = "Eyða öllu í skyndiminni";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "";
$a->strings["Save"] = "Salva";
$a->strings["Cache Statistics"] = "";
$a->strings["Number of items"] = "";
$a->strings["Size of the cache"] = "";
$a->strings["Delete the whole cache"] = "";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "";
$a->strings["Save"] = "Lagre";
$a->strings["Cache Statistics"] = "";
$a->strings["Number of items"] = "";
$a->strings["Size of the cache"] = "";
$a->strings["Delete the whole cache"] = "";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "";
$a->strings["Save"] = "Zapisz";
$a->strings["Cache Statistics"] = "";
$a->strings["Number of items"] = "Numery elementów";
$a->strings["Size of the cache"] = "";
$a->strings["Delete the whole cache"] = "";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "Tempo de vida do cache (em horas)";
$a->strings["Save"] = "Salvar";
$a->strings["Cache Statistics"] = "Estatísticas do cache";
$a->strings["Number of items"] = "Número de itens";
$a->strings["Size of the cache"] = "Tamanho do cache";
$a->strings["Delete the whole cache"] = "Excluir o cache inteiro";

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "";
$a->strings["Save"] = "Сохранить";
$a->strings["Cache Statistics"] = "";
$a->strings["Number of items"] = "";
$a->strings["Size of the cache"] = "";
$a->strings["Delete the whole cache"] = "";

View File

@ -1,2 +0,0 @@
<?php

View File

@ -1,8 +0,0 @@
<?php
$a->strings["Lifetime of the cache (in hours)"] = "缓存期(小时)";
$a->strings["Save"] = "保存";
$a->strings["Cache Statistics"] = "缓存统计";
$a->strings["Number of items"] = "项目数量";
$a->strings["Size of the cache"] = "缓存尺寸";
$a->strings["Delete the whole cache"] = "删除全缓存";

View File

@ -1,453 +0,0 @@
<?php
/**
* Name: Privacy Image Cache
* Version: 0.1
* Author: Tobias Hößl <https://github.com/CatoTH/>
* Status: Unsupported
*/
define("PRIVACY_IMAGE_CACHE_DEFAULT_TIME", 86400); // 1 Day
require_once('include/security.php');
require_once("include/Photo.php");
function privacy_image_cache_install() {
register_hook('prepare_body', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_prepare_body_hook');
// register_hook('bbcode', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_bbcode_hook');
register_hook('display_item', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_display_item_hook');
register_hook('ping_xmlize', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_ping_xmlize_hook');
register_hook('cron', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_cron');
}
function privacy_image_cache_uninstall() {
unregister_hook('prepare_body', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_prepare_body_hook');
unregister_hook('bbcode', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_bbcode_hook');
unregister_hook('display_item', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_display_item_hook');
unregister_hook('ping_xmlize', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_ping_xmlize_hook');
unregister_hook('cron', 'addon/privacy_image_cache/privacy_image_cache.php', 'privacy_image_cache_cron');
}
function privacy_image_cache_module() {}
function privacy_image_cache_init() {
global $a, $_SERVER;
// The code needs to be reworked, it is too complicated
//
// it is doing the following:
// 1. If a folder "privacy_image_cache" exists and is writeable, then use this for caching
// 2. If a cache path is defined, use this
// 3. If everything else failed, cache into the database
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
header('HTTP/1.1 304 Not Modified');
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header('Etag: '.$_SERVER['HTTP_IF_NONE_MATCH']);
header("Expires: " . gmdate("D, d M Y H:i:s", time() + (31536000)) . " GMT");
header("Cache-Control: max-age=31536000");
if(function_exists('header_remove')) {
header_remove('Last-Modified');
header_remove('Expires');
header_remove('Cache-Control');
}
exit;
}
if(function_exists('header_remove')) {
header_remove('Pragma');
header_remove('pragma');
}
$thumb = false;
$size = 1024;
// If the cache path isn't there, try to create it
if (!is_dir($_SERVER["DOCUMENT_ROOT"]."/privacy_image_cache"))
if (is_writable($_SERVER["DOCUMENT_ROOT"]))
mkdir($_SERVER["DOCUMENT_ROOT"]."/privacy_image_cache");
// Checking if caching into a folder in the webroot is activated and working
$direct_cache = (is_dir($_SERVER["DOCUMENT_ROOT"]."/privacy_image_cache") AND is_writable($_SERVER["DOCUMENT_ROOT"]."/privacy_image_cache"));
// Look for filename in the arguments
if (isset($a->argv[1]) OR isset($a->argv[2]) OR isset($a->argv[3])) {
if (isset($a->argv[3]))
$url = $a->argv[3];
elseif (isset($a->argv[2]))
$url = $a->argv[2];
else
$url = $a->argv[1];
//$thumb = (isset($a->argv[3]) and ($a->argv[3] == "thumb"));
if (isset($a->argv[3]) and ($a->argv[3] == "thumb"))
$size = 200;
// thumb, small, medium and large.
if (substr($url, -6) == ":thumb")
$size = 150;
if (substr($url, -6) == ":small")
$size = 340;
if (substr($url, -7) == ":medium")
$size = 600;
if (substr($url, -6) == ":large")
$size = 1024;
$pos = strrpos($url, "=.");
if ($pos)
$url = substr($url, 0, $pos+1);
$url = str_replace(array(".jpg", ".jpeg", ".gif", ".png"), array("","","",""), $url);
$url = base64_decode(strtr($url, '-_', '+/'), true);
if ($url)
$_REQUEST['url'] = $url;
}
if (!$direct_cache) {
$urlhash = 'pic:' . sha1($_REQUEST['url']);
// Double encoded url - happens with Diaspora
$urlhash2 = 'pic:' . sha1(urldecode($_REQUEST['url']));
$cachefile = get_cachefile(hash("md5", $_REQUEST['url']));
if ($cachefile != '') {
if (file_exists($cachefile)) {
$img_str = file_get_contents($cachefile);
$mime = image_type_to_mime_type(exif_imagetype($cachefile));
header("Content-type: $mime");
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header('Etag: "'.md5($img_str).'"');
header("Expires: " . gmdate("D, d M Y H:i:s", time() + (31536000)) . " GMT");
header("Cache-Control: max-age=31536000");
// reduce quality - if it isn't a GIF
if ($mime != "image/gif") {
$img = new Photo($img_str, $mime);
if($img->is_valid()) {
$img_str = $img->imageString();
}
}
echo $img_str;
killme();
}
}
} else
$cachefile = "";
$valid = true;
if (!$direct_cache AND ($cachefile == "")) {
$r = q("SELECT * FROM `photo` WHERE `resource-id` in ('%s', '%s') LIMIT 1", $urlhash, $urlhash2);
if (count($r)) {
$img_str = $r[0]['data'];
$mime = $r[0]["desc"];
if ($mime == "") $mime = "image/jpeg";
}
} else
$r = array();
if (!count($r)) {
// It shouldn't happen but it does - spaces in URL
$_REQUEST['url'] = str_replace(" ", "+", $_REQUEST['url']);
$redirects = 0;
$img_str = fetch_url($_REQUEST['url'],true, $redirects, 10);
$tempfile = tempnam(get_temppath(), "cache");
file_put_contents($tempfile, $img_str);
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
unlink($tempfile);
// If there is an error then return a blank image
if ((substr($a->get_curl_code(), 0, 1) == "4") or (!$img_str)) {
$img_str = file_get_contents("images/blank.png");
$mime = "image/png";
$cachefile = ""; // Clear the cachefile so that the dummy isn't stored
$valid = false;
$img = new Photo($img_str, "image/png");
if($img->is_valid()) {
$img->scaleImage(10);
$img_str = $img->imageString();
}
} else if (($mime != "image/jpeg") AND !$direct_cache AND ($cachefile == "")) {
$image = @imagecreatefromstring($img_str);
if($image === FALSE) die();
q("INSERT INTO `photo`
( `uid`, `contact-id`, `guid`, `resource-id`, `created`, `edited`, `filename`, `album`, `height`, `width`, `desc`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` )
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' )",
0, 0, get_guid(), dbesc($urlhash),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(basename(dbesc($_REQUEST["url"]))),
dbesc(''),
intval(imagesy($image)),
intval(imagesx($image)),
$mime,
dbesc($img_str),
100,
intval(0),
dbesc(''), dbesc(''), dbesc(''), dbesc('')
);
} else {
$img = new Photo($img_str, $mime);
if($img->is_valid()) {
if (!$direct_cache AND ($cachefile == ""))
$img->store(0, 0, $urlhash, $_REQUEST['url'], '', 100);
//if ($thumb) {
// $img->scaleImage(200); // Test
// $img_str = $img->imageString();
//}
}
//$mime = "image/jpeg";
}
}
// reduce quality - if it isn't a GIF
if ($mime != "image/gif") {
$img = new Photo($img_str, $mime);
if($img->is_valid()) {
//$img->scaleImage(1024); // Test
$img->scaleImage($size);
$img_str = $img->imageString();
}
}
// If there is a real existing directory then put the cache file there
// advantage: real file access is really fast
// Otherwise write in cachefile
if ($valid AND $direct_cache)
file_put_contents($_SERVER["DOCUMENT_ROOT"]."/privacy_image_cache/".privacy_image_cache_cachename($_REQUEST['url'], true), $img_str);
elseif ($cachefile != '')
file_put_contents($cachefile, $img_str);
header("Content-type: $mime");
// Only output the cache headers when the file is valid
if ($valid) {
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header('Etag: "'.md5($img_str).'"');
header("Expires: " . gmdate("D, d M Y H:i:s", time() + (31536000)) . " GMT");
header("Cache-Control: max-age=31536000");
}
echo $img_str;
killme();
}
function privacy_image_cache_cachename($url, $writemode = false) {
global $_SERVER;
$pos = strrpos($url, ".");
if ($pos) {
$extension = strtolower(substr($url, $pos+1));
$pos = strpos($extension, "?");
if ($pos)
$extension = substr($extension, 0, $pos);
}
$basepath = $_SERVER["DOCUMENT_ROOT"]."/privacy_image_cache";
$path = substr(hash("md5", $url), 0, 2);
if (is_dir($basepath) and $writemode)
if (!is_dir($basepath."/".$path)) {
mkdir($basepath."/".$path);
chmod($basepath."/".$path, 0777);
}
$path .= "/".strtr(base64_encode($url), '+/', '-_');
$extensions = array("jpg", "jpeg", "gif", "png");
if (in_array($extension, $extensions))
$path .= ".".$extension;
return($path);
}
/**
* @param $url string
* @return boolean
*/
function privacy_image_cache_is_local_image($url) {
if ($url[0] == '/') return true;
if (strtolower(substr($url, 0, 5)) == "data:") return true;
// Check if the cached path would be longer than 255 characters - apache doesn't like it
if (is_dir($_SERVER["DOCUMENT_ROOT"]."/privacy_image_cache")) {
$cachedurl = get_app()->get_baseurl()."/privacy_image_cache/". privacy_image_cache_cachename($url);
if (strlen($url) > 150)
return true;
}
// links normalised - bug #431
$baseurl = normalise_link(get_app()->get_baseurl());
$url = normalise_link($url);
return (substr($url, 0, strlen($baseurl)) == $baseurl);
}
/**
* @param array $matches
* @return string
*/
function privacy_image_cache_img_cb($matches) {
// if the picture seems to be from another picture cache then take the original source
$queryvar = privacy_image_cache_parse_query($matches[2]);
if (($queryvar['url'] != "") AND (substr($queryvar['url'], 0, 4) == "http"))
$matches[2] = urldecode($queryvar['url']);
// if fetching facebook pictures don't fetch the thumbnail but the big one
//if (((strpos($matches[2], ".fbcdn.net/") OR strpos($matches[2], "/fbcdn-photos-"))) and (substr($matches[2], -6) == "_s.jpg"))
// $matches[2] = substr($matches[2], 0, -6)."_n.jpg";
// following line changed per bug #431
if (privacy_image_cache_is_local_image($matches[2]))
return $matches[1] . $matches[2] . $matches[3];
//return $matches[1] . get_app()->get_baseurl() . "/privacy_image_cache/?url=" . addslashes(rawurlencode(htmlspecialchars_decode($matches[2]))) . $matches[3];
return $matches[1].get_app()->get_baseurl()."/privacy_image_cache/". privacy_image_cache_cachename(htmlspecialchars_decode($matches[2])).$matches[3];
}
/**
* @param App $a
* @param string $o
*/
function privacy_image_cache_prepare_body_hook(&$a, &$o) {
$o["html"] = preg_replace_callback("/(<img [^>]*src *= *[\"'])([^\"']+)([\"'][^>]*>)/siU", "privacy_image_cache_img_cb", $o["html"]);
}
/**
* @param App $a
* @param string $o
* Function disabled because the plugin moved
*/
function privacy_image_cache_bbcode_hook(&$a, &$o) {
//$o = preg_replace_callback("/(<img [^>]*src *= *[\"'])([^\"']+)([\"'][^>]*>)/siU", "privacy_image_cache_img_cb", $o);
}
/**
* @param App $a
* @param string $o
*/
function privacy_image_cache_display_item_hook(&$a, &$o) {
if (isset($o["output"])) {
if (isset($o["output"]["thumb"]) && !privacy_image_cache_is_local_image($o["output"]["thumb"]))
$o["output"]["thumb"] = $a->get_baseurl() . "/privacy_image_cache/".privacy_image_cache_cachename($o["output"]["thumb"]);
if (isset($o["output"]["author-avatar"]) && !privacy_image_cache_is_local_image($o["output"]["author-avatar"]))
$o["output"]["author-avatar"] = $a->get_baseurl() . "/privacy_image_cache/".privacy_image_cache_cachename($o["output"]["author-avatar"]);
if (isset($o["output"]["owner-avatar"]) && !privacy_image_cache_is_local_image($o["output"]["owner-avatar"]))
$o["output"]["owner-avatar"] = $a->get_baseurl() . "/privacy_image_cache/".privacy_image_cache_cachename($o["output"]["owner-avatar"]);
if (isset($o["output"]["owner_photo"]) && !privacy_image_cache_is_local_image($o["output"]["owner_photo"]))
$o["output"]["owner_photo"] = $a->get_baseurl() . "/privacy_image_cache/".privacy_image_cache_cachename($o["output"]["owner_photo"]);
}
}
/**
* @param App $a
* @param string $o
*/
function privacy_image_cache_ping_xmlize_hook(&$a, &$o) {
if ($o["photo"] != "" && !privacy_image_cache_is_local_image($o["photo"]))
$o["photo"] = $a->get_baseurl() . "/privacy_image_cache/".privacy_image_cache_cachename($o["photo"]);
//$o["photo"] = $a->get_baseurl() . "/privacy_image_cache/?url=" . escape_tags(addslashes(rawurlencode($o["photo"])));
}
/**
* @param App $a
* @param null|object $b
*/
function privacy_image_cache_cron(&$a = null, &$b = null) {
$cachetime = get_config('privacy_image_cache','cache_time');
if (!$cachetime) $cachetime = PRIVACY_IMAGE_CACHE_DEFAULT_TIME;
$last = get_config('pi_cache','last_delete');
$time = time();
if ($time < ($last + 3600)) return;
logger("Purging old Cache of the Privacy Image Cache", LOGGER_DEBUG);
q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%" AND `created` < NOW() - INTERVAL %d SECOND', $cachetime);
clear_cache($a->get_basepath(), $a->get_basepath()."/privacy_image_cache");
set_config('pi_cache', 'last_delete', $time);
}
/**
* @param App $a
* @param null|object $o
*/
function privacy_image_cache_plugin_admin(&$a, &$o){
$o = '<input type="hidden" name="form_security_token" value="' . get_form_security_token("picsave") . '">';
$cachetime = get_config('privacy_image_cache','cache_time');
if (!$cachetime) $cachetime = PRIVACY_IMAGE_CACHE_DEFAULT_TIME;
$cachetime_h = Ceil($cachetime / 3600);
$o .= '<label for="pic_cachetime">' . t('Lifetime of the cache (in hours)') . '</label>
<input id="pic_cachetime" name="cachetime" type="text" value="' . escape_tags($cachetime_h) . '"><br style="clear: both;">';
$o .= '<input type="submit" name="save" value="' . t('Save') . '">';
$o .= '<h4>' . t('Cache Statistics') . '</h4>';
$num = q('SELECT COUNT(*) num, SUM(LENGTH(data)) size FROM `photo` WHERE `uid`=0 AND `contact-id`=0 AND `resource-id` LIKE "pic:%%"');
$o .= '<label for="statictics_num">' . t('Number of items') . '</label><input style="color: gray;" id="statistics_num" disabled value="' . escape_tags($num[0]['num']) . '"><br style="clear: both;">';
$size = Ceil($num[0]['size'] / (1024 * 1024));
$o .= '<label for="statictics_size">' . t('Size of the cache') . '</label><input style="color: gray;" id="statistics_size" disabled value="' . $size . ' MB"><br style="clear: both;">';
$o .= '<input type="submit" name="delete_all" value="' . t('Delete the whole cache') . '">';
}
/**
* @param App $a
* @param null|object $o
*/
function privacy_image_cache_plugin_admin_post(&$a = null, &$o = null){
check_form_security_token_redirectOnErr('/admin/plugins/privacy_image_cache', 'picsave');
if (isset($_REQUEST['save'])) {
$cachetime_h = IntVal($_REQUEST['cachetime']);
if ($cachetime_h < 1) $cachetime_h = 1;
set_config('privacy_image_cache','cache_time', $cachetime_h * 3600);
}
if (isset($_REQUEST['delete_all'])) {
q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%"');
}
}
function privacy_image_cache_parse_query($var) {
/**
* Use this function to parse out the query array element from
* the output of parse_url().
*/
$var = parse_url($var, PHP_URL_QUERY);
$var = html_entity_decode($var);
$var = explode('&', $var);
$arr = array();
foreach($var as $val) {
$x = explode('=', $val);
$arr[$x[0]] = $x[1];
}
unset($val, $x, $var);
return $arr;
}