]> git.mxchange.org Git - friendica-addons.git/blobdiff - mathjax/mathjax.php
Merge branch 'master' of https://github.com/friendica/friendica-addons
[friendica-addons.git] / mathjax / mathjax.php
index 7105772ba80fe1120776c422305949186dbae118..e57d69bf54f6db84fdbca972622c4d319aea31d2 100644 (file)
@@ -66,11 +66,12 @@ function mathjax_plugin_admin_post (&$a) {
     info( t('Settings updated.'). EOL);
 }
 function mathjax_plugin_admin (&$a, &$o) {
-       $t = file_get_contents( dirname(__file__)."/admin.tpl");
-        if (get_config('mathjax','baseurl','') == '') {
-            set_config('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML');
-        }
-        $o = replace_macros( $t, array(
+       $t = get_markup_template( "admin.tpl", "addon/mathjax/" );
+       if (get_config('mathjax','baseurl','') == '') {
+               set_config('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML');
+       }
+
+       $o = replace_macros( $t, array(
                '$baseurl' => array('baseurl', t('MathJax Base URL'), get_config('mathjax','baseurl' ), t('The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax.')),
-            ));
+       ));
 }