Prepare for release version 1.5.7

- Add: Setting to define the positioning of the mouse-over box
- Add: Setting to define an offset for the mouse-over box (precise positioning)
- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow)
- Bugfix: Rating calculation for the 'other plugins' list

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@1006768 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-10-13 17:06:54 +00:00
parent b183563518
commit 3ad7787a33
11 changed files with 96 additions and 29 deletions

View file

@ -247,11 +247,11 @@ class MCI_Footnotes_Layout_Init {
"PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information",
"PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", "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), "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", "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty",
"PluginRating2" => $l_int_NumRatings >= 1.5 ? "star-full" : "star-empty", "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty",
"PluginRating3" => $l_int_NumRatings >= 2.5 ? "star-full" : "star-empty", "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty",
"PluginRating4" => $l_int_NumRatings >= 3.5 ? "star-full" : "star-empty", "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty",
"PluginRating5" => $l_int_NumRatings >= 4.5 ? "star-full" : "star-empty", "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty",
"PluginRating" => $l_int_NumRatings, "PluginRating" => $l_int_NumRatings,
"PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", "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"] : "---" "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---"

View file

@ -189,8 +189,6 @@ abstract class MCI_Footnotes_LayoutEngine {
* @since 1.5.0 * @since 1.5.0
*/ */
private function appendScripts() { private function appendScripts() {
// add jQuery to the sub menu page
wp_enqueue_script('jquery');
// enable meta boxes layout and close functionality // enable meta boxes layout and close functionality
wp_enqueue_script('postbox'); wp_enqueue_script('postbox');
// add WordPress color picker layout // add WordPress color picker layout

View file

@ -290,6 +290,17 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
); );
// options for the Mouse-over box position
$l_arr_Position = array(
"top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
);
// load template file // load template file
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-mouse-over-box"); $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-mouse-over-box");
// replace all placeholders // replace all placeholders
@ -304,7 +315,18 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"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)), "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), "excerpt-length" => $this->addTextBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH),
"label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Color", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position),
"label-offset-x" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Offset X (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -50, 50),
"notice-offset-x" => __("Offset (X axis) in px (may be negative)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Offset Y (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -50, 50),
"notice-offset-y" => __("Offset (Y axis) in px (may be negative)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Color", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR),
"notice-color" => __("Empty color will use the default color defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-color" => __("Empty color will use the default color defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
@ -476,6 +498,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<a href="http://wordpress.org/support/plugin/footnotes" target="_blank" class="footnote_plugin">', '</a>') "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<a href="http://wordpress.org/support/plugin/footnotes" target="_blank" class="footnote_plugin">', '</a>')
) )
); );
// call wp_head function to get the Styling of the mouse-over box
$g_obj_MCI_Footnotes->a_obj_Task->wp_head();
// display template with replaced placeholders // display template with replaced placeholders
echo $l_obj_Template->getContent(); echo $l_obj_Template->getContent();
} }

View file

@ -171,6 +171,33 @@ class MCI_Footnotes_Settings {
*/ */
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = "footnote_inputfield_custom_mouse_over_box_excerpt_length"; const C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = "footnote_inputfield_custom_mouse_over_box_excerpt_length";
/**
* Settings Container Key for the mouse-over box to define the positioning.
*
* @author Stefan Herndler
* @since 1.5.7
* @var string
*/
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION = "footnote_inputfield_custom_mouse_over_box_position";
/**
* Settings Container Key for the mouse-over box to define the offset (x).
*
* @author Stefan Herndler
* @since 1.5.7
* @var string
*/
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X = "footnote_inputfield_custom_mouse_over_box_offset_x";
/**
* Settings Container Key for the mouse-over box to define the offset (y).
*
* @author Stefan Herndler
* @since 1.5.7
* @var string
*/
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y = "footnote_inputfield_custom_mouse_over_box_offset_y";
/** /**
* Settings Container Key for the mouse-over box to define the color. * Settings Container Key for the mouse-over box to define the color.
* *
@ -352,6 +379,9 @@ class MCI_Footnotes_Settings {
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'no', self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'no',
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 150, self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 150,
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top right',
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 10,
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => 10,
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '',
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#fff7a7', self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#fff7a7',
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1,

View file

@ -370,7 +370,16 @@ class MCI_Footnotes_Task {
// reset the template // reset the template
$l_obj_Template->reload(); $l_obj_Template->reload();
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED))) { if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED))) {
$l_obj_TemplateTooltip->replace(array("index" => $l_str_Index)); $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y));
$l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X));
$l_obj_TemplateTooltip->replace(
array(
"index" => $l_str_Index,
"position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION),
"offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0,
"offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0
)
);
$l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent();
$l_obj_TemplateTooltip->reload(); $l_obj_TemplateTooltip->reload();
} }

View file

@ -1,7 +1,7 @@
== Footnotes Features == == Footnotes Features ==
- Performance of the task so PHP won't throw an error when there are more than 120? Footnotes - Performance of the task so PHP won't throw an error when there are more than 120? Footnotes on a single page
- Maybe increase PHP max execution time while processing the Footnotes task - Maybe increase PHP max execution time while processing the Footnotes task
- different background for every odd table row - different background for every odd table row
@ -11,16 +11,4 @@ the currently used one should be one of those templates and pre-defined styles o
== Footnotes Bugs == == Footnotes Bugs ==
- Excerpt No doesn't work - Setting "Excerpt No" doesn't work
== edit mouse-over box (placeholders in .html file and replace before echo ==
- background color (css)
- border width (css)
- border color (css)
- border radius (css)
- box shadow (css)
- max width (css) (majhul)
- font size (css)
- position (js)
- right to left (js?)

View file

@ -4,7 +4,7 @@
Plugin URI: http://wordpress.org/plugins/footnotes/ Plugin URI: http://wordpress.org/plugins/footnotes/
Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine.
Author: ManFisher Medien ManuFaktur Author: ManFisher Medien ManuFaktur
Version: 1.5.6 Version: 1.5.7
Author URI: http://manfisher.net/plugins/footnotes/ Author URI: http://manfisher.net/plugins/footnotes/
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages

View file

@ -6,7 +6,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tested up to: 4.0 Tested up to: 4.0
License: GPLv3 or later License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable Tag: 1.5.6 Stable Tag: 1.5.7
== Description == == Description ==
@ -84,6 +84,12 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog == == Changelog ==
= 1.5.7 =
- Add: Setting to define the positioning of the mouse-over box
- Add: Setting to define an offset for the mouse-over box (precise positioning)
- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow)
- Bugfix: Rating calculation for the 'other plugins' list
= 1.5.6 = = 1.5.6 =
- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. - **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS.
- Add: .pot file to enable Translations for everybody - Add: .pot file to enable Translations for everybody

View file

@ -12,6 +12,18 @@
<td>[[label-excerpt-length]]</td> <td>[[label-excerpt-length]]</td>
<td>[[excerpt-length]]</td> <td>[[excerpt-length]]</td>
</tr> </tr>
<tr>
<td>[[label-position]]</td>
<td>[[position]]</td>
</tr>
<tr>
<td>[[label-offset-x]]</td>
<td>[[offset-x]] <em>[[notice-offset-x]]</em></td>
</tr>
<tr>
<td>[[label-offset-y]]</td>
<td>[[offset-y]] <em>[[notice-offset-y]]</em></td>
</tr>
<tr> <tr>
<td>[[label-color]]</td> <td>[[label-color]]</td>
<td>[[color]] <em>[[notice-color]]</em></td> <td>[[color]] <em>[[notice-color]]</em></td>

View file

@ -1,5 +1,5 @@
<tr> <tr>
<td class="footnote_plugin_index">[[index]].</td> <td class="footnote_plugin_index"><span id="footnote_plugin_reference_[[index-int]]">[[index]].</span></td>
<td class="footnote_plugin_link"><span id="footnote_plugin_reference_[[index-int]]" onclick="footnote_moveToAnchor('footnote_plugin_tooltip_[[index-int]]');">[[arrow]]</span></td> <td class="footnote_plugin_link"><span onclick="footnote_moveToAnchor('footnote_plugin_tooltip_[[index-int]]');">[[arrow]]</span></td>
<td class="footnote_plugin_text">[[text]]</td> <td class="footnote_plugin_text">[[text]]</td>
</tr> </tr>

View file

@ -5,8 +5,8 @@
effect: "fade", effect: "fade",
fadeOutSpeed: 100, fadeOutSpeed: 100,
predelay: 400, predelay: 400,
position: "top right", position: "[[position]]",
relative: true, relative: true,
offset: [10, 10] offset: [[[offset-y]], [[offset-x]]]
}); });
</script> </script>