restore file

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2328080 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
LolZim 2020-06-20 22:08:58 +00:00
parent 1cb34d3856
commit a8cfa83ca3
8 changed files with 72 additions and 30 deletions

View file

@ -146,7 +146,7 @@ class MCI_Footnotes_Layout_Init {
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher");
echo $l_obj_Template->getContent(); echo $l_obj_Template->getContent();
printf('<em>visit <a href="http://cheret.de" target="_blank">Mark Cheret</a> or <a href="http://herndler.org" target="_blank">herndler.org</a></em>'); 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("<br/><br/>");
printf("<h3>%s</h3>", __('Take a look on other Plugins we have developed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); printf("<h3>%s</h3>", __('Take a look on other Plugins we have developed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME));

View file

@ -32,23 +32,24 @@ class MCI_Footnotes {
* @since 1.5.0 * @since 1.5.0
*/ */
public function run() { public function run() {
// register language // register language
MCI_Footnotes_Language::registerHooks(); MCI_Footnotes_Language::registerHooks();
// register Button hooks // register Button hooks
MCI_Footnotes_WYSIWYG::registerHooks(); MCI_Footnotes_WYSIWYG::registerHooks();
// register general hooks // register general hooks
MCI_Footnotes_Hooks::registerHooks(); MCI_Footnotes_Hooks::registerHooks();
// register all Widgets of the Plugin.
$this->initializeWidgets();
// initialize the Plugin Dashboard // initialize the Plugin Dashboard
$this->initializeDashboard(); $this->initializeDashboard();
// initialize the Plugin Task // initialize the Plugin Task
$this->initializeTask(); $this->initializeTask();
// Register all Public Stylesheets and Scripts // Register all Public Stylesheets and Scripts
add_action('init', array($this, 'registerPublic')); add_action('init', array($this, 'registerPublic'));
// Enqueue all Public Stylesheets and Scripts // Enqueue all Public Stylesheets and Scripts
add_action('wp_enqueue_scripts', array($this, 'registerPublic')); add_action('wp_enqueue_scripts', array($this, 'registerPublic'));
// Register all Widgets of the Plugin.
add_action('widgets_init', array($this, 'initializeWidgets'));
} }
/** /**
@ -57,8 +58,8 @@ class MCI_Footnotes {
* @author Stefan Herndler * @author Stefan Herndler
* @since 1.5.0 * @since 1.5.0
*/ */
private function initializeWidgets() { public function initializeWidgets() {
add_action('widgets_init', create_function('', 'return register_widget("MCI_Footnotes_Widget_ReferenceContainer");')); register_widget("MCI_Footnotes_Widget_ReferenceContainer");
} }
/** /**
@ -94,4 +95,4 @@ class MCI_Footnotes {
wp_enqueue_script('jquery'); wp_enqueue_script('jquery');
wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__));
} }
} }

View file

@ -89,4 +89,4 @@
vertical-align: top; vertical-align: top;
width: 99%; width: 99%;
text-align: left; text-align: left;
} }

View file

@ -17,4 +17,4 @@ the currently used one should be one of those templates and pre-defined styles o
== TODO == == TODO ==
- Statistics: How many Footnotes in each post/page - Statistics: How many Footnotes in each post/page
- Convert from other Footnote Plugins (e.g. ' ((' from Civil Footnotes) - Convert from other Footnote Plugins (e.g. ' ((' from Civil Footnotes)
- Anonymous stats to the developers - Anonymous stats to the developers

View file

@ -1,29 +1,29 @@
<?php <?php
/* /*
Plugin Name: footnotes Plugin Name: footnotes
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: Mark Cheret Author: Mark Cheret
Version: 1.6.5 Version: 1.6.4
Author URI: http://cheret.de/plugins/footnotes-2/ Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages
*/ */
/* /*
Copyright 2019 Mark Cheret (email : mark@cheret.de) Copyright 2019 Mark Cheret (email : mark@cheret.de)
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 3, as it under the terms of the GNU General Public License, version 3, as
published by the Free Software Foundation. published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
/** /**
* @filesource * @filesource

View file

@ -61,8 +61,8 @@
getInfo : function() { getInfo : function() {
return { return {
longname : 'Inserts the Footnotes short code.', longname : 'Inserts the Footnotes short code.',
author : 'Mark Cheret', author : 'ManFisher Medien ManuFaktur',
authorurl : 'http://cheret.de', authorurl : 'http://http://manfisher.net/',
infourl : 'http://wordpress.org/plugins/footnotes/', infourl : 'http://wordpress.org/plugins/footnotes/',
version : "1.5.0" version : "1.5.0"
}; };

View file

@ -0,0 +1,41 @@
<script type="text/javascript">
/**
* adds a tag in at the beginning and at the end of a selected text in the specific text area
* @param string elementID
* @param string openTag
* @param string closeTag
*/
function MCI_Footnotes_wrapText(elementID, openTag, closeTag) {
var textArea = jQuery('#' + elementID);
var len = textArea.val().length;
var start = textArea[0].selectionStart;
var end = textArea[0].selectionEnd;
var selectedText = textArea.val().substring(start, end);
var replacement = openTag + selectedText + closeTag;
textArea.val(textArea.val().substring(0, start) + replacement + textArea.val().substring(end, len));
}
/**
* adds a new button to the plain text editor
*/
QTags.addButton( 'MCI_Footnotes_QuickTag_button', 'footnotes', MCI_Footnotes_text_editor_callback );
/**
* callback function when the button is clicked
* executes a ajax call to get the start and end tag for the footnotes and
* adds them in before and after the selected text
*/
function MCI_Footnotes_text_editor_callback() {
jQuery.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: {
action: 'footnotes_getTags'
},
success: function(data, textStatus, XMLHttpRequest){
var l_arr_Tags = JSON.parse(data);
MCI_Footnotes_wrapText("content", l_arr_Tags['start'], l_arr_Tags['end']);
},
error: function(MLHttpRequest, textStatus, errorThrown){
}
});
}
</script>

View file

@ -9,4 +9,4 @@
relative: true, relative: true,
offset: [[[offset-y]], [[offset-x]]] offset: [[[offset-y]], [[offset-x]]]
}); });
</script> </script>