How to install jsTeXrender for phpBB 2.0.x forums

It’s easy to install our JavaScript LaTeX equation render engine to phpBB 2.0.x. Please remember that you will install the script only one time and run it forever. Once you have installed the renderer, the user can post the LaTeX equation with TEX BBCode, e.g.,

Code: Select all
[tex]f(x)=\int_{-\infty}^xe^{-t^2}dt[/tex]

and the output should be

f(x)=\int_{-\infty}^xe^{-t^2}dt

Note: For phpBB 2.0.x forums, you have to edit bbcode.php and overall_footer.tpl files manually. (See instruction for phpBB 3.0.x)

How to embed the render to phpBB 2.0.x forums

Code: Select all
#--------[open]-----------------------------------------------------
/templates/subSilver/overall_footer.tpl
#--------[find]-----------------------------------------------------
</body>
#--------[before, add]----------------------------------------------
<script type="text/javascript" src="http://tex.yourequations.com/"></script>

How to enable BBCode

Code: Select all
#--------[open]-----------------------------------------------------
/includes/bbcode.php
#--------[find]-----------------------------------------------------
// Remove our padding from the string..
#--------[before, add]----------------------------------------------
//[tex]latex_equation_here[/tex]
$text = preg_replace('/\[tex\](.*?)\[\/tex\]/ie',
"'<pre lang=\"eq.latex\">$1</pre>'",
$text);

Optional

  • You can use any custom BBCode instead of
    Code: Select all
    [tex]...[/tex]

    e.g.,

    Code: Select all
    [eq]...[/eq]

    or

    Code: Select all
    [math]...[/math]
  • You can use CODE instead of PRE tag as state the difference in docs.

Please read more Tutorials

Share this:
  • Digg
  • del.icio.us
  • StumbleUpon
  • TwitThis
  • Facebook
  • YahooMyWeb
  • Google Bookmarks

Random Posts

3 Responses to “How to install jsTeXrender for phpBB 2.0.x forums”

  1. [...] Your Equations Blog Display Equations on World Wide Web « How to install jsTeXrender for phpBB 2.0.x forums [...]

  2. MichaellaS says:

    tks for the effort you put in here I appreciate it!

  3. kerja keras says:

    thanks for the tutorial, its very interesting. -keep share- brother.

Leave a Reply