From beab86860e62fda96de1d071c5749628a53d3e99 Mon Sep 17 00:00:00 2001 From: Dylan Thiedeke Date: Tue, 7 Jul 2015 08:43:11 +1000 Subject: [PATCH 01/10] Create Krynn plugin --- krynn/krynn.css | 14 +++ krynn/krynn.php | 165 +++++++++++++++++++++++++++++++++++ krynn/lang/C/messages.po | 30 +++++++ krynn/lang/ca/strings.php | 5 ++ krynn/lang/cs/messages.po | 32 +++++++ krynn/lang/cs/strings.php | 10 +++ krynn/lang/de/messages.po | 33 +++++++ krynn/lang/de/strings.php | 10 +++ krynn/lang/eo/strings.php | 5 ++ krynn/lang/es/strings.php | 5 ++ krynn/lang/fr/strings.php | 5 ++ krynn/lang/is/strings.php | 5 ++ krynn/lang/it/messages.po | 32 +++++++ krynn/lang/it/strings.php | 10 +++ krynn/lang/nb-no/strings.php | 5 ++ krynn/lang/pl/strings.php | 5 ++ krynn/lang/pt-br/strings.php | 5 ++ krynn/lang/ro/messages.po | 32 +++++++ krynn/lang/ro/strings.php | 10 +++ krynn/lang/ru/strings.php | 5 ++ krynn/lang/sv/strings.php | 3 + krynn/lang/zh-cn/strings.php | 5 ++ 22 files changed, 431 insertions(+) create mode 100755 krynn/krynn.css create mode 100755 krynn/krynn.php create mode 100644 krynn/lang/C/messages.po create mode 100644 krynn/lang/ca/strings.php create mode 100644 krynn/lang/cs/messages.po create mode 100644 krynn/lang/cs/strings.php create mode 100644 krynn/lang/de/messages.po create mode 100644 krynn/lang/de/strings.php create mode 100644 krynn/lang/eo/strings.php create mode 100644 krynn/lang/es/strings.php create mode 100644 krynn/lang/fr/strings.php create mode 100644 krynn/lang/is/strings.php create mode 100644 krynn/lang/it/messages.po create mode 100644 krynn/lang/it/strings.php create mode 100644 krynn/lang/nb-no/strings.php create mode 100644 krynn/lang/pl/strings.php create mode 100644 krynn/lang/pt-br/strings.php create mode 100644 krynn/lang/ro/messages.po create mode 100644 krynn/lang/ro/strings.php create mode 100644 krynn/lang/ru/strings.php create mode 100644 krynn/lang/sv/strings.php create mode 100644 krynn/lang/zh-cn/strings.php diff --git a/krynn/krynn.css b/krynn/krynn.css new file mode 100755 index 000000000..466a3ecd1 --- /dev/null +++ b/krynn/krynn.css @@ -0,0 +1,14 @@ + + + +#krynn-enable-label { + float: left; + width: 200px; + margin-bottom: 25px; +} + +#krynn-checkbox { + float: left; +} + + diff --git a/krynn/krynn.php b/krynn/krynn.php new file mode 100755 index 000000000..4f336d7b8 --- /dev/null +++ b/krynn/krynn.php @@ -0,0 +1,165 @@ + + * Planets Author: Tony Baldwin + * Krynn modifications: Dylan Thiedeke + * + *"My body was my sacrifice... for my magic. This damage is permanent." - Raislin Majere + */ + + +function krynn_install() { + + /** + * + * Our demo plugin will attach in three places. + * The first is just prior to storing a local post. + * + */ + + register_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook'); + + /** + * + * Then we'll attach into the plugin settings page, and also the + * settings post hook so that we can create and update + * user preferences. + * + */ + + register_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings'); + register_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); + + logger("installed krynn"); +} + + +function krynn_uninstall() { + + /** + * + * uninstall unregisters any hooks created with register_hook + * during install. It may also delete configuration settings + * and any other cleanup. + * + */ + + unregister_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook'); + unregister_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings'); + unregister_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); + + + logger("removed krynn"); +} + + + +function krynn_post_hook($a, &$item) { + + /** + * + * An item was posted on the local system. + * We are going to look for specific items: + * - A status post by a profile owner + * - The profile owner must have allowed our plugin + * + */ + + logger('krynn invoked'); + + if(! local_user()) /* non-zero if this is a logged in user of this system */ + return; + + if(local_user() != $item['uid']) /* Does this person own the post? */ + return; + + if($item['parent']) /* If the item has a parent, this is a comment or something else, not a status post. */ + return; + + /* Retrieve our personal config setting */ + + $active = get_pconfig(local_user(), 'krynn', 'enable'); + + if(! $active) + return; + + /** + * + * OK, we're allowed to do our stuff. + * Here's what we are going to do: + * load the list of timezone names, and use that to generate a list of krynn locales. + * Then we'll pick one of those at random and put it in the "location" field for the post. + * + */ + + $krynn = array('Ansalon','Abanasinia','Solace','Haven','Gateway','Qualinost','Ankatavaka','Pax Tharkas','Ergoth','Newsea','Straights of Schallsea','Plains of Dust','Tarsis','Barren Hills','Que Shu','Citadel of Light','Solinari','Hedge Maze','Tower of High Sorcery','Inn of the Last Home','Last Heroes Tomb','Academy of Sorcery','Gods Row','Temple of Majere','Temple of Kiri-Jolith','Temple of Mishakal','Temple of Zeboim,','The Trough','Sad Town','Xak Tsaroth','ZHaman','SKullcap',); + + $planet = array_rand($krynn,1); + $item['location'] = $krynn[$planet]; + + return; +} + + + + +/** + * + * 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 krynn_settings_post($a,$post) { + if(! local_user()) + return; + if($_POST['krynn-submit']) + set_pconfig(local_user(),'krynn','enable',intval($_POST['krynn'])); +} + + +/** + * + * Called from the Plugin Setting form. + * Add our own settings info to the page. + * + */ + + + +function krynn_settings(&$a,&$s) { + + if(! local_user()) + return; + + /* Add our stylesheet to the page so we can make our settings look nice */ + + $a->page['htmlhead'] .= '' . "\r\n"; + + /* Get the current state of our config variable */ + + $enabled = get_pconfig(local_user(),'krynn','enable'); + + $checked = (($enabled) ? ' checked="checked" ' : ''); + + /* Add some HTML to the existing form */ + + $s .= '
'; + $s .= '

' . t('Krynn Settings') . '

'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + /* provide a submit button */ + + $s .= '
'; + +} + + diff --git a/krynn/lang/C/messages.po b/krynn/lang/C/messages.po new file mode 100644 index 000000000..843752a1d --- /dev/null +++ b/krynn/lang/C/messages.po @@ -0,0 +1,30 @@ +# ADDON planets +# Copyright (C) +# This file is distributed under the same license as the Friendica planets 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 \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: planets.php:150 +msgid "Planets Settings" +msgstr "" + +#: planets.php:152 +msgid "Enable Planets Plugin" +msgstr "" + +#: planets.php:158 +msgid "Submit" +msgstr "" diff --git a/krynn/lang/ca/strings.php b/krynn/lang/ca/strings.php new file mode 100644 index 000000000..79fdd6be2 --- /dev/null +++ b/krynn/lang/ca/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Ajustos de Planet"; +$a->strings["Enable Planets Plugin"] = "Activa Plugin de Planet"; +$a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/cs/messages.po b/krynn/lang/cs/messages.po new file mode 100644 index 000000000..c47ff06cd --- /dev/null +++ b/krynn/lang/cs/messages.po @@ -0,0 +1,32 @@ +# ADDON planets +# Copyright (C) +# This file is distributed under the same license as the Friendica planets addon package. +# +# +# Translators: +# Michal Šupler , 2014-2015 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2015-02-11 19:37+0000\n" +"Last-Translator: Michal Šupler \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" + +#: planets.php:150 +msgid "Planets Settings" +msgstr "Planets Nastavení" + +#: planets.php:152 +msgid "Enable Planets Plugin" +msgstr "Povolit Planets plugin" + +#: planets.php:158 +msgid "Submit" +msgstr "Odeslat" diff --git a/krynn/lang/cs/strings.php b/krynn/lang/cs/strings.php new file mode 100644 index 000000000..268f31921 --- /dev/null +++ b/krynn/lang/cs/strings.php @@ -0,0 +1,10 @@ +=2 && $n<=4) ? 1 : 2;; +}} +; +$a->strings["Planets Settings"] = "Planets Nastavení"; +$a->strings["Enable Planets Plugin"] = "Povolit Planets plugin"; +$a->strings["Submit"] = "Odeslat"; diff --git a/krynn/lang/de/messages.po b/krynn/lang/de/messages.po new file mode 100644 index 000000000..42788d569 --- /dev/null +++ b/krynn/lang/de/messages.po @@ -0,0 +1,33 @@ +# ADDON planets +# Copyright (C) +# This file is distributed under the same license as the Friendica planets addon package. +# +# +# Translators: +# Abrax , 2014 +# bavatar , 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-10-15 12:32+0000\n" +"Last-Translator: Abrax \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" + +#: planets.php:150 +msgid "Planets Settings" +msgstr "Planeten Einstellungen" + +#: planets.php:152 +msgid "Enable Planets Plugin" +msgstr "Planeten-Plugin aktivieren" + +#: planets.php:158 +msgid "Submit" +msgstr "Senden" diff --git a/krynn/lang/de/strings.php b/krynn/lang/de/strings.php new file mode 100644 index 000000000..ab513fac2 --- /dev/null +++ b/krynn/lang/de/strings.php @@ -0,0 +1,10 @@ +strings["Planets Settings"] = "Planeten Einstellungen"; +$a->strings["Enable Planets Plugin"] = "Planeten-Plugin aktivieren"; +$a->strings["Submit"] = "Senden"; diff --git a/krynn/lang/eo/strings.php b/krynn/lang/eo/strings.php new file mode 100644 index 000000000..2f9ff97cd --- /dev/null +++ b/krynn/lang/eo/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Agordo pri Planets"; +$a->strings["Enable Planets Plugin"] = "Ŝalti la Planets kromprogamon"; +$a->strings["Submit"] = "Sendi"; diff --git a/krynn/lang/es/strings.php b/krynn/lang/es/strings.php new file mode 100644 index 000000000..67b52dcd4 --- /dev/null +++ b/krynn/lang/es/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Configuración de Planets"; +$a->strings["Enable Planets Plugin"] = "Activar el módulo de planetas Planets"; +$a->strings["Submit"] = "Envíar"; diff --git a/krynn/lang/fr/strings.php b/krynn/lang/fr/strings.php new file mode 100644 index 000000000..505d24c34 --- /dev/null +++ b/krynn/lang/fr/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Réglages des Planets"; +$a->strings["Enable Planets Plugin"] = "Activer Planets"; +$a->strings["Submit"] = "Envoyer"; diff --git a/krynn/lang/is/strings.php b/krynn/lang/is/strings.php new file mode 100644 index 000000000..d59b838f2 --- /dev/null +++ b/krynn/lang/is/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = ""; +$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Submit"] = "Senda inn"; diff --git a/krynn/lang/it/messages.po b/krynn/lang/it/messages.po new file mode 100644 index 000000000..3740be8ff --- /dev/null +++ b/krynn/lang/it/messages.po @@ -0,0 +1,32 @@ +# ADDON planets +# Copyright (C) +# This file is distributed under the same license as the Friendica planets addon package. +# +# +# Translators: +# fabrixxm , 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-10-15 09:01+0000\n" +"Last-Translator: fabrixxm \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" + +#: planets.php:150 +msgid "Planets Settings" +msgstr "Impostazioni \"Pianeti\"" + +#: planets.php:152 +msgid "Enable Planets Plugin" +msgstr "Abilita il plugin \"Pianeti\"" + +#: planets.php:158 +msgid "Submit" +msgstr "" diff --git a/krynn/lang/it/strings.php b/krynn/lang/it/strings.php new file mode 100644 index 000000000..635183fa4 --- /dev/null +++ b/krynn/lang/it/strings.php @@ -0,0 +1,10 @@ +strings["Planets Settings"] = "Impostazioni \"Pianeti\""; +$a->strings["Enable Planets Plugin"] = "Abilita il plugin \"Pianeti\""; +$a->strings["Submit"] = ""; diff --git a/krynn/lang/nb-no/strings.php b/krynn/lang/nb-no/strings.php new file mode 100644 index 000000000..628eb2aef --- /dev/null +++ b/krynn/lang/nb-no/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = ""; +$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Submit"] = "Lagre"; diff --git a/krynn/lang/pl/strings.php b/krynn/lang/pl/strings.php new file mode 100644 index 000000000..971200460 --- /dev/null +++ b/krynn/lang/pl/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = ""; +$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Submit"] = "Potwierdź"; diff --git a/krynn/lang/pt-br/strings.php b/krynn/lang/pt-br/strings.php new file mode 100644 index 000000000..5cb179c5d --- /dev/null +++ b/krynn/lang/pt-br/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Configuração dos planetas"; +$a->strings["Enable Planets Plugin"] = "Habilita configuração dos planetas"; +$a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/ro/messages.po b/krynn/lang/ro/messages.po new file mode 100644 index 000000000..67932a8b4 --- /dev/null +++ b/krynn/lang/ro/messages.po @@ -0,0 +1,32 @@ +# ADDON planets +# Copyright (C) +# This file is distributed under the same license as the Friendica planets addon package. +# +# +# Translators: +# Doru DEACONU , 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-11-27 14:16+0000\n" +"Last-Translator: Doru DEACONU \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" + +#: planets.php:150 +msgid "Planets Settings" +msgstr "Configurări Planets" + +#: planets.php:152 +msgid "Enable Planets Plugin" +msgstr "Activare Modul Planets" + +#: planets.php:158 +msgid "Submit" +msgstr "Trimite" diff --git a/krynn/lang/ro/strings.php b/krynn/lang/ro/strings.php new file mode 100644 index 000000000..93736aad8 --- /dev/null +++ b/krynn/lang/ro/strings.php @@ -0,0 +1,10 @@ +19)||(($n%100==0)&&($n!=0)))?2:1));; +}} +; +$a->strings["Planets Settings"] = "Configurări Planets"; +$a->strings["Enable Planets Plugin"] = "Activare Modul Planets"; +$a->strings["Submit"] = "Trimite"; diff --git a/krynn/lang/ru/strings.php b/krynn/lang/ru/strings.php new file mode 100644 index 000000000..1902b826f --- /dev/null +++ b/krynn/lang/ru/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = ""; +$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Submit"] = "Подтвердить"; diff --git a/krynn/lang/sv/strings.php b/krynn/lang/sv/strings.php new file mode 100644 index 000000000..3ec569a78 --- /dev/null +++ b/krynn/lang/sv/strings.php @@ -0,0 +1,3 @@ +strings["Submit"] = "Spara"; diff --git a/krynn/lang/zh-cn/strings.php b/krynn/lang/zh-cn/strings.php new file mode 100644 index 000000000..ac066c776 --- /dev/null +++ b/krynn/lang/zh-cn/strings.php @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "行星设置"; +$a->strings["Enable Planets Plugin"] = "使行星插件可用"; +$a->strings["Submit"] = "提交"; From 21a6ac9396966439b7f0cc600a91ae032059ce65 Mon Sep 17 00:00:00 2001 From: Dylan Thiedeke Date: Tue, 7 Jul 2015 10:46:09 +1000 Subject: [PATCH 02/10] Replace planet with krynn --- krynn/krynn.css-e | 14 +++ krynn/krynn.php | 2 +- krynn/krynn.php-e | 165 +++++++++++++++++++++++++++++++++ krynn/lang/C/messages.po | 14 +-- krynn/lang/C/messages.po-e | 30 ++++++ krynn/lang/ca/strings.php | 4 +- krynn/lang/ca/strings.php-e | 5 + krynn/lang/cs/messages.po | 18 ++-- krynn/lang/cs/messages.po-e | 32 +++++++ krynn/lang/cs/strings.php | 4 +- krynn/lang/cs/strings.php-e | 10 ++ krynn/lang/de/messages.po | 14 +-- krynn/lang/de/messages.po-e | 33 +++++++ krynn/lang/de/strings.php-e | 10 ++ krynn/lang/eo/strings.php-e | 5 + krynn/lang/es/strings.php-e | 5 + krynn/lang/fr/strings.php-e | 5 + krynn/lang/is/strings.php-e | 5 + krynn/lang/it/messages.po | 10 +- krynn/lang/it/messages.po-e | 32 +++++++ krynn/lang/it/strings.php-e | 10 ++ krynn/lang/nb-no/strings.php-e | 5 + krynn/lang/pl/strings.php-e | 5 + krynn/lang/pt-br/strings.php-e | 5 + krynn/lang/ro/messages.po | 10 +- krynn/lang/ro/messages.po-e | 32 +++++++ krynn/lang/ro/strings.php-e | 10 ++ krynn/lang/ru/strings.php-e | 5 + krynn/lang/sv/strings.php-e | 3 + krynn/lang/zh-cn/strings.php-e | 5 + 30 files changed, 469 insertions(+), 38 deletions(-) create mode 100755 krynn/krynn.css-e create mode 100755 krynn/krynn.php-e create mode 100644 krynn/lang/C/messages.po-e create mode 100644 krynn/lang/ca/strings.php-e create mode 100644 krynn/lang/cs/messages.po-e create mode 100644 krynn/lang/cs/strings.php-e create mode 100644 krynn/lang/de/messages.po-e create mode 100644 krynn/lang/de/strings.php-e create mode 100644 krynn/lang/eo/strings.php-e create mode 100644 krynn/lang/es/strings.php-e create mode 100644 krynn/lang/fr/strings.php-e create mode 100644 krynn/lang/is/strings.php-e create mode 100644 krynn/lang/it/messages.po-e create mode 100644 krynn/lang/it/strings.php-e create mode 100644 krynn/lang/nb-no/strings.php-e create mode 100644 krynn/lang/pl/strings.php-e create mode 100644 krynn/lang/pt-br/strings.php-e create mode 100644 krynn/lang/ro/messages.po-e create mode 100644 krynn/lang/ro/strings.php-e create mode 100644 krynn/lang/ru/strings.php-e create mode 100644 krynn/lang/sv/strings.php-e create mode 100644 krynn/lang/zh-cn/strings.php-e diff --git a/krynn/krynn.css-e b/krynn/krynn.css-e new file mode 100755 index 000000000..466a3ecd1 --- /dev/null +++ b/krynn/krynn.css-e @@ -0,0 +1,14 @@ + + + +#krynn-enable-label { + float: left; + width: 200px; + margin-bottom: 25px; +} + +#krynn-checkbox { + float: left; +} + + diff --git a/krynn/krynn.php b/krynn/krynn.php index 4f336d7b8..d9ec7fae5 100755 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -1,7 +1,7 @@ * Planets Author: Tony Baldwin diff --git a/krynn/krynn.php-e b/krynn/krynn.php-e new file mode 100755 index 000000000..4f336d7b8 --- /dev/null +++ b/krynn/krynn.php-e @@ -0,0 +1,165 @@ + + * Planets Author: Tony Baldwin + * Krynn modifications: Dylan Thiedeke + * + *"My body was my sacrifice... for my magic. This damage is permanent." - Raislin Majere + */ + + +function krynn_install() { + + /** + * + * Our demo plugin will attach in three places. + * The first is just prior to storing a local post. + * + */ + + register_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook'); + + /** + * + * Then we'll attach into the plugin settings page, and also the + * settings post hook so that we can create and update + * user preferences. + * + */ + + register_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings'); + register_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); + + logger("installed krynn"); +} + + +function krynn_uninstall() { + + /** + * + * uninstall unregisters any hooks created with register_hook + * during install. It may also delete configuration settings + * and any other cleanup. + * + */ + + unregister_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook'); + unregister_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings'); + unregister_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); + + + logger("removed krynn"); +} + + + +function krynn_post_hook($a, &$item) { + + /** + * + * An item was posted on the local system. + * We are going to look for specific items: + * - A status post by a profile owner + * - The profile owner must have allowed our plugin + * + */ + + logger('krynn invoked'); + + if(! local_user()) /* non-zero if this is a logged in user of this system */ + return; + + if(local_user() != $item['uid']) /* Does this person own the post? */ + return; + + if($item['parent']) /* If the item has a parent, this is a comment or something else, not a status post. */ + return; + + /* Retrieve our personal config setting */ + + $active = get_pconfig(local_user(), 'krynn', 'enable'); + + if(! $active) + return; + + /** + * + * OK, we're allowed to do our stuff. + * Here's what we are going to do: + * load the list of timezone names, and use that to generate a list of krynn locales. + * Then we'll pick one of those at random and put it in the "location" field for the post. + * + */ + + $krynn = array('Ansalon','Abanasinia','Solace','Haven','Gateway','Qualinost','Ankatavaka','Pax Tharkas','Ergoth','Newsea','Straights of Schallsea','Plains of Dust','Tarsis','Barren Hills','Que Shu','Citadel of Light','Solinari','Hedge Maze','Tower of High Sorcery','Inn of the Last Home','Last Heroes Tomb','Academy of Sorcery','Gods Row','Temple of Majere','Temple of Kiri-Jolith','Temple of Mishakal','Temple of Zeboim,','The Trough','Sad Town','Xak Tsaroth','ZHaman','SKullcap',); + + $planet = array_rand($krynn,1); + $item['location'] = $krynn[$planet]; + + return; +} + + + + +/** + * + * 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 krynn_settings_post($a,$post) { + if(! local_user()) + return; + if($_POST['krynn-submit']) + set_pconfig(local_user(),'krynn','enable',intval($_POST['krynn'])); +} + + +/** + * + * Called from the Plugin Setting form. + * Add our own settings info to the page. + * + */ + + + +function krynn_settings(&$a,&$s) { + + if(! local_user()) + return; + + /* Add our stylesheet to the page so we can make our settings look nice */ + + $a->page['htmlhead'] .= '' . "\r\n"; + + /* Get the current state of our config variable */ + + $enabled = get_pconfig(local_user(),'krynn','enable'); + + $checked = (($enabled) ? ' checked="checked" ' : ''); + + /* Add some HTML to the existing form */ + + $s .= '
'; + $s .= '

' . t('Krynn Settings') . '

'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + /* provide a submit button */ + + $s .= '
'; + +} + + diff --git a/krynn/lang/C/messages.po b/krynn/lang/C/messages.po index 843752a1d..0831b915a 100644 --- a/krynn/lang/C/messages.po +++ b/krynn/lang/C/messages.po @@ -1,6 +1,6 @@ -# ADDON planets +# ADDON krynn # Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. +# This file is distributed under the same license as the Friendica krynn addon package. # # #, fuzzy @@ -17,14 +17,14 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: planets.php:150 -msgid "Planets Settings" +#: krynn.php:150 +msgid "Krynn Settings" msgstr "" -#: planets.php:152 -msgid "Enable Planets Plugin" +#: krynn.php:152 +msgid "Enable Krynn Plugin" msgstr "" -#: planets.php:158 +#: krynn.php:158 msgid "Submit" msgstr "" diff --git a/krynn/lang/C/messages.po-e b/krynn/lang/C/messages.po-e new file mode 100644 index 000000000..0831b915a --- /dev/null +++ b/krynn/lang/C/messages.po-e @@ -0,0 +1,30 @@ +# ADDON krynn +# Copyright (C) +# This file is distributed under the same license as the Friendica krynn 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 \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: krynn.php:150 +msgid "Krynn Settings" +msgstr "" + +#: krynn.php:152 +msgid "Enable Krynn Plugin" +msgstr "" + +#: krynn.php:158 +msgid "Submit" +msgstr "" diff --git a/krynn/lang/ca/strings.php b/krynn/lang/ca/strings.php index 79fdd6be2..ec7bf8034 100644 --- a/krynn/lang/ca/strings.php +++ b/krynn/lang/ca/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = "Ajustos de Planet"; -$a->strings["Enable Planets Plugin"] = "Activa Plugin de Planet"; +$a->strings["Krynn Settings"] = "Ajustos de Krynn"; +$a->strings["Enable Krynn Plugin"] = "Activa Plugin de Krynn"; $a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/ca/strings.php-e b/krynn/lang/ca/strings.php-e new file mode 100644 index 000000000..ec7bf8034 --- /dev/null +++ b/krynn/lang/ca/strings.php-e @@ -0,0 +1,5 @@ +strings["Krynn Settings"] = "Ajustos de Krynn"; +$a->strings["Enable Krynn Plugin"] = "Activa Plugin de Krynn"; +$a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/cs/messages.po b/krynn/lang/cs/messages.po index c47ff06cd..69e803e3b 100644 --- a/krynn/lang/cs/messages.po +++ b/krynn/lang/cs/messages.po @@ -1,6 +1,6 @@ -# ADDON planets +# ADDON krynn # Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. +# This file is distributed under the same license as the Friendica krynn addon package. # # # Translators: @@ -19,14 +19,14 @@ msgstr "" "Language: cs\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: planets.php:150 -msgid "Planets Settings" -msgstr "Planets Nastavení" +#: krynn.php:150 +msgid "Krynn Settings" +msgstr "Krynn Nastavení" -#: planets.php:152 -msgid "Enable Planets Plugin" -msgstr "Povolit Planets plugin" +#: krynn.php:152 +msgid "Enable Krynn Plugin" +msgstr "Povolit Krynn plugin" -#: planets.php:158 +#: krynn.php:158 msgid "Submit" msgstr "Odeslat" diff --git a/krynn/lang/cs/messages.po-e b/krynn/lang/cs/messages.po-e new file mode 100644 index 000000000..69e803e3b --- /dev/null +++ b/krynn/lang/cs/messages.po-e @@ -0,0 +1,32 @@ +# ADDON krynn +# Copyright (C) +# This file is distributed under the same license as the Friendica krynn addon package. +# +# +# Translators: +# Michal Šupler , 2014-2015 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2015-02-11 19:37+0000\n" +"Last-Translator: Michal Šupler \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" + +#: krynn.php:150 +msgid "Krynn Settings" +msgstr "Krynn Nastavení" + +#: krynn.php:152 +msgid "Enable Krynn Plugin" +msgstr "Povolit Krynn plugin" + +#: krynn.php:158 +msgid "Submit" +msgstr "Odeslat" diff --git a/krynn/lang/cs/strings.php b/krynn/lang/cs/strings.php index 268f31921..e725ffc3e 100644 --- a/krynn/lang/cs/strings.php +++ b/krynn/lang/cs/strings.php @@ -5,6 +5,6 @@ function string_plural_select_cs($n){ return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; }} ; -$a->strings["Planets Settings"] = "Planets Nastavení"; -$a->strings["Enable Planets Plugin"] = "Povolit Planets plugin"; +$a->strings["Krynn Settings"] = "Krynn Nastavení"; +$a->strings["Enable Krynn Plugin"] = "Povolit Krynn plugin"; $a->strings["Submit"] = "Odeslat"; diff --git a/krynn/lang/cs/strings.php-e b/krynn/lang/cs/strings.php-e new file mode 100644 index 000000000..e725ffc3e --- /dev/null +++ b/krynn/lang/cs/strings.php-e @@ -0,0 +1,10 @@ +=2 && $n<=4) ? 1 : 2;; +}} +; +$a->strings["Krynn Settings"] = "Krynn Nastavení"; +$a->strings["Enable Krynn Plugin"] = "Povolit Krynn plugin"; +$a->strings["Submit"] = "Odeslat"; diff --git a/krynn/lang/de/messages.po b/krynn/lang/de/messages.po index 42788d569..12dceb311 100644 --- a/krynn/lang/de/messages.po +++ b/krynn/lang/de/messages.po @@ -1,6 +1,6 @@ -# ADDON planets +# ADDON Krynn # Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. +# This file is distributed under the same license as the Friendica Krynn addon package. # # # Translators: @@ -20,14 +20,14 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: planets.php:150 -msgid "Planets Settings" +#: Krynn.php:150 +msgid "Krynn Settings" msgstr "Planeten Einstellungen" -#: planets.php:152 -msgid "Enable Planets Plugin" +#: Krynn.php:152 +msgid "Enable Krynn Plugin" msgstr "Planeten-Plugin aktivieren" -#: planets.php:158 +#: Krynn.php:158 msgid "Submit" msgstr "Senden" diff --git a/krynn/lang/de/messages.po-e b/krynn/lang/de/messages.po-e new file mode 100644 index 000000000..12dceb311 --- /dev/null +++ b/krynn/lang/de/messages.po-e @@ -0,0 +1,33 @@ +# ADDON Krynn +# Copyright (C) +# This file is distributed under the same license as the Friendica Krynn addon package. +# +# +# Translators: +# Abrax , 2014 +# bavatar , 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-10-15 12:32+0000\n" +"Last-Translator: Abrax \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" + +#: Krynn.php:150 +msgid "Krynn Settings" +msgstr "Planeten Einstellungen" + +#: Krynn.php:152 +msgid "Enable Krynn Plugin" +msgstr "Planeten-Plugin aktivieren" + +#: Krynn.php:158 +msgid "Submit" +msgstr "Senden" diff --git a/krynn/lang/de/strings.php-e b/krynn/lang/de/strings.php-e new file mode 100644 index 000000000..ab513fac2 --- /dev/null +++ b/krynn/lang/de/strings.php-e @@ -0,0 +1,10 @@ +strings["Planets Settings"] = "Planeten Einstellungen"; +$a->strings["Enable Planets Plugin"] = "Planeten-Plugin aktivieren"; +$a->strings["Submit"] = "Senden"; diff --git a/krynn/lang/eo/strings.php-e b/krynn/lang/eo/strings.php-e new file mode 100644 index 000000000..2f9ff97cd --- /dev/null +++ b/krynn/lang/eo/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Agordo pri Planets"; +$a->strings["Enable Planets Plugin"] = "Ŝalti la Planets kromprogamon"; +$a->strings["Submit"] = "Sendi"; diff --git a/krynn/lang/es/strings.php-e b/krynn/lang/es/strings.php-e new file mode 100644 index 000000000..67b52dcd4 --- /dev/null +++ b/krynn/lang/es/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Configuración de Planets"; +$a->strings["Enable Planets Plugin"] = "Activar el módulo de planetas Planets"; +$a->strings["Submit"] = "Envíar"; diff --git a/krynn/lang/fr/strings.php-e b/krynn/lang/fr/strings.php-e new file mode 100644 index 000000000..505d24c34 --- /dev/null +++ b/krynn/lang/fr/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Réglages des Planets"; +$a->strings["Enable Planets Plugin"] = "Activer Planets"; +$a->strings["Submit"] = "Envoyer"; diff --git a/krynn/lang/is/strings.php-e b/krynn/lang/is/strings.php-e new file mode 100644 index 000000000..d59b838f2 --- /dev/null +++ b/krynn/lang/is/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = ""; +$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Submit"] = "Senda inn"; diff --git a/krynn/lang/it/messages.po b/krynn/lang/it/messages.po index 3740be8ff..20b7be17a 100644 --- a/krynn/lang/it/messages.po +++ b/krynn/lang/it/messages.po @@ -1,6 +1,6 @@ -# ADDON planets +# ADDON krynn # Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. +# This file is distributed under the same license as the Friendica krynn addon package. # # # Translators: @@ -19,14 +19,14 @@ msgstr "" "Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: planets.php:150 +#: krynn.php:150 msgid "Planets Settings" msgstr "Impostazioni \"Pianeti\"" -#: planets.php:152 +#: krynn.php:152 msgid "Enable Planets Plugin" msgstr "Abilita il plugin \"Pianeti\"" -#: planets.php:158 +#: krynn.php:158 msgid "Submit" msgstr "" diff --git a/krynn/lang/it/messages.po-e b/krynn/lang/it/messages.po-e new file mode 100644 index 000000000..3740be8ff --- /dev/null +++ b/krynn/lang/it/messages.po-e @@ -0,0 +1,32 @@ +# ADDON planets +# Copyright (C) +# This file is distributed under the same license as the Friendica planets addon package. +# +# +# Translators: +# fabrixxm , 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-10-15 09:01+0000\n" +"Last-Translator: fabrixxm \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" + +#: planets.php:150 +msgid "Planets Settings" +msgstr "Impostazioni \"Pianeti\"" + +#: planets.php:152 +msgid "Enable Planets Plugin" +msgstr "Abilita il plugin \"Pianeti\"" + +#: planets.php:158 +msgid "Submit" +msgstr "" diff --git a/krynn/lang/it/strings.php-e b/krynn/lang/it/strings.php-e new file mode 100644 index 000000000..635183fa4 --- /dev/null +++ b/krynn/lang/it/strings.php-e @@ -0,0 +1,10 @@ +strings["Planets Settings"] = "Impostazioni \"Pianeti\""; +$a->strings["Enable Planets Plugin"] = "Abilita il plugin \"Pianeti\""; +$a->strings["Submit"] = ""; diff --git a/krynn/lang/nb-no/strings.php-e b/krynn/lang/nb-no/strings.php-e new file mode 100644 index 000000000..628eb2aef --- /dev/null +++ b/krynn/lang/nb-no/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = ""; +$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Submit"] = "Lagre"; diff --git a/krynn/lang/pl/strings.php-e b/krynn/lang/pl/strings.php-e new file mode 100644 index 000000000..971200460 --- /dev/null +++ b/krynn/lang/pl/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = ""; +$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Submit"] = "Potwierdź"; diff --git a/krynn/lang/pt-br/strings.php-e b/krynn/lang/pt-br/strings.php-e new file mode 100644 index 000000000..5cb179c5d --- /dev/null +++ b/krynn/lang/pt-br/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "Configuração dos planetas"; +$a->strings["Enable Planets Plugin"] = "Habilita configuração dos planetas"; +$a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/ro/messages.po b/krynn/lang/ro/messages.po index 67932a8b4..df7a3806a 100644 --- a/krynn/lang/ro/messages.po +++ b/krynn/lang/ro/messages.po @@ -1,6 +1,6 @@ -# ADDON planets +# ADDON krynn # Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. +# This file is distributed under the same license as the Friendica krynn addon package. # # # Translators: @@ -19,14 +19,14 @@ msgstr "" "Language: ro_RO\n" "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" -#: planets.php:150 +#: krynn.php:150 msgid "Planets Settings" msgstr "Configurări Planets" -#: planets.php:152 +#: krynn.php:152 msgid "Enable Planets Plugin" msgstr "Activare Modul Planets" -#: planets.php:158 +#: krynn.php:158 msgid "Submit" msgstr "Trimite" diff --git a/krynn/lang/ro/messages.po-e b/krynn/lang/ro/messages.po-e new file mode 100644 index 000000000..67932a8b4 --- /dev/null +++ b/krynn/lang/ro/messages.po-e @@ -0,0 +1,32 @@ +# ADDON planets +# Copyright (C) +# This file is distributed under the same license as the Friendica planets addon package. +# +# +# Translators: +# Doru DEACONU , 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-11-27 14:16+0000\n" +"Last-Translator: Doru DEACONU \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" + +#: planets.php:150 +msgid "Planets Settings" +msgstr "Configurări Planets" + +#: planets.php:152 +msgid "Enable Planets Plugin" +msgstr "Activare Modul Planets" + +#: planets.php:158 +msgid "Submit" +msgstr "Trimite" diff --git a/krynn/lang/ro/strings.php-e b/krynn/lang/ro/strings.php-e new file mode 100644 index 000000000..93736aad8 --- /dev/null +++ b/krynn/lang/ro/strings.php-e @@ -0,0 +1,10 @@ +19)||(($n%100==0)&&($n!=0)))?2:1));; +}} +; +$a->strings["Planets Settings"] = "Configurări Planets"; +$a->strings["Enable Planets Plugin"] = "Activare Modul Planets"; +$a->strings["Submit"] = "Trimite"; diff --git a/krynn/lang/ru/strings.php-e b/krynn/lang/ru/strings.php-e new file mode 100644 index 000000000..1902b826f --- /dev/null +++ b/krynn/lang/ru/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = ""; +$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Submit"] = "Подтвердить"; diff --git a/krynn/lang/sv/strings.php-e b/krynn/lang/sv/strings.php-e new file mode 100644 index 000000000..3ec569a78 --- /dev/null +++ b/krynn/lang/sv/strings.php-e @@ -0,0 +1,3 @@ +strings["Submit"] = "Spara"; diff --git a/krynn/lang/zh-cn/strings.php-e b/krynn/lang/zh-cn/strings.php-e new file mode 100644 index 000000000..ac066c776 --- /dev/null +++ b/krynn/lang/zh-cn/strings.php-e @@ -0,0 +1,5 @@ +strings["Planets Settings"] = "行星设置"; +$a->strings["Enable Planets Plugin"] = "使行星插件可用"; +$a->strings["Submit"] = "提交"; From 6a9e0c040445376849a849605f685904ae1be832 Mon Sep 17 00:00:00 2001 From: Dylan Thiedeke Date: Tue, 7 Jul 2015 11:03:34 +1000 Subject: [PATCH 03/10] Fixed Language files to reflect plugin name --- krynn/krynn.css-e | 14 --- krynn/krynn.php | 2 +- krynn/krynn.php-e | 165 --------------------------------- krynn/lang/C/messages.po-e | 30 ------ krynn/lang/ca/strings.php-e | 5 - krynn/lang/cs/messages.po-e | 32 ------- krynn/lang/cs/strings.php-e | 10 -- krynn/lang/de/messages.po-e | 33 ------- krynn/lang/de/strings.php | 4 +- krynn/lang/de/strings.php-e | 10 -- krynn/lang/eo/strings.php | 4 +- krynn/lang/eo/strings.php-e | 5 - krynn/lang/es/strings.php | 4 +- krynn/lang/es/strings.php-e | 5 - krynn/lang/fr/strings.php | 4 +- krynn/lang/fr/strings.php-e | 5 - krynn/lang/is/strings.php | 4 +- krynn/lang/is/strings.php-e | 5 - krynn/lang/it/messages.po | 4 +- krynn/lang/it/messages.po-e | 32 ------- krynn/lang/it/strings.php | 4 +- krynn/lang/it/strings.php-e | 10 -- krynn/lang/nb-no/strings.php | 4 +- krynn/lang/nb-no/strings.php-e | 5 - krynn/lang/pl/strings.php | 4 +- krynn/lang/pl/strings.php-e | 5 - krynn/lang/pt-br/strings.php | 4 +- krynn/lang/pt-br/strings.php-e | 5 - krynn/lang/ro/messages.po | 8 +- krynn/lang/ro/messages.po-e | 32 ------- krynn/lang/ro/strings.php | 4 +- krynn/lang/ro/strings.php-e | 10 -- krynn/lang/ru/strings.php | 4 +- krynn/lang/ru/strings.php-e | 5 - krynn/lang/sv/strings.php-e | 3 - krynn/lang/zh-cn/strings.php | 4 +- krynn/lang/zh-cn/strings.php-e | 5 - 37 files changed, 31 insertions(+), 462 deletions(-) delete mode 100755 krynn/krynn.css-e delete mode 100755 krynn/krynn.php-e delete mode 100644 krynn/lang/C/messages.po-e delete mode 100644 krynn/lang/ca/strings.php-e delete mode 100644 krynn/lang/cs/messages.po-e delete mode 100644 krynn/lang/cs/strings.php-e delete mode 100644 krynn/lang/de/messages.po-e delete mode 100644 krynn/lang/de/strings.php-e delete mode 100644 krynn/lang/eo/strings.php-e delete mode 100644 krynn/lang/es/strings.php-e delete mode 100644 krynn/lang/fr/strings.php-e delete mode 100644 krynn/lang/is/strings.php-e delete mode 100644 krynn/lang/it/messages.po-e delete mode 100644 krynn/lang/it/strings.php-e delete mode 100644 krynn/lang/nb-no/strings.php-e delete mode 100644 krynn/lang/pl/strings.php-e delete mode 100644 krynn/lang/pt-br/strings.php-e delete mode 100644 krynn/lang/ro/messages.po-e delete mode 100644 krynn/lang/ro/strings.php-e delete mode 100644 krynn/lang/ru/strings.php-e delete mode 100644 krynn/lang/sv/strings.php-e delete mode 100644 krynn/lang/zh-cn/strings.php-e diff --git a/krynn/krynn.css-e b/krynn/krynn.css-e deleted file mode 100755 index 466a3ecd1..000000000 --- a/krynn/krynn.css-e +++ /dev/null @@ -1,14 +0,0 @@ - - - -#krynn-enable-label { - float: left; - width: 200px; - margin-bottom: 25px; -} - -#krynn-checkbox { - float: left; -} - - diff --git a/krynn/krynn.php b/krynn/krynn.php index d9ec7fae5..bfc9e42fc 100755 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -7,7 +7,7 @@ * Planets Author: Tony Baldwin * Krynn modifications: Dylan Thiedeke * - *"My body was my sacrifice... for my magic. This damage is permanent." - Raislin Majere + *"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere */ diff --git a/krynn/krynn.php-e b/krynn/krynn.php-e deleted file mode 100755 index 4f336d7b8..000000000 --- a/krynn/krynn.php-e +++ /dev/null @@ -1,165 +0,0 @@ - - * Planets Author: Tony Baldwin - * Krynn modifications: Dylan Thiedeke - * - *"My body was my sacrifice... for my magic. This damage is permanent." - Raislin Majere - */ - - -function krynn_install() { - - /** - * - * Our demo plugin will attach in three places. - * The first is just prior to storing a local post. - * - */ - - register_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook'); - - /** - * - * Then we'll attach into the plugin settings page, and also the - * settings post hook so that we can create and update - * user preferences. - * - */ - - register_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings'); - register_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); - - logger("installed krynn"); -} - - -function krynn_uninstall() { - - /** - * - * uninstall unregisters any hooks created with register_hook - * during install. It may also delete configuration settings - * and any other cleanup. - * - */ - - unregister_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook'); - unregister_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings'); - unregister_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); - - - logger("removed krynn"); -} - - - -function krynn_post_hook($a, &$item) { - - /** - * - * An item was posted on the local system. - * We are going to look for specific items: - * - A status post by a profile owner - * - The profile owner must have allowed our plugin - * - */ - - logger('krynn invoked'); - - if(! local_user()) /* non-zero if this is a logged in user of this system */ - return; - - if(local_user() != $item['uid']) /* Does this person own the post? */ - return; - - if($item['parent']) /* If the item has a parent, this is a comment or something else, not a status post. */ - return; - - /* Retrieve our personal config setting */ - - $active = get_pconfig(local_user(), 'krynn', 'enable'); - - if(! $active) - return; - - /** - * - * OK, we're allowed to do our stuff. - * Here's what we are going to do: - * load the list of timezone names, and use that to generate a list of krynn locales. - * Then we'll pick one of those at random and put it in the "location" field for the post. - * - */ - - $krynn = array('Ansalon','Abanasinia','Solace','Haven','Gateway','Qualinost','Ankatavaka','Pax Tharkas','Ergoth','Newsea','Straights of Schallsea','Plains of Dust','Tarsis','Barren Hills','Que Shu','Citadel of Light','Solinari','Hedge Maze','Tower of High Sorcery','Inn of the Last Home','Last Heroes Tomb','Academy of Sorcery','Gods Row','Temple of Majere','Temple of Kiri-Jolith','Temple of Mishakal','Temple of Zeboim,','The Trough','Sad Town','Xak Tsaroth','ZHaman','SKullcap',); - - $planet = array_rand($krynn,1); - $item['location'] = $krynn[$planet]; - - return; -} - - - - -/** - * - * 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 krynn_settings_post($a,$post) { - if(! local_user()) - return; - if($_POST['krynn-submit']) - set_pconfig(local_user(),'krynn','enable',intval($_POST['krynn'])); -} - - -/** - * - * Called from the Plugin Setting form. - * Add our own settings info to the page. - * - */ - - - -function krynn_settings(&$a,&$s) { - - if(! local_user()) - return; - - /* Add our stylesheet to the page so we can make our settings look nice */ - - $a->page['htmlhead'] .= '' . "\r\n"; - - /* Get the current state of our config variable */ - - $enabled = get_pconfig(local_user(),'krynn','enable'); - - $checked = (($enabled) ? ' checked="checked" ' : ''); - - /* Add some HTML to the existing form */ - - $s .= '
'; - $s .= '

' . t('Krynn Settings') . '

'; - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - /* provide a submit button */ - - $s .= '
'; - -} - - diff --git a/krynn/lang/C/messages.po-e b/krynn/lang/C/messages.po-e deleted file mode 100644 index 0831b915a..000000000 --- a/krynn/lang/C/messages.po-e +++ /dev/null @@ -1,30 +0,0 @@ -# ADDON krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica krynn 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 \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: krynn.php:150 -msgid "Krynn Settings" -msgstr "" - -#: krynn.php:152 -msgid "Enable Krynn Plugin" -msgstr "" - -#: krynn.php:158 -msgid "Submit" -msgstr "" diff --git a/krynn/lang/ca/strings.php-e b/krynn/lang/ca/strings.php-e deleted file mode 100644 index ec7bf8034..000000000 --- a/krynn/lang/ca/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Krynn Settings"] = "Ajustos de Krynn"; -$a->strings["Enable Krynn Plugin"] = "Activa Plugin de Krynn"; -$a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/cs/messages.po-e b/krynn/lang/cs/messages.po-e deleted file mode 100644 index 69e803e3b..000000000 --- a/krynn/lang/cs/messages.po-e +++ /dev/null @@ -1,32 +0,0 @@ -# ADDON krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica krynn addon package. -# -# -# Translators: -# Michal Šupler , 2014-2015 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:37+0000\n" -"Last-Translator: Michal Šupler \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" - -#: krynn.php:150 -msgid "Krynn Settings" -msgstr "Krynn Nastavení" - -#: krynn.php:152 -msgid "Enable Krynn Plugin" -msgstr "Povolit Krynn plugin" - -#: krynn.php:158 -msgid "Submit" -msgstr "Odeslat" diff --git a/krynn/lang/cs/strings.php-e b/krynn/lang/cs/strings.php-e deleted file mode 100644 index e725ffc3e..000000000 --- a/krynn/lang/cs/strings.php-e +++ /dev/null @@ -1,10 +0,0 @@ -=2 && $n<=4) ? 1 : 2;; -}} -; -$a->strings["Krynn Settings"] = "Krynn Nastavení"; -$a->strings["Enable Krynn Plugin"] = "Povolit Krynn plugin"; -$a->strings["Submit"] = "Odeslat"; diff --git a/krynn/lang/de/messages.po-e b/krynn/lang/de/messages.po-e deleted file mode 100644 index 12dceb311..000000000 --- a/krynn/lang/de/messages.po-e +++ /dev/null @@ -1,33 +0,0 @@ -# ADDON Krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica Krynn addon package. -# -# -# Translators: -# Abrax , 2014 -# bavatar , 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-10-15 12:32+0000\n" -"Last-Translator: Abrax \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" - -#: Krynn.php:150 -msgid "Krynn Settings" -msgstr "Planeten Einstellungen" - -#: Krynn.php:152 -msgid "Enable Krynn Plugin" -msgstr "Planeten-Plugin aktivieren" - -#: Krynn.php:158 -msgid "Submit" -msgstr "Senden" diff --git a/krynn/lang/de/strings.php b/krynn/lang/de/strings.php index ab513fac2..74b5e9f92 100644 --- a/krynn/lang/de/strings.php +++ b/krynn/lang/de/strings.php @@ -5,6 +5,6 @@ function string_plural_select_de($n){ return ($n != 1);; }} ; -$a->strings["Planets Settings"] = "Planeten Einstellungen"; -$a->strings["Enable Planets Plugin"] = "Planeten-Plugin aktivieren"; +$a->strings["Krynn Settings"] = "Krynn Einstellungen"; +$a->strings["Enable Krynn Plugin"] = "Krynn-Plugin aktivieren"; $a->strings["Submit"] = "Senden"; diff --git a/krynn/lang/de/strings.php-e b/krynn/lang/de/strings.php-e deleted file mode 100644 index ab513fac2..000000000 --- a/krynn/lang/de/strings.php-e +++ /dev/null @@ -1,10 +0,0 @@ -strings["Planets Settings"] = "Planeten Einstellungen"; -$a->strings["Enable Planets Plugin"] = "Planeten-Plugin aktivieren"; -$a->strings["Submit"] = "Senden"; diff --git a/krynn/lang/eo/strings.php b/krynn/lang/eo/strings.php index 2f9ff97cd..8b8dd24af 100644 --- a/krynn/lang/eo/strings.php +++ b/krynn/lang/eo/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = "Agordo pri Planets"; -$a->strings["Enable Planets Plugin"] = "Ŝalti la Planets kromprogamon"; +$a->strings["Krynn Settings"] = "Agordo pri Krynn"; +$a->strings["Enable Krynn Plugin"] = "Ŝalti la Krynn kromprogamon"; $a->strings["Submit"] = "Sendi"; diff --git a/krynn/lang/eo/strings.php-e b/krynn/lang/eo/strings.php-e deleted file mode 100644 index 2f9ff97cd..000000000 --- a/krynn/lang/eo/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = "Agordo pri Planets"; -$a->strings["Enable Planets Plugin"] = "Ŝalti la Planets kromprogamon"; -$a->strings["Submit"] = "Sendi"; diff --git a/krynn/lang/es/strings.php b/krynn/lang/es/strings.php index 67b52dcd4..3369d1b4b 100644 --- a/krynn/lang/es/strings.php +++ b/krynn/lang/es/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = "Configuración de Planets"; -$a->strings["Enable Planets Plugin"] = "Activar el módulo de planetas Planets"; +$a->strings["Krynn Settings"] = "Configuración de Krynn"; +$a->strings["Enable Krynn Plugin"] = "Activar el módulo de planetas Krynn"; $a->strings["Submit"] = "Envíar"; diff --git a/krynn/lang/es/strings.php-e b/krynn/lang/es/strings.php-e deleted file mode 100644 index 67b52dcd4..000000000 --- a/krynn/lang/es/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = "Configuración de Planets"; -$a->strings["Enable Planets Plugin"] = "Activar el módulo de planetas Planets"; -$a->strings["Submit"] = "Envíar"; diff --git a/krynn/lang/fr/strings.php b/krynn/lang/fr/strings.php index 505d24c34..601f95021 100644 --- a/krynn/lang/fr/strings.php +++ b/krynn/lang/fr/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = "Réglages des Planets"; -$a->strings["Enable Planets Plugin"] = "Activer Planets"; +$a->strings["Krynn Settings"] = "Réglages des Krynn"; +$a->strings["Enable Krynn Plugin"] = "Activer Krynn"; $a->strings["Submit"] = "Envoyer"; diff --git a/krynn/lang/fr/strings.php-e b/krynn/lang/fr/strings.php-e deleted file mode 100644 index 505d24c34..000000000 --- a/krynn/lang/fr/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = "Réglages des Planets"; -$a->strings["Enable Planets Plugin"] = "Activer Planets"; -$a->strings["Submit"] = "Envoyer"; diff --git a/krynn/lang/is/strings.php b/krynn/lang/is/strings.php index d59b838f2..976a601e6 100644 --- a/krynn/lang/is/strings.php +++ b/krynn/lang/is/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = ""; -$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Krynn Settings"] = ""; +$a->strings["Enable Krynn Plugin"] = ""; $a->strings["Submit"] = "Senda inn"; diff --git a/krynn/lang/is/strings.php-e b/krynn/lang/is/strings.php-e deleted file mode 100644 index d59b838f2..000000000 --- a/krynn/lang/is/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = ""; -$a->strings["Enable Planets Plugin"] = ""; -$a->strings["Submit"] = "Senda inn"; diff --git a/krynn/lang/it/messages.po b/krynn/lang/it/messages.po index 20b7be17a..2dbfa3c79 100644 --- a/krynn/lang/it/messages.po +++ b/krynn/lang/it/messages.po @@ -20,11 +20,11 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: krynn.php:150 -msgid "Planets Settings" +msgid "Krynn Settings" msgstr "Impostazioni \"Pianeti\"" #: krynn.php:152 -msgid "Enable Planets Plugin" +msgid "Enable Krynn Plugin" msgstr "Abilita il plugin \"Pianeti\"" #: krynn.php:158 diff --git a/krynn/lang/it/messages.po-e b/krynn/lang/it/messages.po-e deleted file mode 100644 index 3740be8ff..000000000 --- a/krynn/lang/it/messages.po-e +++ /dev/null @@ -1,32 +0,0 @@ -# ADDON planets -# Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. -# -# -# Translators: -# fabrixxm , 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-10-15 09:01+0000\n" -"Last-Translator: fabrixxm \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" - -#: planets.php:150 -msgid "Planets Settings" -msgstr "Impostazioni \"Pianeti\"" - -#: planets.php:152 -msgid "Enable Planets Plugin" -msgstr "Abilita il plugin \"Pianeti\"" - -#: planets.php:158 -msgid "Submit" -msgstr "" diff --git a/krynn/lang/it/strings.php b/krynn/lang/it/strings.php index 635183fa4..9e4d70373 100644 --- a/krynn/lang/it/strings.php +++ b/krynn/lang/it/strings.php @@ -5,6 +5,6 @@ function string_plural_select_it($n){ return ($n != 1);; }} ; -$a->strings["Planets Settings"] = "Impostazioni \"Pianeti\""; -$a->strings["Enable Planets Plugin"] = "Abilita il plugin \"Pianeti\""; +$a->strings["Krynn Settings"] = "Impostazioni \"Kryn"; +$a->strings["Enable Krynn Plugin"] = "Abilita il plugin \"Krynn\""; $a->strings["Submit"] = ""; diff --git a/krynn/lang/it/strings.php-e b/krynn/lang/it/strings.php-e deleted file mode 100644 index 635183fa4..000000000 --- a/krynn/lang/it/strings.php-e +++ /dev/null @@ -1,10 +0,0 @@ -strings["Planets Settings"] = "Impostazioni \"Pianeti\""; -$a->strings["Enable Planets Plugin"] = "Abilita il plugin \"Pianeti\""; -$a->strings["Submit"] = ""; diff --git a/krynn/lang/nb-no/strings.php b/krynn/lang/nb-no/strings.php index 628eb2aef..06ad32cb5 100644 --- a/krynn/lang/nb-no/strings.php +++ b/krynn/lang/nb-no/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = ""; -$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Krynn Settings"] = ""; +$a->strings["Enable Krynn Plugin"] = ""; $a->strings["Submit"] = "Lagre"; diff --git a/krynn/lang/nb-no/strings.php-e b/krynn/lang/nb-no/strings.php-e deleted file mode 100644 index 628eb2aef..000000000 --- a/krynn/lang/nb-no/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = ""; -$a->strings["Enable Planets Plugin"] = ""; -$a->strings["Submit"] = "Lagre"; diff --git a/krynn/lang/pl/strings.php b/krynn/lang/pl/strings.php index 971200460..239001b17 100644 --- a/krynn/lang/pl/strings.php +++ b/krynn/lang/pl/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = ""; -$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Krynn Settings"] = ""; +$a->strings["Enable Krynn Plugin"] = ""; $a->strings["Submit"] = "Potwierdź"; diff --git a/krynn/lang/pl/strings.php-e b/krynn/lang/pl/strings.php-e deleted file mode 100644 index 971200460..000000000 --- a/krynn/lang/pl/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = ""; -$a->strings["Enable Planets Plugin"] = ""; -$a->strings["Submit"] = "Potwierdź"; diff --git a/krynn/lang/pt-br/strings.php b/krynn/lang/pt-br/strings.php index 5cb179c5d..a3b2d663a 100644 --- a/krynn/lang/pt-br/strings.php +++ b/krynn/lang/pt-br/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = "Configuração dos planetas"; -$a->strings["Enable Planets Plugin"] = "Habilita configuração dos planetas"; +$a->strings["Krynn Settings"] = "Configuração dos Krynn"; +$a->strings["Enable Krynn Plugin"] = "Habilita configuração dos Krynn"; $a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/pt-br/strings.php-e b/krynn/lang/pt-br/strings.php-e deleted file mode 100644 index 5cb179c5d..000000000 --- a/krynn/lang/pt-br/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = "Configuração dos planetas"; -$a->strings["Enable Planets Plugin"] = "Habilita configuração dos planetas"; -$a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/ro/messages.po b/krynn/lang/ro/messages.po index df7a3806a..2e629e1ce 100644 --- a/krynn/lang/ro/messages.po +++ b/krynn/lang/ro/messages.po @@ -20,12 +20,12 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" #: krynn.php:150 -msgid "Planets Settings" -msgstr "Configurări Planets" +msgid "Krynn Settings" +msgstr "Configurări Krynn" #: krynn.php:152 -msgid "Enable Planets Plugin" -msgstr "Activare Modul Planets" +msgid "Enable Krynn Plugin" +msgstr "Activare Modul Krynn" #: krynn.php:158 msgid "Submit" diff --git a/krynn/lang/ro/messages.po-e b/krynn/lang/ro/messages.po-e deleted file mode 100644 index 67932a8b4..000000000 --- a/krynn/lang/ro/messages.po-e +++ /dev/null @@ -1,32 +0,0 @@ -# ADDON planets -# Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. -# -# -# Translators: -# Doru DEACONU , 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-11-27 14:16+0000\n" -"Last-Translator: Doru DEACONU \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" - -#: planets.php:150 -msgid "Planets Settings" -msgstr "Configurări Planets" - -#: planets.php:152 -msgid "Enable Planets Plugin" -msgstr "Activare Modul Planets" - -#: planets.php:158 -msgid "Submit" -msgstr "Trimite" diff --git a/krynn/lang/ro/strings.php b/krynn/lang/ro/strings.php index 93736aad8..88a84ee89 100644 --- a/krynn/lang/ro/strings.php +++ b/krynn/lang/ro/strings.php @@ -5,6 +5,6 @@ function string_plural_select_ro($n){ return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));; }} ; -$a->strings["Planets Settings"] = "Configurări Planets"; -$a->strings["Enable Planets Plugin"] = "Activare Modul Planets"; +$a->strings["Krynn Settings"] = "Configurări Krynn"; +$a->strings["Enable Krynn Plugin"] = "Activare Modul Krynn"; $a->strings["Submit"] = "Trimite"; diff --git a/krynn/lang/ro/strings.php-e b/krynn/lang/ro/strings.php-e deleted file mode 100644 index 93736aad8..000000000 --- a/krynn/lang/ro/strings.php-e +++ /dev/null @@ -1,10 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))?2:1));; -}} -; -$a->strings["Planets Settings"] = "Configurări Planets"; -$a->strings["Enable Planets Plugin"] = "Activare Modul Planets"; -$a->strings["Submit"] = "Trimite"; diff --git a/krynn/lang/ru/strings.php b/krynn/lang/ru/strings.php index 1902b826f..8fd1069bf 100644 --- a/krynn/lang/ru/strings.php +++ b/krynn/lang/ru/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = ""; -$a->strings["Enable Planets Plugin"] = ""; +$a->strings["Krynn Settings"] = ""; +$a->strings["Enable Krynn Plugin"] = ""; $a->strings["Submit"] = "Подтвердить"; diff --git a/krynn/lang/ru/strings.php-e b/krynn/lang/ru/strings.php-e deleted file mode 100644 index 1902b826f..000000000 --- a/krynn/lang/ru/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = ""; -$a->strings["Enable Planets Plugin"] = ""; -$a->strings["Submit"] = "Подтвердить"; diff --git a/krynn/lang/sv/strings.php-e b/krynn/lang/sv/strings.php-e deleted file mode 100644 index 3ec569a78..000000000 --- a/krynn/lang/sv/strings.php-e +++ /dev/null @@ -1,3 +0,0 @@ -strings["Submit"] = "Spara"; diff --git a/krynn/lang/zh-cn/strings.php b/krynn/lang/zh-cn/strings.php index ac066c776..dcbfbeb73 100644 --- a/krynn/lang/zh-cn/strings.php +++ b/krynn/lang/zh-cn/strings.php @@ -1,5 +1,5 @@ strings["Planets Settings"] = "行星设置"; -$a->strings["Enable Planets Plugin"] = "使行星插件可用"; +$a->strings["Krynn Settings"] = "行星设置"; +$a->strings["Enable Krynn Plugin"] = "使行星插件可用"; $a->strings["Submit"] = "提交"; diff --git a/krynn/lang/zh-cn/strings.php-e b/krynn/lang/zh-cn/strings.php-e deleted file mode 100644 index ac066c776..000000000 --- a/krynn/lang/zh-cn/strings.php-e +++ /dev/null @@ -1,5 +0,0 @@ -strings["Planets Settings"] = "行星设置"; -$a->strings["Enable Planets Plugin"] = "使行星插件可用"; -$a->strings["Submit"] = "提交"; From e8b6618c1436a29a965d8081ffdc28f18e7efe44 Mon Sep 17 00:00:00 2001 From: Dylan Thiedeke Date: Tue, 7 Jul 2015 11:25:04 +1000 Subject: [PATCH 04/10] Fixed spelling in krynn.php --- krynn/krynn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krynn/krynn.php b/krynn/krynn.php index bfc9e42fc..2a2911048 100755 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -1,6 +1,6 @@ From 8190ad724ef9ebb20de52aa87a3d7e460686d351 Mon Sep 17 00:00:00 2001 From: Dylan Thiedeke Date: Tue, 7 Jul 2015 11:26:49 +1000 Subject: [PATCH 05/10] Fixed locale spelling --- krynn/krynn.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krynn/krynn.php b/krynn/krynn.php index 2a2911048..fb75689ce 100755 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -1,7 +1,7 @@ * Planets Author: Tony Baldwin @@ -95,7 +95,7 @@ function krynn_post_hook($a, &$item) { * */ - $krynn = array('Ansalon','Abanasinia','Solace','Haven','Gateway','Qualinost','Ankatavaka','Pax Tharkas','Ergoth','Newsea','Straights of Schallsea','Plains of Dust','Tarsis','Barren Hills','Que Shu','Citadel of Light','Solinari','Hedge Maze','Tower of High Sorcery','Inn of the Last Home','Last Heroes Tomb','Academy of Sorcery','Gods Row','Temple of Majere','Temple of Kiri-Jolith','Temple of Mishakal','Temple of Zeboim,','The Trough','Sad Town','Xak Tsaroth','ZHaman','SKullcap',); + $krynn = array('Ansalon','Abanasinia','Solace','Haven','Gateway','Qualinost','Ankatavaka','Pax Tharkas','Ergoth','Newsea','Straights of Schallsea','Plains of Dust','Tarsis','Barren Hills','Que Shu','Citadel of Light','Solinari','Hedge Maze','Tower of High Sorcery','Inn of the Last Home','Last Heroes Tomb','Academy of Sorcery','Gods Row','Temple of Majere','Temple of Kiri-Jolith','Temple of Mishakal','Temple of Zeboim,','The Trough','Sad Town','Xak Tsaroth','Zhaman','Skullcap',); $planet = array_rand($krynn,1); $item['location'] = $krynn[$planet]; From 5b804ab5c155e970159ea263a7147b2402056cbf Mon Sep 17 00:00:00 2001 From: Dylan Thiedeke Date: Tue, 7 Jul 2015 12:14:08 +1000 Subject: [PATCH 06/10] edit krynn.php --- krynn/krynn.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krynn/krynn.php b/krynn/krynn.php index fb75689ce..19bc39d98 100755 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -1,7 +1,7 @@ * Planets Author: Tony Baldwin @@ -95,7 +95,7 @@ function krynn_post_hook($a, &$item) { * */ - $krynn = array('Ansalon','Abanasinia','Solace','Haven','Gateway','Qualinost','Ankatavaka','Pax Tharkas','Ergoth','Newsea','Straights of Schallsea','Plains of Dust','Tarsis','Barren Hills','Que Shu','Citadel of Light','Solinari','Hedge Maze','Tower of High Sorcery','Inn of the Last Home','Last Heroes Tomb','Academy of Sorcery','Gods Row','Temple of Majere','Temple of Kiri-Jolith','Temple of Mishakal','Temple of Zeboim,','The Trough','Sad Town','Xak Tsaroth','Zhaman','Skullcap',); + $krynn = array('Ansalon','Abanasinia','Solace','Haven','Gateway','Qualinost','Ankatavaka','Pax Tharkas','Ergoth','Newsea','Straights of Schallsea','Plains of Dust','Tarsis','Barren Hills','Que Shu','Citadel of Light','Solinari','Hedge Maze','Tower of High Sorcery','Inn of the Last Home','Last Heroes Tomb','Academy of Sorcery','Gods Row','Temple of Majere','Temple of Kiri-Jolith','Temple of Mishakal','Temple of Zeboim,','The Trough','Sad Town','Xak Tsaroth','Zhaman','Skullcap','Saifhum','Karthay','Mithas','Kothas','Silver Dragon Mountain','Silvanesti'); $planet = array_rand($krynn,1); $item['location'] = $krynn[$planet]; From 3c38480998b6a3a23159a70a6d1df675c6f03148 Mon Sep 17 00:00:00 2001 From: Dylan Thiedeke Date: Tue, 7 Jul 2015 15:36:23 +1000 Subject: [PATCH 07/10] Fixed Author context in krynn.php --- krynn/krynn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krynn/krynn.php b/krynn/krynn.php index 19bc39d98..f61538427 100755 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -5,7 +5,7 @@ * Version: 1.0 * Planets Author: Mike Macgirvin * Planets Author: Tony Baldwin - * Krynn modifications: Dylan Thiedeke + * Kryn Authoer: Dylan Thiedeke * *"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere */ From da02eb1b10c78a5b0e1145a669b7bbede30a34de Mon Sep 17 00:00:00 2001 From: Dylan Thiedeke Date: Tue, 7 Jul 2015 16:06:41 +1000 Subject: [PATCH 08/10] Added HTML code for minimized setting header --- krynn/krynn.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/krynn/krynn.php b/krynn/krynn.php index f61538427..530764beb 100755 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -149,7 +149,16 @@ function krynn_settings(&$a,&$s) { /* Add some HTML to the existing form */ - $s .= '
'; + $s .= ''; + $s .= '

' . t('Krynn') . '

'; + $s .= '
'; + $s .= '';