[BETA] MathJax phpBB Integration

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

[BETA] MathJax phpBB Integration

Post by sergio91pt » Fri Jul 08, 2011 3:53 pm

Port to phpBB v3.1.3 available here by marcovo.

Modification Name: MathJax phpBB Integration
Author: sergio91pt

Modification Description: enables users to post beautiful math in LaTeX and MathML, rendered in all major browsers using the MathJax JavaScript Library.

Modification Version: 0.2.4
Requirements: The MathJax library accessible from the forum web path or the ability to accept MathJax CDN TOS.

Features:
  • Uses the phpBB BBCode system.
  • Multiple BBCodes can be used with static preview texts.
  • Dynamic loading, saving users time and bandwidth.
  • MathJax CDN can be used with a local installed copy for fallback purposes.
  • Rendering is done in the client side, by the JavaScript library. No complicated setups!
  • Works on all major browsers.
  • Renders in native MathML, Web fonts and Image fonts depending on the browser capabilities.
Screenshots:
ImageImage Image Image


Development: On GitHub

Modification Download: Download v0.2.4

Image
Last edited by sergio91pt on Sat Feb 07, 2015 1:38 pm, edited 14 times in total.

User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 8341
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius
Contact:

Re: [DEV] MathJax phpBB Integration

Post by _Vinny_ » Fri Jul 08, 2011 4:53 pm

Looks nice
Great job. ;)

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] MathJax phpBB Integration

Post by 4_seven » Fri Jul 08, 2011 4:55 pm

yap, genius api..
Current Mods | Mod Base | php(BB) programming | No help via PM

sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [DEV] MathJax phpBB Integration

Post by sergio91pt » Mon Jul 25, 2011 7:45 pm

Just released v0.2.0:

I practically rewritten the whole thing. Now I can say that this is more than a link to a js file.
Now it uses phpBB BBCode system, it should be faster because the JavaScript files are only loaded if theres a math BBCode to process and those pre-processors that scan the whole page for delimiters like $$ are disabled.

Feedback is appreciated.
Download v0.2.0

Heres the full changelog:
  • Pretty much rewritten the mod.
  • Added support for MathML.
  • Removed MathJax pre-processors.
  • Created phpBB2jax, a small pre-processor that turns special span tags into math scripts.
  • Added option to force HTTPS on the CDN.
  • Flawless dynamic loading with the option to disable it.
  • Removed options to disable for posts and BBCodes in favor of a global one.
  • Now it uses the native phpBB BBCode system, introducing the concept of math BBCodes and fixing the flaws of the old method.
  • Added an option to specify a static preview for each BBCode.
  • Removed as much as possible edits to core files.
  • Added validation to the library path.
  • Added a configuration form to UMIL.
  • Added support for the Version check Mod.
  • Removed support for LaTeX display math.

sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [DEV] MathJax phpBB Integration

Post by sergio91pt » Mon Aug 01, 2011 12:11 am

v0.2.1:
  • Fixed: Chromium not displaying math
Its a minor update because I noted that Chromium wasn't rendering anything because of innerText (DOM Property).
I'm on vacation and for some reason I can't seem to get an AD-HOC network working so I only ended up testing on Firefox 5, Chromium 12 and Opera 11.

Dwi Guna
Registered User
Posts: 6
Joined: Tue Aug 23, 2011 1:46 pm

Re: [DEV] MathJax phpBB Integration

Post by Dwi Guna » Tue Aug 23, 2011 2:49 pm

Great Mod Sir, But what is the path should be?

I try for sometimes, it was not succesfull.

Best regards

sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [DEV] MathJax phpBB Integration

Post by sergio91pt » Tue Aug 23, 2011 4:57 pm

Dwi Guna wrote:Great Mod Sir, But what is the path should be?

I try for sometimes, it was not succesfull.

Best regards
The "MathJax Installation Path" is the relative path to the local copy of the MathJax library.
Its only required if you don't use the CDN and will throw an error if the path you typed doesn't have a file named MathJax.js inside.

Dwi Guna
Registered User
Posts: 6
Joined: Tue Aug 23, 2011 1:46 pm

Re: [DEV] MathJax phpBB Integration

Post by Dwi Guna » Wed Aug 24, 2011 7:06 am

sergio91pt wrote:
Dwi Guna wrote:Great Mod Sir, But what is the path should be?

I try for sometimes, it was not succesfull.

Best regards
The "MathJax Installation Path" is the relative path to the local copy of the MathJax library.
Its only required if you don't use the CDN and will throw an error if the path you typed doesn't have a file named MathJax.js inside.

Thanks for the tutorial Mr. Sergio, But i don't have my own server that run 24 hours a day right now.

So I choose using your CDN, it's really cool. Using CDN is that means my sites give loads to your server? Is there any maximum quota Sergio?

Thanks and best regards

sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [DEV] MathJax phpBB Integration

Post by sergio91pt » Wed Aug 24, 2011 10:20 am

Dwi Gunna, since its a javascript library you don't need your own server: the installation I mentioned is just extracting the zip.

The CDN is operated by the MathJax Sponsors, not me, its hosted on Amazon Cloudfront and I don't think theres any limits imposed.

Dwi Guna
Registered User
Posts: 6
Joined: Tue Aug 23, 2011 1:46 pm

Re: [DEV] MathJax phpBB Integration

Post by Dwi Guna » Thu Aug 25, 2011 1:27 am

sergio91pt wrote:Dwi Guna, since its a javascript library you don't need your own server: the installation I mentioned is just extracting the zip.

The CDN is operated by the MathJax Sponsors, not me, its hosted on Amazon Cloudfront and I don't think theres any limits imposed.
Thanks Sergio, really appreciate for the info and your tips&trick.

Great Project!

User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [DEV] MathJax phpBB Integration

Post by muggins » Thu Aug 25, 2011 1:50 am

I visited their page out of curiosity, and found it pretty slow in rendering the LaTeX. I host my own service, and mine caches the images for future use to avoid having to call /usr/bin/latex for every request.

I'm old-fashioned and skeptical about cloud services, but for someone who doesn't have the options I do, I guess this is OK.
Muggins

sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [DEV] MathJax phpBB Integration

Post by sergio91pt » Fri Aug 26, 2011 2:56 pm

muggins, it has its advantages: The browser also caches the javascript & web fonts used. The math is copyable to applications that support MathML (not many) and the LaTeX source is available for others.

MathJax is not a cloud service, its a javascript library, the client is the one that renders the math.
Also you may want to test the MathML renderer in Firefox, its very fast and its support is okay for most math.

sergio91pt
Registered User
Posts: 62
Joined: Thu Jul 07, 2011 11:03 am

Re: [DEV] MathJax phpBB Integration

Post by sergio91pt » Sun Dec 18, 2011 2:56 am

v0.2.2:
  • Fixed settings always throwing a path error
  • Fixed javascript so it displays on IE 6
Download v0.2.2

User avatar
kas5986
Registered User
Posts: 227
Joined: Sat Dec 26, 2009 11:16 am
Location: Karachi, Pakistan
Name: syed shafiq
Contact:

Re: [DEV] MathJax phpBB Integration

Post by kas5986 » Sun Dec 18, 2011 10:25 am

nice looking forword to see beta

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [DEV] MathJax phpBB Integration

Post by keith10456 » Mon Dec 19, 2011 11:24 pm

kas5986 wrote:nice looking forword to see beta
+1

Locked

Return to “[3.0.x] MODs in Development”