- Feature: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@921830 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-05-27 19:07:11 +00:00
parent 6a2688058d
commit c908a92b38
8 changed files with 122 additions and 57 deletions

View file

@ -411,7 +411,7 @@ class Class_FootnotesSettings
add_settings_section("Footnote_Secion_Settings_General", sprintf(__("%s Settings", FOOTNOTES_PLUGIN_NAME), FOOTNOTES_PLUGIN_PUBLIC_NAME), array($this, 'RegisterTab_General_Description'), FOOTNOTE_SETTINGS_LABEL_GENERAL);
add_meta_box('Register_MetaBox_ReferenceContainer', __("References Container", FOOTNOTES_PLUGIN_NAME), array($this, 'Register_MetaBox_ReferenceContainer'), FOOTNOTE_SETTINGS_LABEL_GENERAL, 'main');
add_meta_box('Register_MetaBox_FootnoteStyling', sprintf(__("%s styling", FOOTNOTES_PLUGIN_NAME), FOOTNOTES_PLUGIN_PUBLIC_NAME), array($this, 'Register_MetaBox_FootnoteStyling'), FOOTNOTE_SETTINGS_LABEL_GENERAL, 'main');
add_meta_box('Register_MetaBox_Love', FOOTNOTES_PLUGIN_PUBLIC_NAME . '&nbsp;<span style="color:#ff6d3b; font-weight:bold;">&hearts;</span>', array($this, 'Register_MetaBox_Love'), FOOTNOTE_SETTINGS_LABEL_GENERAL, 'main');
add_meta_box('Register_MetaBox_Love', FOOTNOTES_PLUGIN_PUBLIC_NAME . '&nbsp;' . FOOTNOTES_LOVE_SYMBOL, array($this, 'Register_MetaBox_Love'), FOOTNOTE_SETTINGS_LABEL_GENERAL, 'main');
add_meta_box('Register_MetaBox_Other', __("Other", FOOTNOTES_PLUGIN_NAME), array($this, 'Register_MetaBox_Other'), FOOTNOTE_SETTINGS_LABEL_GENERAL, 'main');
}
@ -519,8 +519,11 @@ class Class_FootnotesSettings
{
/* setting for 'love and share this plugin in my footer' */
$l_arr_Options = array(
"yes" => __("Yes", FOOTNOTES_PLUGIN_NAME),
"no" => __("No", FOOTNOTES_PLUGIN_NAME)
"text-1" => sprintf(__('I %s %s', FOOTNOTES_PLUGIN_NAME), FOOTNOTES_LOVE_SYMBOL, FOOTNOTES_PLUGIN_PUBLIC_NAME),
"text-2" => sprintf(__('this site uses the awesome %s Plugin', FOOTNOTES_PLUGIN_NAME), FOOTNOTES_PLUGIN_PUBLIC_NAME),
"text-3" => sprintf(__('extra smooth %s', FOOTNOTES_PLUGIN_NAME), FOOTNOTES_PLUGIN_PUBLIC_NAME),
"random" => __('random text', FOOTNOTES_PLUGIN_NAME),
"no" => sprintf(__("Don't display a %s %s text in my footer.", FOOTNOTES_PLUGIN_NAME), FOOTNOTES_PLUGIN_PUBLIC_NAME, FOOTNOTES_LOVE_SYMBOL)
);
$this->AddLabel(FOOTNOTE_INPUTFIELD_LOVE, sprintf(__("Tell the world you're using %s:", FOOTNOTES_PLUGIN_NAME), FOOTNOTES_PLUGIN_PUBLIC_NAME));
$this->AddSelectbox(FOOTNOTE_INPUTFIELD_LOVE, $l_arr_Options, "footnote_plugin_50");

View file

@ -14,6 +14,18 @@
*/
define("FOOTNOTES_PLUGIN_PUBLIC_NAME", '<span class="footnote_tag_styling footnote_tag_styling_1">foot</span><span class="footnote_tag_styling footnote_tag_styling_2">notes</span>');
/*
* PLUGIN LOVE SYMBOL WITH STYLING
* @since 1.2.2
*/
define("FOOTNOTES_LOVE_SYMBOL", '<span style="color:#ff6d3b; font-weight:bold;">&hearts;</span>');
/*
* PLUGIN PUBLIC NAME WITH LINK
* @since 1.2.2
*/
define("FOOTNOTES_PLUGIN_PUBLIC_NAME_LINKED", '<a href="http://wordpress.org/plugins/footnotes/" target="_blank" style="text-decoration:none;">' . FOOTNOTES_PLUGIN_PUBLIC_NAME . '</a>');
/* GENERAL PLUGIN CONSTANTS */
define("FOOTNOTES_PLUGIN_NAME", "footnotes"); /* plugin's internal name */
define("FOOTNOTE_SETTINGS_CONTAINER", "footnotes_storage"); /* database container where all footnote settings are stored */

View file

@ -152,13 +152,26 @@ function footnotes_LoveAndShareMe()
* @since 1.0.7
*/
/* get setting for love and share this plugin and convert it to boolean */
$l_bool_LoveMe = footnotes_ConvertToBool($g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_LOVE]);
$l_str_LoveMeText = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_LOVE];
/* check if the admin allows to add a link to the footer */
if ($l_bool_LoveMe && !$g_bool_NoLoveMeSlugOnCurrentPage) {
echo '
<div style="text-align:center; color:#acacac;">' .
sprintf(__("Hey there, I'm using the awesome WordPress Plugin called %s", FOOTNOTES_PLUGIN_NAME), '<a href="http://wordpress.org/plugins/footnotes/" target="_blank" style="text-decoration: none;">' . FOOTNOTES_PLUGIN_PUBLIC_NAME . '</a>') .
'</div>';
if (!empty($l_str_LoveMeText) && strtolower($l_str_LoveMeText) != "no" && !$g_bool_NoLoveMeSlugOnCurrentPage) {
if (strtolower($l_str_LoveMeText) == "random") {
$l_str_LoveMeText = "text-" . rand(1,3);
}
switch ($l_str_LoveMeText) {
case "text-1":
$l_str_LoveMeText = sprintf(__('I %s %s', FOOTNOTES_PLUGIN_NAME), FOOTNOTES_LOVE_SYMBOL, FOOTNOTES_PLUGIN_PUBLIC_NAME_LINKED);
break;
case "text-2":
$l_str_LoveMeText = sprintf(__('this site uses the awesome %s Plugin', FOOTNOTES_PLUGIN_NAME), FOOTNOTES_PLUGIN_PUBLIC_NAME_LINKED);
break;
case "text-3":
default:
$l_str_LoveMeText = sprintf(__('extra smooth %s', FOOTNOTES_PLUGIN_NAME), FOOTNOTES_PLUGIN_PUBLIC_NAME_LINKED);
break;
}
echo '<div style="text-align:center; color:#acacac;">' . $l_str_LoveMeText . '</div>';
}
}

Binary file not shown.

View file

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: footnotes\n"
"POT-Creation-Date: 2014-05-24 14:35+0100\n"
"PO-Revision-Date: 2014-05-24 14:37+0100\n"
"POT-Creation-Date: 2014-05-27 21:03+0100\n"
"PO-Revision-Date: 2014-05-27 21:04+0100\n"
"Last-Translator: Stefan Herndler <support@herndler.org>\n"
"Language-Team: SHE <s.herndler@methis.at>\n"
"Language: de\n"
@ -72,13 +72,11 @@ msgstr "im Widget"
msgid "Where shall the reference container appear:"
msgstr "Positionierung der Einzelnachweise:"
#: classes/footnotes_settings.php:465 classes/footnotes_settings.php:522
#: classes/footnotes_settings.php:543
#: classes/footnotes_settings.php:465 classes/footnotes_settings.php:546
msgid "Yes"
msgstr "Ja"
#: classes/footnotes_settings.php:466 classes/footnotes_settings.php:523
#: classes/footnotes_settings.php:544
#: classes/footnotes_settings.php:466 classes/footnotes_settings.php:547
msgid "No"
msgstr "Nein"
@ -122,12 +120,36 @@ msgstr "Römische Ziffern"
msgid "Counter style:"
msgstr "Fußnoten Zähler:"
#: classes/footnotes_settings.php:522 includes/replacer.php:164
#, php-format
msgid "I %s %s"
msgstr "Ich %s %s"
#: classes/footnotes_settings.php:523 includes/replacer.php:167
#, php-format
msgid "this site uses the awesome %s Plugin"
msgstr "Diese Seite verwendet das Plugin %s"
#: classes/footnotes_settings.php:524 includes/replacer.php:171
#, php-format
msgid "extra smooth %s"
msgstr "besonders feine %s"
#: classes/footnotes_settings.php:525
msgid "random text"
msgstr "zufälliger Text"
#: classes/footnotes_settings.php:526
#, php-format
msgid "Don't display a %s %s text in my footer."
msgstr "Verstecke %s %s am Ende meiner Seite."
#: classes/footnotes_settings.php:528
#, php-format
msgid "Tell the world you're using %s:"
msgstr "Teile der Welt mit, dass du %s verwendest:"
#: classes/footnotes_settings.php:530
#: classes/footnotes_settings.php:533
#, php-format
msgid ""
"Don't tell the world you're using %s on specific pages by adding the "
@ -136,35 +158,35 @@ msgstr ""
"Platzhalter um der Welt an einzelnen Seiten nicht mitzuteilen, dass Sie %s "
"verwenden:"
#: classes/footnotes_settings.php:546
#: classes/footnotes_settings.php:549
msgid "Allow footnotes on Summarized Posts:"
msgstr "Erlaube Fußnoten in Zusammenfassungen:"
#: classes/footnotes_settings.php:559
#: classes/footnotes_settings.php:562
msgid "HowTo"
msgstr "Hilfe"
#: classes/footnotes_settings.php:562
#: classes/footnotes_settings.php:565
msgid "Brief introduction in how to use the plugin"
msgstr "Kurze Anleitung für die Verwendung des Plugins."
#: classes/footnotes_settings.php:588
#: classes/footnotes_settings.php:596
msgid "Start your footnote with the following shortcode:"
msgstr "Starten Sie eine Fußnote mit:"
#: classes/footnotes_settings.php:594
#: classes/footnotes_settings.php:602
msgid "...and end your footnote with this shortcode:"
msgstr "...und beenden Sie diese mit:"
#: classes/footnotes_settings.php:602 classes/footnotes_settings.php:605
#: classes/footnotes_settings.php:610 classes/footnotes_settings.php:613
msgid "example string"
msgstr "Beispieltext"
#: classes/footnotes_settings.php:603
#: classes/footnotes_settings.php:611
msgid "will be displayed as:"
msgstr "wird dargestellt als:"
#: classes/footnotes_settings.php:610
#: classes/footnotes_settings.php:618
#, php-format
msgid "If you have any questions, please don't hesitate to %se-mail%s us."
msgstr "Bei Fragen können Sie uns gerne eine %se-Mail%s senden."
@ -177,11 +199,6 @@ msgstr ""
"Das Widget definiert die Position der Einzelnachweise wenn \"im Widget\" "
"eingestellt ist."
#: classes/footnotes_widget.php:17
#, php-format
msgid "%s Widget"
msgstr "%s Widget"
#: includes/plugin-settings.php:22
msgid "Settings"
msgstr "Einstellungen"
@ -190,10 +207,11 @@ msgstr "Einstellungen"
msgid "Support"
msgstr "Support"
#: includes/replacer.php:160
#, php-format
msgid "Hey there, I'm using the awesome WordPress Plugin called %s"
msgstr "Diese Seite verwendet das %s Plugin"
#~ msgid "%s Widget"
#~ msgstr "%s Widget"
#~ msgid "Hey there, I'm using the awesome WordPress Plugin called %s"
#~ msgstr "Diese Seite verwendet das %s Plugin"
#~ msgid "starts with:"
#~ msgstr "beginnt mit:"

Binary file not shown.

View file

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: footnotes\n"
"POT-Creation-Date: 2014-05-24 14:35+0100\n"
"PO-Revision-Date: 2014-05-24 14:35+0100\n"
"POT-Creation-Date: 2014-05-27 21:03+0100\n"
"PO-Revision-Date: 2014-05-27 21:03+0100\n"
"Last-Translator: Stefan Herndler <support@herndler.org>\n"
"Language-Team: SHE <s.herndler@methis.at>\n"
"Language: en\n"
@ -72,13 +72,11 @@ msgstr "in the widget area"
msgid "Where shall the reference container appear:"
msgstr "Where shall the reference container appear:"
#: classes/footnotes_settings.php:465 classes/footnotes_settings.php:522
#: classes/footnotes_settings.php:543
#: classes/footnotes_settings.php:465 classes/footnotes_settings.php:546
msgid "Yes"
msgstr "Yes"
#: classes/footnotes_settings.php:466 classes/footnotes_settings.php:523
#: classes/footnotes_settings.php:544
#: classes/footnotes_settings.php:466 classes/footnotes_settings.php:547
msgid "No"
msgstr "No"
@ -122,12 +120,36 @@ msgstr "Roman Numerals"
msgid "Counter style:"
msgstr "Counter style:"
#: classes/footnotes_settings.php:522 includes/replacer.php:164
#, php-format
msgid "I %s %s"
msgstr "I %s %s"
#: classes/footnotes_settings.php:523 includes/replacer.php:167
#, php-format
msgid "this site uses the awesome %s Plugin"
msgstr "this site uses the awesome %s Plugin"
#: classes/footnotes_settings.php:524 includes/replacer.php:171
#, php-format
msgid "extra smooth %s"
msgstr "extra smooth %s"
#: classes/footnotes_settings.php:525
msgid "random text"
msgstr "random text"
#: classes/footnotes_settings.php:526
#, php-format
msgid "Don't display a %s %s text in my footer."
msgstr "Don't display a %s %s text in my footer."
#: classes/footnotes_settings.php:528
#, php-format
msgid "Tell the world you're using %s:"
msgstr "Tell the world you're using %s:"
#: classes/footnotes_settings.php:530
#: classes/footnotes_settings.php:533
#, php-format
msgid ""
"Don't tell the world you're using %s on specific pages by adding the "
@ -136,35 +158,35 @@ msgstr ""
"Don't tell the world you're using %s on specific pages by adding the "
"following short code:"
#: classes/footnotes_settings.php:546
#: classes/footnotes_settings.php:549
msgid "Allow footnotes on Summarized Posts:"
msgstr "Allow footnotes on Summarized Posts:"
#: classes/footnotes_settings.php:559
#: classes/footnotes_settings.php:562
msgid "HowTo"
msgstr "HowTo"
#: classes/footnotes_settings.php:562
#: classes/footnotes_settings.php:565
msgid "Brief introduction in how to use the plugin"
msgstr "Brief introduction in how to use the plugin"
#: classes/footnotes_settings.php:588
#: classes/footnotes_settings.php:596
msgid "Start your footnote with the following shortcode:"
msgstr "Start your footnote with the following shortcode:"
#: classes/footnotes_settings.php:594
#: classes/footnotes_settings.php:602
msgid "...and end your footnote with this shortcode:"
msgstr "...and end your footnote with this shortcode:"
#: classes/footnotes_settings.php:602 classes/footnotes_settings.php:605
#: classes/footnotes_settings.php:610 classes/footnotes_settings.php:613
msgid "example string"
msgstr "example string"
#: classes/footnotes_settings.php:603
#: classes/footnotes_settings.php:611
msgid "will be displayed as:"
msgstr "will be displayed as:"
#: classes/footnotes_settings.php:610
#: classes/footnotes_settings.php:618
#, php-format
msgid "If you have any questions, please don't hesitate to %se-mail%s us."
msgstr "If you have any questions, please don't hesitate to %se-mail%s us."
@ -177,11 +199,6 @@ msgstr ""
"The widget defines the position of the reference container if set to "
"\"widget area\"."
#: classes/footnotes_widget.php:17
#, php-format
msgid "%s Widget"
msgstr "%s Widget"
#: includes/plugin-settings.php:22
msgid "Settings"
msgstr "Settings"
@ -190,10 +207,11 @@ msgstr "Settings"
msgid "Support"
msgstr "Support"
#: includes/replacer.php:160
#, php-format
msgid "Hey there, I'm using the awesome WordPress Plugin called %s"
msgstr "Hey there, I'm using the awesome %s Plugin"
#~ msgid "%s Widget"
#~ msgstr "%s Widget"
#~ msgid "Hey there, I'm using the awesome WordPress Plugin called %s"
#~ msgstr "Hey there, I'm using the awesome %s Plugin"
#~ msgid "(("
#~ msgstr "(("

View file

@ -63,6 +63,7 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho
= 1.2.2 =
- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag)
- Feature: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer
= 1.2.1 =
- Bugfix: HowTo example will be displayed correctly if a user defined short code is set