Page 1 of 1

Math - LATEX

Posted: 08 Jan 2012, 21:31
by Chico Gois
For those who need to post mathematical formulas, I found this tip and resource that can be read in full at this address http://www.codecogs.com/pages/forums/pa ... hp?id=1682

Basically this is the changes:

Prosilver:
Open: overall_header.html

Find:

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
After, add:

Code: Select all

<script type="text/javascript" src="http://latex.codecogs.com/editor.js"></script>
Open: posting_buttons.html

Find:

Code: Select all

<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
<!-- END custom_tags -->
After, add

Code: Select all

<input type="button" class="button2" onclick="javascript:OpenLatexEditor('message','phpBB','')" value="Equation Editor"/>
Subsilver2:
Open: posting_buttons.html

Find:

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
After, Add

Code: Select all

<script type="text/javascript" src="http://latex.codecogs.com/editor.js"></script>
Find:

Code: Select all

<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 -->
After, Add

Code: Select all

<input type="button" class="btnbbcode" onclick="javascript:OpenLatexEditor('message','phpBB','')" value="Equation Editor"/>
Find:

Code: Select all

<textarea name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);"
onkeyup="storeCaret(this);" style="width: 98%;">{MESSAGE}</textarea>
Replace:

Code: Select all

<textarea id="message" name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 98%;">{MESSAGE}</textarea>
Below are the instruction on how to install the BBCode, therefore it is similar for both styles:

BBCode:

Code: Select all

[tex]{TEXT}[/tex]
HTML:

Code: Select all

<img style="vertical-align: middle" src="http://latex.codecogs.com/png.latex?{TEXT}"/>
Help Line:

Code: Select all

[tex]Your equation[/tex]
Demo:
bi.gif
bi.gif (1.01 KiB) Viewed 4723 times
Or my board:

http://www.mundophpbb.com.br/forum/view ... p?f=14&t=8

Math - LATEX

Posted: 08 Jan 2012, 22:05
by Stoker
Looks great :thumb:

Math - LATEX

Posted: 21 Mar 2012, 21:19
by Jessica
this is PERFECT. use it on my forum, really useful you can type it in the pop up