I am interested in developing a Math Forum version of Vanilla that would contain some sort of LaTeX editor in which you can put LaTeX code and then have the post result as XHTML (+MathML).
We have a tool (a daemon running here http://tex2xml.kwarc.info/test/edit.php
) that is able to take LaTeX code as input and output XHTML (+MathML for the math) via a version of LaTeXML ( http://dlmf.nist.gov/LaTeXML/
), but I am not sure how to go about modifying VanillaForums.
The first idea that I have would be to have in the MySQL Discussion table two columns, Body and BodySrc and when you are done editing a webpage, what you wrote should be kept in BodySrc and a hook should be launched to send the LaTeX content that you wrote to the daemon running and the result will be put in the Body column and displayed.
In my mind, that would require changes in only three places:
1. In the MySQL table structure (which I am familiar with)
2. In the PHP files where the adding to the database is done where I should:
a. save to BodySrc instead of Body
b. call the daemon with BodySrc
c. get the result from the daemon and put it in Body.
3. In the PHP files, when the content of the Body should be edited, it should load BodySrc instead of Body
Unfortunately, I am not very familiar with how VanillaForums works and would need guidance to see where things happen and to modify in the appropriate place.
If anyone is willing to give me a file name and the line of code where the magic happens, I would be eternally grateful.
P.S.: MathML only works in Firefox, or other Gecko based browsers. Don't expect anything for Webkit based browsers or any other.