- Add: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled)

- Add: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters)
- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url)
- Update: Receiving list of other Plugins from the Developer Team from an external server
- Update: Translations (EN and DE)
- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins)
- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins)
- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@1003242 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-10-07 11:32:25 +00:00
parent 6a4677251a
commit e054849b1e
17 changed files with 328 additions and 122 deletions

View file

@ -114,7 +114,7 @@ class MCI_Footnotes_Layout_Init {
self::C_STR_MAIN_MENU_SLUG, // menu slug
array($this, "displayOtherPlugins"), // function
plugins_url('footnotes/img/main-menu.png'), // icon url
81 // position
null // position
);
$this->registerSubPages();
}
@ -149,9 +149,9 @@ class MCI_Footnotes_Layout_Init {
printf('<em>visit <a href="http://manfisher.net/" target="_blank">ManFisher Medien ManuFaktur</a> or <a href="http://herndler.org" target="_blank">herndler.org</a></em>');
printf("<br/><br/>");
printf("<h3>%s</h3>", __('Take a look on other Plugins we have developed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
/*
// collect plugin list as JSON
$l_arr_Response = wp_remote_get("http://herndler.org/wordpress/plugins/get.json");
$l_arr_Response = wp_remote_get("http://herndler.org/project/other-wordpress-plugins.php");
// check if response is valid
if (is_wp_error($l_arr_Response)) {
printf(__("Error loading other WordPress Plugins from Manfisher. Sorry!", MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
@ -161,13 +161,6 @@ class MCI_Footnotes_Layout_Init {
$l_str_Response = $l_arr_Response["body"];
// convert the body to a json string
$l_arr_Plugins = json_decode($l_str_Response, true);
*/
$l_arr_Plugins = array(
array("name" => "identity", "title" => "Identity"),
array("name" => "google-keyword-suggest", "title" => "Google Keyword Suggest"),
array("name" => "competition", "title" => "competition"),
array("name" => "footnotes", "title" => "Footnotes")
);
// load template file
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "other-plugins");
@ -178,8 +171,13 @@ class MCI_Footnotes_Layout_Init {
// replace Plugin information
$l_obj_Template->replace(
array(
"name" => $l_arr_PluginInfo["name"],
"title" => $l_arr_PluginInfo["title"]
"server" => ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://" . $_SERVER["SERVER_NAME"],
"plugin-name" => $l_arr_PluginInfo["name"],
"plugin-title" => $l_arr_PluginInfo["title"],
"plugin-icon" => "http://plugins.svn.wordpress.org/" . $l_arr_PluginInfo["name"] ."/assets/icon-256x256.png",
"install-label" => __("Install now", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"more-details-label" => __("More Details", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"last-updated-label" => __("Last Updated", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
)
);
// display Plugin
@ -220,18 +218,29 @@ class MCI_Footnotes_Layout_Init {
// get plugin object
$l_arr_Plugin = json_decode($l_str_Response, true);
if (empty($l_arr_Plugin)) {
echo json_encode(array("error" => "Error reading Plugin meta information."));
echo json_encode(array("error" => "Error reading Plugin meta information.<br/>URL: " . $l_str_Url . "<br/>Response: " . $l_str_Response));
exit;
}
$l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0;
$l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0;
$l_int_Stars = round(5 * $l_int_Rating / 100.0, 1);
// return Plugin information as JSON encoded string
echo json_encode(
array(
"error" => "",
"PluginImage" => "",
"PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information",
"PluginUrl" => array_key_exists("homepage", $l_arr_Plugin) ? $l_arr_Plugin["homepage"] : "",
"PluginVersion" => array_key_exists("version", $l_arr_Plugin) ? $l_arr_Plugin["version"] : "---"
"PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown",
"PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"PluginRating1" => $l_int_NumRatings >= 0.5 ? "star-full" : "star-empty",
"PluginRating2" => $l_int_NumRatings >= 1.5 ? "star-full" : "star-empty",
"PluginRating3" => $l_int_NumRatings >= 2.5 ? "star-full" : "star-empty",
"PluginRating4" => $l_int_NumRatings >= 3.5 ? "star-full" : "star-empty",
"PluginRating5" => $l_int_NumRatings >= 4.5 ? "star-full" : "star-empty",
"PluginRating" => $l_int_NumRatings,
"PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown",
"PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---"
)
);
exit;

View file

@ -113,6 +113,9 @@ class MCI_Footnotes_Layout_Diagnostics extends MCI_Footnotes_LayoutEngine {
"label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"php" => phpversion(),
"label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"user-agent" => $_SERVER["HTTP_USER_AGENT"],
"label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME),

View file

@ -290,6 +290,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
array(
"label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Enable the mouse-over box", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled),
"label-activate-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Display only an excerpt", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"activate-excerpt" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled),
"label-excerpt-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum characters for the excerpt", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"excerpt-length" => $this->addTextBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)
)
);
// display template with replaced placeholders

View file

@ -144,6 +144,24 @@ class MCI_Footnotes_Settings {
*/
const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED = "footnote_inputfield_custom_mouse_over_box_enabled";
/**
* Settings Container Key for the mouse-over box to display only an excerpt.
*
* @author Stefan Herndler
* @since 1.5.4
* @var string
*/
const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled";
/**
* Settings Container Key for the mouse-over box to define the max. length of the enabled expert.
*
* @author Stefan Herndler
* @since 1.5.4
* @var string
*/
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = "footnote_inputfield_custom_mouse_over_box_excerpt_length";
/**
* Settings Container Key for the Hyperlink arrow.
*
@ -214,6 +232,8 @@ class MCI_Footnotes_Settings {
self::C_STR_FOOTNOTES_STYLING_BEFORE => '',
self::C_STR_FOOTNOTES_STYLING_AFTER => ')',
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'no',
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 150,
self::C_STR_HYPERLINK_ARROW => '&#8593;',
self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '',
self::C_STR_CUSTOM_CSS => ''

View file

@ -59,6 +59,9 @@ class MCI_Footnotes_Task {
// replace footnotes in the content of a widget
add_filter('widget_text', array($this, "WidgetText"), PHP_INT_MAX);
// replace footnotes in the Post object after receiving it from the database
add_action('the_post', array($this, "manipulatePostObject"));
}
/**
@ -164,6 +167,19 @@ class MCI_Footnotes_Task {
return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false);
}
/**
* Replaces footnotes in each Content var of the current Post object.
*
* @author Stefan Herndler
* @since 1.5.4
* @param WP_Post $p_obj_Post
*/
public function manipulatePostObject(&$p_obj_Post) {
$p_obj_Post->post_content = $this->exec($p_obj_Post->post_content);
$p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered);
$p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt);
}
/**
* Replaces all footnotes that occur in the given content.
*
@ -258,11 +274,25 @@ class MCI_Footnotes_Task {
// display the footnote as mouse-over box
if (!$p_bool_HideFootnotesText) {
$l_str_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
// display only an excerpt of the footnotes text if enabled
$l_str_ExcerptText = $l_str_FootnoteText;
$l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED));
$l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH));
if ($l_bool_EnableExcerpt) {
$l_str_FootnoteText = strip_tags($l_str_FootnoteText);
if (is_int($l_int_MaxLength) && strlen($l_str_FootnoteText) > $l_int_MaxLength) {
$l_str_ExcerptText = substr($l_str_FootnoteText, 0, $l_int_MaxLength);
$l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' '));
$l_str_ExcerptText .= " ..." . sprintf(__("%scontinue%s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<a href="" onclick="footnote_moveToAnchor(\'footnote_plugin_reference_'.$l_str_Index.'\');">', '</a>');
}
}
// fill the footnotes template
$l_obj_Template->replace(
array(
"index" => $l_str_Index,
"text" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) ? $l_str_FootnoteText : "",
"text" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) ? $l_str_ExcerptText : "",
"before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE),
"after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER)
)

View file

@ -1,18 +1,7 @@
== List of other Plugins ==
- Add downloads (real time from WordPress API)
- Add image (from JSON string)
- Add rating (display the stars)
- Add "Compatible up to" WordPress Version
- Add last updated timestamp
== Footnotes Features ==
- Add public css file to the "How to" tab
- Add setting to customize the mouse-over box
- Display the mouse-over box to the left if near the right margin
- Abbreviate the mouse-over text if more than XXX characters (ending with "...")
- Performance of the task so PHP won't throw an error when there are more than 120? Footnotes
- Maybe increase PHP max execution time while processing the Footnotes task
- different background for every odd table row

View file

@ -14,7 +14,7 @@
* @since 1.5.0
* @param string $p_str_Directory Absolute Directory path to lookup for *.php files
*/
function requirePhpFiles($p_str_Directory) {
function MCI_Footnotes_requirePhpFiles($p_str_Directory) {
// append slash at the end of the Directory if not exist
if (substr($p_str_Directory, -1) != "/") {
$p_str_Directory .= "/";
@ -32,6 +32,6 @@ function requirePhpFiles($p_str_Directory) {
}
}
requirePhpFiles(dirname(__FILE__) . "/class");
requirePhpFiles(dirname(__FILE__) . "/class/dashboard");
requirePhpFiles(dirname(__FILE__) . "/class/widgets");
MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class");
MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/dashboard");
MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/widgets");

Binary file not shown.

View file

@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: footnotes\n"
"POT-Creation-Date: 2014-10-01 22:55+0100\n"
"PO-Revision-Date: 2014-10-01 22:56+0100\n"
"Last-Translator: Mark Cheret <mark@cheret.de>\n"
"POT-Creation-Date: 2014-10-07 13:02+0100\n"
"PO-Revision-Date: 2014-10-07 13:02+0100\n"
"Last-Translator: Stefan Herndler <support@herndler.org>\n"
"Language-Team: SHE <s.herndler@methis.at>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.5\n"
"X-Generator: Poedit 1.6.9\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
@ -22,6 +22,30 @@ msgstr ""
msgid "Take a look on other Plugins we have developed."
msgstr "Sehen Sie sich unsere weiteren WordPress Plugins an"
#: class/dashboard/init.php:157
msgid "Error loading other WordPress Plugins from Manfisher. Sorry!"
msgstr "Fehler beim Laden anderer WordPress Plugins von ManFisher!"
#: class/dashboard/init.php:178
msgid "Install now"
msgstr "Installieren"
#: class/dashboard/init.php:179
msgid "More Details"
msgstr "weitere Details"
#: class/dashboard/init.php:180
msgid "Last Updated"
msgstr "zuletzt aktualisiert"
#: class/dashboard/init.php:235
msgid "rating based on"
msgstr "Bewertung basierend auf"
#: class/dashboard/init.php:235
msgid "ratings"
msgstr "Bewertungen"
#: class/dashboard/layout.php:239
msgid "Settings saved"
msgstr "Einstellungen gespeichert"
@ -44,26 +68,30 @@ msgid "PHP version"
msgstr "PHP Version"
#: class/dashboard/subpage-diagnostics.php:116
msgid "User agent"
msgstr "User Agent"
#: class/dashboard/subpage-diagnostics.php:119
msgid "Max execution time"
msgstr "max. Ausführungsdauer"
#: class/dashboard/subpage-diagnostics.php:117
#: class/dashboard/subpage-diagnostics.php:120
msgid "seconds"
msgstr "Sekunden"
#: class/dashboard/subpage-diagnostics.php:119
#: class/dashboard/subpage-diagnostics.php:122
msgid "Memory limit"
msgstr "Speicherlimitierung"
#: class/dashboard/subpage-diagnostics.php:122
#: class/dashboard/subpage-diagnostics.php:125
msgid "PHP extensions"
msgstr "PHP Erweiterungen"
#: class/dashboard/subpage-diagnostics.php:125
#: class/dashboard/subpage-diagnostics.php:128
msgid "WordPress version"
msgstr "WordPress Version"
#: class/dashboard/subpage-diagnostics.php:128
#: class/dashboard/subpage-diagnostics.php:131
msgid "Active Theme"
msgstr "Aktuelles Theme"
@ -130,15 +158,15 @@ msgstr "im Widget"
#: class/dashboard/subpage-main.php:109
msgid "References label"
msgstr "Überschrift \"Einzelnachweis\":"
msgstr "Überschrift für den Einzelnachweis"
#: class/dashboard/subpage-main.php:112
msgid "Collapse references by default"
msgstr "Zeige Einzelnachweise zunächst zusammengeklappt:"
msgstr "Zeige Einzelnachweise zunächst zusammengeklappt"
#: class/dashboard/subpage-main.php:115
msgid "Where shall the reference container appear"
msgstr "Positionierung der Einzelnachweise:"
msgstr "Positionierung der Einzelnachweise"
#: class/dashboard/subpage-main.php:134 class/dashboard/subpage-main.php:234
#: class/dashboard/subpage-main.php:283
@ -176,19 +204,19 @@ msgstr "Römische Ziffern"
#: class/dashboard/subpage-main.php:165
msgid "Combine identical footnotes"
msgstr "Kombiniere identische Fußnoten:"
msgstr "Kombiniere identische Fußnoten"
#: class/dashboard/subpage-main.php:168
msgid "Footnote tag starts with"
msgstr "Start-Shortcode:"
msgstr "Start-Shortcode"
#: class/dashboard/subpage-main.php:171
msgid "and ends with"
msgstr "endet mit:"
msgstr "endet mit"
#: class/dashboard/subpage-main.php:180
msgid "Counter style"
msgstr "Fußnoten Zähler:"
msgstr "Fußnoten Zähler"
#: class/dashboard/subpage-main.php:202 class/task.php:116
#, php-format
@ -217,7 +245,7 @@ msgstr "Verstecke %s %s am Ende meiner Seite."
#: class/dashboard/subpage-main.php:214
#, php-format
msgid "Tell the world you're using %s"
msgstr "Teilen Sie der Welt mit, dass Sie %s verwenden:"
msgstr "Teilen Sie der Welt mit, dass Sie %s verwenden"
#: class/dashboard/subpage-main.php:217
#, php-format
@ -230,80 +258,88 @@ msgstr ""
#: class/dashboard/subpage-main.php:243
msgid "Allow footnotes on Summarized Posts"
msgstr "Erlaube Fußnoten in Zusammenfassungen:"
msgstr "Erlaube Fußnoten in Zusammenfassungen"
#: class/dashboard/subpage-main.php:263
msgid "Before Footnotes index"
msgstr "Symbol nach Fußnoten:"
msgstr "Symbol nach Fußnoten"
#: class/dashboard/subpage-main.php:266
msgid "After Footnotes index"
msgstr "Symbole nach Fußnoten:"
msgstr "Symbole nach Fußnoten"
#: class/dashboard/subpage-main.php:291
msgid "Enable the mouse-over box"
msgstr "Aktiviere das Tooltip Popup Fenster"
#: class/dashboard/subpage-main.php:311
#: class/dashboard/subpage-main.php:293
msgid "Display only an excerpt"
msgstr "Zeigt nur eine Zusammenfassung"
#: class/dashboard/subpage-main.php:295
msgid "Maximum characters for the excerpt"
msgstr "Maximale Zeichenlänge der Zusammenfasung"
#: class/dashboard/subpage-main.php:315
msgid "Hyperlink symbol"
msgstr "Symbol für den Hyperlink:"
msgstr "Symbol für den Hyperlink"
#: class/dashboard/subpage-main.php:314
#: class/dashboard/subpage-main.php:318
msgid "or enter a user defined symbol"
msgstr "oder definieren Sie ein eigenes Symbol:"
msgstr "oder definieren Sie ein eigenes Symbol"
#: class/dashboard/subpage-main.php:316
#: class/dashboard/subpage-main.php:320
msgid "if set it overrides the hyperlink symbol above"
msgstr "wenn gesetzt, wird das oben definierte Symbol überschrieben"
#: class/dashboard/subpage-main.php:335
#: class/dashboard/subpage-main.php:339
msgid "Add custom CSS"
msgstr "Benutzerdefinierter CSS Code:"
msgstr "Benutzerdefinierter CSS Code"
#: class/dashboard/subpage-main.php:338
#: class/dashboard/subpage-main.php:342
msgid ""
"Available CSS classes to customize the footnotes and the reference container"
msgstr ""
"Verfügbare CSS Klassen um die Fußnoten und den Einzelnachweis zu "
"personalisieren:"
"personalisieren"
#: class/dashboard/subpage-main.php:341
#: class/dashboard/subpage-main.php:345
msgid "inline footnotes"
msgstr "Fußnoten Index im veröffneltichten Text"
#: class/dashboard/subpage-main.php:344
#: class/dashboard/subpage-main.php:348
msgid "inline footnotes, mouse over highlight box"
msgstr "Popup der Fußnote im veröffentlichten Text"
#: class/dashboard/subpage-main.php:347
#: class/dashboard/subpage-main.php:351
msgid "reference container footnotes index"
msgstr "Einzelnachweis - Fußnote Index"
#: class/dashboard/subpage-main.php:350
#: class/dashboard/subpage-main.php:354
msgid "reference container footnotes linked arrow"
msgstr "Einzelnachweiß - Symbol für den Link"
#: class/dashboard/subpage-main.php:353
#: class/dashboard/subpage-main.php:357
msgid "reference container footnotes text"
msgstr "Einzelnachweis - Fußnote"
#: class/dashboard/subpage-main.php:377
#: class/dashboard/subpage-main.php:381
msgid "example string"
msgstr "Beispieltext"
#: class/dashboard/subpage-main.php:384
#: class/dashboard/subpage-main.php:388
msgid "Start your footnote with the following short code:"
msgstr "Starten Sie eine Fußnote mit dem folgenden Shortcode:"
#: class/dashboard/subpage-main.php:387
#: class/dashboard/subpage-main.php:391
msgid "...and end your footnote with this short code:"
msgstr "...und beenden Sie diesen mit:"
#: class/dashboard/subpage-main.php:391
#: class/dashboard/subpage-main.php:395
msgid "will be displayed as:"
msgstr "wird dargestellt als:"
#: class/dashboard/subpage-main.php:394
#: class/dashboard/subpage-main.php:398
#, php-format
msgid ""
"For further information please check out our %ssupport forum%s on WordPress."
@ -312,7 +348,7 @@ msgstr ""
"Für mehr Informationen besuchen Sie unser %sSupport Forum%s auf WordPress."
"org."
#: class/dashboard/subpage-main.php:413
#: class/dashboard/subpage-main.php:417
msgid "Donate now"
msgstr "Jetzt spenden"
@ -332,6 +368,11 @@ msgstr "Support"
msgid "Donate"
msgstr "Spenden"
#: class/task.php:271
#, php-format
msgid "%scontinue%s"
msgstr "%sweiter lesen%s"
#: class/widgets/reference-container.php:49
#: class/widgets/reference-container.php:61
msgid ""

Binary file not shown.

View file

@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: footnotes\n"
"POT-Creation-Date: 2014-10-01 22:55+0100\n"
"PO-Revision-Date: 2014-10-01 22:55+0100\n"
"Last-Translator: Mark Cheret <mark@cheret.de>\n"
"POT-Creation-Date: 2014-10-07 12:55+0100\n"
"PO-Revision-Date: 2014-10-07 12:55+0100\n"
"Last-Translator: Stefan Herndler <support@herndler.org>\n"
"Language-Team: SHE <s.herndler@methis.at>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.5\n"
"X-Generator: Poedit 1.6.9\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
@ -22,6 +22,30 @@ msgstr ""
msgid "Take a look on other Plugins we have developed."
msgstr "Take a look at other Plugins we have developed."
#: class/dashboard/init.php:157
msgid "Error loading other WordPress Plugins from Manfisher. Sorry!"
msgstr "Error loading other WordPress Plugins from Manfisher. Sorry!"
#: class/dashboard/init.php:178
msgid "Install now"
msgstr "Install now"
#: class/dashboard/init.php:179
msgid "More Details"
msgstr "More Details"
#: class/dashboard/init.php:180
msgid "Last Updated"
msgstr "Last Updated"
#: class/dashboard/init.php:235
msgid "rating based on"
msgstr "rating based on"
#: class/dashboard/init.php:235
msgid "ratings"
msgstr "ratings"
#: class/dashboard/layout.php:239
msgid "Settings saved"
msgstr "Settings saved"
@ -44,26 +68,30 @@ msgid "PHP version"
msgstr "PHP version"
#: class/dashboard/subpage-diagnostics.php:116
msgid "User agent"
msgstr "User agent"
#: class/dashboard/subpage-diagnostics.php:119
msgid "Max execution time"
msgstr "Max execution time"
#: class/dashboard/subpage-diagnostics.php:117
#: class/dashboard/subpage-diagnostics.php:120
msgid "seconds"
msgstr "seconds"
#: class/dashboard/subpage-diagnostics.php:119
#: class/dashboard/subpage-diagnostics.php:122
msgid "Memory limit"
msgstr "Memory limit"
#: class/dashboard/subpage-diagnostics.php:122
#: class/dashboard/subpage-diagnostics.php:125
msgid "PHP extensions"
msgstr "PHP extensions"
#: class/dashboard/subpage-diagnostics.php:125
#: class/dashboard/subpage-diagnostics.php:128
msgid "WordPress version"
msgstr "WordPress version"
#: class/dashboard/subpage-diagnostics.php:128
#: class/dashboard/subpage-diagnostics.php:131
msgid "Active Theme"
msgstr "Active Theme"
@ -244,65 +272,73 @@ msgstr "After Footnotes index"
msgid "Enable the mouse-over box"
msgstr "Enable the mouse-over box"
#: class/dashboard/subpage-main.php:311
#: class/dashboard/subpage-main.php:293
msgid "Display only an excerpt"
msgstr "Display only an excerpt"
#: class/dashboard/subpage-main.php:295
msgid "Maximum characters for the excerpt"
msgstr "Maximum characters for the excerpt"
#: class/dashboard/subpage-main.php:315
msgid "Hyperlink symbol"
msgstr "Hyperlink symbol"
#: class/dashboard/subpage-main.php:314
#: class/dashboard/subpage-main.php:318
msgid "or enter a user defined symbol"
msgstr "or enter a user defined symbol"
#: class/dashboard/subpage-main.php:316
#: class/dashboard/subpage-main.php:320
msgid "if set it overrides the hyperlink symbol above"
msgstr "if set it overrides the hyperlink symbol above"
#: class/dashboard/subpage-main.php:335
#: class/dashboard/subpage-main.php:339
msgid "Add custom CSS"
msgstr "Add custom CSS"
#: class/dashboard/subpage-main.php:338
#: class/dashboard/subpage-main.php:342
msgid ""
"Available CSS classes to customize the footnotes and the reference container"
msgstr ""
"Available CSS classes to customize the footnotes and the reference container"
#: class/dashboard/subpage-main.php:341
#: class/dashboard/subpage-main.php:345
msgid "inline footnotes"
msgstr "inline footnotes"
#: class/dashboard/subpage-main.php:344
#: class/dashboard/subpage-main.php:348
msgid "inline footnotes, mouse over highlight box"
msgstr "inline footnotes, mouse over highlight box"
#: class/dashboard/subpage-main.php:347
#: class/dashboard/subpage-main.php:351
msgid "reference container footnotes index"
msgstr "reference container footnotes index"
#: class/dashboard/subpage-main.php:350
#: class/dashboard/subpage-main.php:354
msgid "reference container footnotes linked arrow"
msgstr "reference container footnotes linked arrow"
#: class/dashboard/subpage-main.php:353
#: class/dashboard/subpage-main.php:357
msgid "reference container footnotes text"
msgstr "reference container footnotes text"
#: class/dashboard/subpage-main.php:377
#: class/dashboard/subpage-main.php:381
msgid "example string"
msgstr "example string"
#: class/dashboard/subpage-main.php:384
#: class/dashboard/subpage-main.php:388
msgid "Start your footnote with the following short code:"
msgstr "Start your footnote with the following short code:"
#: class/dashboard/subpage-main.php:387
#: class/dashboard/subpage-main.php:391
msgid "...and end your footnote with this short code:"
msgstr "...and end your footnote with this short code:"
#: class/dashboard/subpage-main.php:391
#: class/dashboard/subpage-main.php:395
msgid "will be displayed as:"
msgstr "will be displayed as:"
#: class/dashboard/subpage-main.php:394
#: class/dashboard/subpage-main.php:398
#, php-format
msgid ""
"For further information please check out our %ssupport forum%s on WordPress."
@ -311,7 +347,7 @@ msgstr ""
"For further information please check out our %ssupport forum%s on WordPress."
"org."
#: class/dashboard/subpage-main.php:413
#: class/dashboard/subpage-main.php:417
msgid "Donate now"
msgstr "Donate now"
@ -331,6 +367,11 @@ msgstr "Support"
msgid "Donate"
msgstr "Donate"
#: class/task.php:271
#, php-format
msgid "%scontinue%s"
msgstr "%scontinue%s"
#: class/widgets/reference-container.php:49
#: class/widgets/reference-container.php:61
msgid ""

View file

@ -84,6 +84,16 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog ==
= 1.5.4 =
- Add: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled)
- Add: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters)
- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url)
- Update: Receiving list of other Plugins from the Developer Team from an external server
- Update: Translations (EN and DE)
- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins)
- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins)
- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database
= 1.5.3 =
- Add: Developer's homepage to the 'other Plugins' list
- Update: Smoothy scroll to an anchor using Javascript

View file

@ -4,5 +4,13 @@
<td>[[label-enable]]</td>
<td>[[enable]]</td>
</tr>
<tr>
<td>[[label-activate-excerpt]]</td>
<td>[[activate-excerpt]]</td>
</tr>
<tr>
<td>[[label-excerpt-length]]</td>
<td>[[excerpt-length]]</td>
</tr>
</tbody>
</table>

View file

@ -8,6 +8,10 @@
<td>[[label-php]]</td>
<td>[[php]]</td>
</tr>
<tr>
<td>[[label-user-agent]]</td>
<td>[[user-agent]]</td>
</tr>
<tr>
<td>[[label-max-execution-time]]</td>
<td>[[max-execution-time]]</td>

View file

@ -1,41 +1,87 @@
<div class="plugin-card">
<div class="plugin-card-top">
<div>
<h4><a href="" target="_blank" class="thickbox" id="[[name]]-url">[[title]]</a></h4>
</div>
<div class="action-links">
<ul class="plugin-action-buttons">
<li><a class="install-now button" href="" id="[[name]]-website">Website</a></li>
</ul>
</div>
<div>
<p id="[[name]]-description"></p>
</div>
</div>
<div class="plugin-card-bottom">
<div class="column-updated"><p id="[[name]]-version"></p></div>
</div>
<div class="plugin-card-top">
<a href="[[server]]/wp-admin/plugin-install.php?tab=plugin-information&plugin=[[plugin-name]]&TB_iframe=true&width=600&height=550" class="thickbox plugin-icon">
<img src="[[plugin-icon]]"/>
</a>
<div class="name column-name">
<h4>
<a href="[[server]]/wp-admin/plugin-install.php?tab=plugin-information&plugin=[[plugin-name]]&TB_iframe=true&width=600&height=550" class="thickbox">[[plugin-title]]</a>
</h4>
</div>
<div class="action-links">
<ul class="plugin-action-buttons">
<li>
<a class="install-now button" href="[[server]]/wp-admin/update.php?action=install-plugin&plugin=[[plugin-name]]&_wpnonce=e7a5c90faf" aria-label="Install [[plugin-title]] now">[[install-label]]</a>
</li>
<li>
<a href="[[server]]/wp-admin/plugin-install.php?tab=plugin-information&plugin=[[plugin-name]]&TB_iframe=true&width=600&height=550" class="thickbox" aria-label="More information about [[plugin-title]]" data-title="[[plugin-title]]">[[more-details-label]]</a>
</li>
</ul>
</div>
<div class="desc column-description">
<p id="manfisher-[[plugin-name]]-description"></p>
<p class="authors">
<cite id="manfisher-[[plugin-name]]-author"></cite>
</p>
</div>
</div>
<div class="plugin-card-bottom">
<div class="vers column-rating">
<div class="star-rating" title="">
<span class="screen-reader-text" id="manfisher-[[plugin-name]]-rating-text"></span>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<span class="num-ratings" id="manfisher-[[plugin-name]]-rating-num"></span>
</div>
<div class="column-updated">
<strong>[[last-updated-label]]:</strong>
<span id="manfisher-[[plugin-name]]-updated"></span>
</div>
<div class="column-downloaded" id="manfisher-[[plugin-name]]-downloads"></div>
<div class="column-compatibility">
<!--<span class="compatibility-compatible"></span>-->
</div>
</div>
</div>
<script type="text/javascript">
jQuery.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: {
action: 'footnotes_getPluginInfo',
plugin: '[[name]]'
plugin: '[[plugin-name]]'
},
dataType: 'json',
success: function (data, textStatus, XMLHttpRequest) {
var l_obj_Description = jQuery("#manfisher-[[plugin-name]]-description");
var l_obj_Author = jQuery("#manfisher-[[plugin-name]]-author");
var l_obj_RatingText = jQuery("#manfisher-[[plugin-name]]-rating-text");
var l_obj_RatingNum = jQuery("#manfisher-[[plugin-name]]-rating-num");
var l_obj_LastUpdated = jQuery("#manfisher-[[plugin-name]]-updated");
var l_obj_Downloads = jQuery("#manfisher-[[plugin-name]]-downloads");
if (data == null) {
jQuery("#[[name]]-description").text("No response received.");
l_obj_Description.text("No response received.");
} else if (data.error) {
console.log(data.error);
jQuery("#[[name]]-description").text(data.error);
l_obj_Description.text(data.error);
} else {
jQuery("#[[name]]-url").attr("href", data.PluginUrl);
jQuery("#[[name]]-website").attr("href", data.PluginUrl);
jQuery("#[[name]]-description").text(data.PluginDescription);
jQuery("#[[name]]-version").text("Version: " + data.PluginVersion);
l_obj_Description.text(data.PluginDescription);
l_obj_Author.append("By " + data.PluginAuthor);
l_obj_RatingText.text(data.PluginRatingText);
l_obj_RatingText.next().addClass(data.PluginRating1);
l_obj_RatingText.next().next().addClass(data.PluginRating2);
l_obj_RatingText.next().next().next().addClass(data.PluginRating3);
l_obj_RatingText.next().next().next().next().addClass(data.PluginRating4);
l_obj_RatingText.next().next().next().next().next().addClass(data.PluginRating5);
l_obj_RatingNum.text("(" + data.PluginRating + ")");
l_obj_LastUpdated.text(data.PluginLastUpdated);
l_obj_Downloads.text(data.PluginDownloads + " downloads");
}
},
error: function (MLHttpRequest, textStatus, errorThrown) {

View file

@ -1,2 +1,2 @@
<a href="" name="footnote_plugin_tooltip_[[index]]" id="footnote_plugin_tooltip_[[index]]" class="footnote_plugin_tooltip_text" onclick="footnote_expand_reference_container(); footnote_moveToAnchor('footnote_plugin_reference_[[index]]')"><sup>[[before]][[index]][[after]]</sup></a>
<a href="" name="footnote_plugin_tooltip_[[index]]" id="footnote_plugin_tooltip_[[index]]" class="footnote_plugin_tooltip_text" onclick="footnote_moveToAnchor('footnote_plugin_reference_[[index]]');"><sup>[[before]][[index]][[after]]</sup></a>
<span class="footnote_tooltip" id="footnote_plugin_tooltip_text_[[index]]">[[text]]</span>

View file

@ -25,6 +25,7 @@
}
function footnote_moveToAnchor(p_str_TargetID) {
footnote_expand_reference_container();
var l_obj_Target = jQuery("#" + p_str_TargetID);
if( l_obj_Target.length ) {
event.preventDefault();