diff --git a/.gitignore b/.gitignore
index 62c8935..6f0f954 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-.idea/
\ No newline at end of file
+.idea/
+todo.txt
\ No newline at end of file
diff --git a/README.md b/README.md
index 806134e..a104501 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# SMF MathJax mod
* **Author:** digger http://mysmf.ru
* **License:** GPLv3
-* **Compatible with:** SMF 2.0
+* **Compatible with:** SMF 2.0, SMF 2.1
## Description
This mod integrates the MathJax library into SMF forum. MathJax is the modern JavaScript-based LaTeX rendering solution for the Internet. Mod uses the MathJax CDN. The CDN will automatically arrange for your readers to download MathJax files from a fast, nearby server. And since bug fixes and patches are deployed to the CDN as soon as they become available, your pages will always be up to date with the latest browser and devices.
diff --git a/Sources/Mod-MathJax.php b/Sources/Mod-MathJax.php
index aece221..dbe190d 100644
--- a/Sources/Mod-MathJax.php
+++ b/Sources/Mod-MathJax.php
@@ -2,10 +2,10 @@
/**
* @package SMF MathJax Mod
* @author digger
- * @copyright 2011—2015
+ * @copyright 2011—2016
* @license GPLv3
* @file Mod-MathJax.php
- * @version 1.3
+ * @version 1.4
*/
if (!defined('SMF')) {
@@ -30,10 +30,12 @@ function loadMathJaxHooks()
*/
function loadMathJaxJs()
{
- global $context;
+ global $context, $txt;
+
+ //$txt['shortcuts_firefox'] .= '';
$context['insert_after_template'] .= '
- ';
+ ';
}
@@ -89,6 +91,6 @@ function addMathjaxCopyright()
global $context;
if ($context['current_action'] == 'credits') {
- $context['copyrights']['mods'][] = 'MathJax for SMF © 2011—2015, digger | Powered by MathJax';
+ $context['copyrights']['mods'][] = 'MathJax for SMF © 2011—2016, digger | Powered by MathJax';
}
}
\ No newline at end of file
diff --git a/Themes/default/images/bbc/latex.gif b/Themes-2.0/default/images/bbc/latex.gif
similarity index 100%
rename from Themes/default/images/bbc/latex.gif
rename to Themes-2.0/default/images/bbc/latex.gif
diff --git a/Themes/default/images/bbc/latex_inline.gif b/Themes-2.0/default/images/bbc/latex_inline.gif
similarity index 100%
rename from Themes/default/images/bbc/latex_inline.gif
rename to Themes-2.0/default/images/bbc/latex_inline.gif
diff --git a/Themes-2.1/default/images/bbc/latex.png b/Themes-2.1/default/images/bbc/latex.png
new file mode 100644
index 0000000..1fd0713
Binary files /dev/null and b/Themes-2.1/default/images/bbc/latex.png differ
diff --git a/Themes-2.1/default/images/bbc/latex_inline.png b/Themes-2.1/default/images/bbc/latex_inline.png
new file mode 100644
index 0000000..4c54dfd
Binary files /dev/null and b/Themes-2.1/default/images/bbc/latex_inline.png differ
diff --git a/hooks.php b/hooks.php
index 4d7b948..386c62a 100644
--- a/hooks.php
+++ b/hooks.php
@@ -2,10 +2,10 @@
/**
* @package SMF MathJax Mod
* @author digger
- * @copyright 2011—2015
+ * @copyright 2011—2016
* @license GPLv3
* @file hooks.php
- * @version 1.3
+ * @version 1.4
*
* To run this install manually please make sure you place this
* in the same place and SSI.php and index.php
diff --git a/modification.xml b/modification.xml
new file mode 100644
index 0000000..bc45ee2
--- /dev/null
+++ b/modification.xml
@@ -0,0 +1,21 @@
+
+
+
+
+ digger:mathjax
+ MathJax
+ 1.4
+ modification
+
+
+
+
+
+
+
+
+
diff --git a/package-info.xml b/package-info.xml
index 4657cba..b0082de 100644
--- a/package-info.xml
+++ b/package-info.xml
@@ -12,13 +12,16 @@
digger:mathjax
MathJax
- 1.3
+ 1.4
modification
- readme.txt
+ readme/english.txt
+ readme/russian.txt
+ readme/russian-utf8.txt
-
+
+ modification.xml
hooks.php
@@ -26,6 +29,25 @@
+ modification.xml
+ hooks.php
+
+
+
+ readme/english.txt
+ readme/russian.txt
+ readme/russian-utf8.txt
+
+
+ modification.xml
+ hooks.php
+
+
+
+
+
+
+ modification.xml
hooks.php
diff --git a/readme.txt b/readme/english.txt
similarity index 82%
rename from readme.txt
rename to readme/english.txt
index e897bb3..3e91da0 100644
--- a/readme.txt
+++ b/readme/english.txt
@@ -1,17 +1,19 @@
+[center][b]MathJax[/b][/center]
+
This mod integrates the MathJax library into SMF forum. MathJax is the modern JavaScript-based LaTeX rendering solution for the Internet. Mod uses the MathJax CDN. The CDN will automatically arrange for your readers to download MathJax files from a fast, nearby server. And since bug fixes and patches are deployed to the CDN as soon as they become available, your pages will always be up to date with the latest browser and devices.
+[url=https://www.mathjax.org]MathJax official site[/url]
+[url=https://github.com/realdigger/SMF-MathJax-Mod]Mod support page[/url]
[hr]
MathJax is an open source JavaScript display engine for mathematics that works in all modern browsers.
-High-quality typography. MathJaxTM uses modern CSS and web fonts, instead of equation images or Flash, so equations scale with surrounding text at all zoom levels. See how this works in the scaling math demo.
-
-Works in all modern browsers. This allows the math in your content to be seen clearly by virtually all readers, even those using smart phones. See supported browsers.
+High-quality typography. MathJaxTM uses modern CSS and web fonts, instead of equation images or Flash, so equations scale with surrounding text at all zoom levels. See how this works in the scaling math demo.
-Simple integration. Using MathJax with blogs, wikis, web pages and other web apps is easy. Learn more about installing MathJax with popular platforms like WordPress, MediaWiki, Drupal, and more.
+Works in all modern browsers. This allows the math in your content to be seen clearly by virtually all readers, even those using smart phones. See supported browsers.
-Copy and paste math. Let readers copy equations from your web pages into Word and LaTeX documents, science blogs, research wikis, calculation software like Maple, Mathematica and more. Watch the copy and paste demo.
+Simple integration. Using MathJax with blogs, wikis, web pages and other web apps is easy. Learn more about installing MathJax with popular platforms like WordPress, MediaWiki, Drupal, and more.
-A rich API. Allows developers to create interactive course materials, advanced authoring tools, and math-enabled web apps. Learn how more about programming with MathJax.
+Copy and paste math. Let readers copy equations from your web pages into Word and LaTeX documents, science blogs, research wikis, calculation software like Maple, Mathematica and more. Watch the copy and paste demo.
-Accessible math. MathJax is compatible with screenreaders used by people with vision disabilities, and the Zoom feature allows all readers to see small details like scripts, primes and hats. See how to make your math accessible.
+A rich API. Allows developers to create interactive course materials, advanced authoring tools, and math-enabled web apps. Learn how more about programming with MathJax.
-[url]https://www.mathjax.org[/url]
+Accessible math. MathJax is compatible with screenreaders used by people with vision disabilities, and the Zoom feature allows all readers to see small details like scripts, primes and hats. See how to make your math accessible.
\ No newline at end of file
diff --git a/readme/russian-utf8.txt b/readme/russian-utf8.txt
new file mode 100644
index 0000000..3eac452
--- /dev/null
+++ b/readme/russian-utf8.txt
@@ -0,0 +1,5 @@
+[center][b]MathJax[/b][/center]
+
+Этот мод интегрирует библиотеку MathJax в SMF. MathJax это современное решение для рендеринга формул LaTeXis посредством JS в браузерах. Мод загружает библиотеку из официальной CDN разработчиков, так что у вас всегда будет самая актуальная версия с последними обновлениями и исправлениями.
+[url=https://www.mathjax.org]Официальный сайт MathJax[/url]
+[url=https://github.com/realdigger/SMF-MathJax-Mod]Страница разработчиков мода[/url]
\ No newline at end of file
diff --git a/readme/russian.txt b/readme/russian.txt
new file mode 100644
index 0000000..3e2115a
--- /dev/null
+++ b/readme/russian.txt
@@ -0,0 +1,5 @@
+[center][b]MathJax[/b][/center]
+
+ MathJax SMF. MathJax LaTeXis JS . CDN , .
+[url=https://www.mathjax.org] MathJax[/url]
+[url=https://github.com/realdigger/SMF-MathJax-Mod] [/url]
\ No newline at end of file