News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Mathjax conflict with quote and modify buttons

Started by xoochu, April 16, 2015, 05:25:13 AM

Previous topic - Next topic

xoochu

Good day smf!

We just created an engineering forum using smf and realized smf is really amazing + mods are great. :)
SMF version 2.0.9
I am trying to use mathjax javascript to be able to typeset math equations using latex.
Attached is the mod i found outside smf from google groups
this is what the mod does to subsphp





while it works perfectly: converting a latex equation to readable view,
it disables the quote and quick modify button.
that is, when i click quote, it takes me to quick reply box and does nothing.
this happens on all themes so it can't be a theme problem.
the quote button goes back to normal when i uninstall the mod.

How can i properly add mathjax.js to smf without affecting quote and modify?
Or is there something wrong with the code inserted?
Since inserting works, could there be a way to not let the javascript cause conflicts? (like code relocation perhaps)

tnx :)


I'm new to the forums and i hope I posted in the right board (please help me if i got it wrong tnx.) :)

margarett

Hi

Unfortunately I had to remove your attachment.

The MOD has no license, which means that full restrictions apply, including not allowing redistribution. Which means we can't host the file...

That being said, you probably have a JavaScript conflict, check your browser's console
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

xoochu

Quote from: margarett on April 16, 2015, 04:27:57 PM
Hi

Unfortunately I had to remove your attachment.

The MOD has no license, which means that full restrictions apply, including not allowing redistribution. Which means we can't host the file...

That being said, you probably have a JavaScript conflict, check your browser's console
.

thank u margarrett, sorry about the attachment.

is there a way i could fix this?
without having to install mods, just inserting codes?

Biology Forums

Hello, could you make the mod available through dropbox, I am really interested in implementing this system.

Illori

Quote from: Shuban on April 17, 2015, 03:05:52 PM
Hello, could you make the mod available through dropbox, I am really interested in implementing this system.

they should not as they can not legally distribute the mod

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

xoochu

Quote from: Shuban on April 17, 2015, 03:05:52 PM
Hello, could you make the mod available through dropbox, I am really interested in implementing this system.

thank you Shuban! people from the math/science forums will really be glad if this could have an official mod :)  :laugh: :D
you can find it in google groups by the ff query:




i believe there really is a way to fix this since mathjax is available to several popular platforms  ;D 8)


Biology Forums

This thing works great! Here's an example.

http://www.ecoalition.ca/index.php?topic=3589.0

Only issue is that anything that has a $ sign in front of it becomes a math equation.

Quotewhile it works perfectly: converting a latex equation to readable view,
it disables the quote and quick modify button.
that is, when i click quote, it takes me to quick reply box and does nothing.

Yes, same with me.

xoochu

Hello guys!
Good news! I finally found the fix. :)
I added the following script just after the last line of the index.template.php file under the folder of my current theme.

<script type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

Source: mathjax website

Voila!
My quote and modify buttons are now working and we are happily using Latex Equations with Mathjax as well.
May this help those who want to use latex to input equations in their forums :D

The $$...$$ delimiters are the ones that work for this code.
Beautiful :)



Advertisement: