- 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:
parent
6a4677251a
commit
e054849b1e
17 changed files with 328 additions and 122 deletions
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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>
|
|
@ -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();
|
||||
|
|
Reference in a new issue