I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index » Products » LaTeX Equation Editor »

Help Integrate into phpBB

humongous\′s Photo
6 Nov 09, 1:29AM
Help Integrate into phpBB
Hi Will, I managed to successfully integrate your neat program into my phpBB 3.0.5 forum.

It's fairly simple, but I'm a noob so..

Here's what I did.

Go to styles, current template, edit:

In posting_buttons.html, Find
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>

Add Before
<script type="text/javascript" src="http://latex.codecogs.com/editor.js"></script>
Then Find
<input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
<!-- END custom_tags -->
Add After
<a href="javascript:OpenLatexEditor('whatever-id-name-you-want','phpBB','')"><input type="button" class="btnbbcode" name="Equation Editor" value="Equation Editor" /></a>

Then in posting_body.html, Find
<textarea name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 98%;">{MESSAGE}</textarea>
Add Before name="message"
id="whatever-id-name-you-gave-previously"

What left is to customise the BBCode.

What I did:

In Posting > BBCodes > Add new BBCodes

For BBCode usage
[tex]{TEXT}[/tex]
The HTML Replacement
<img style="vertical-align: middle" src="http://latex.codecogs.com/png.latex?\fg_FFFFFF {TEXT}"/>
(My forum use dark bg so that color settings is optional)

Done!
Currently you need to be logged in to leave a message.