Math - LATEX

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
Chico Gois
BBCoder II
BBCoder II
Posts: 10
Joined: 08 Mar 2010, 15:00

Math - LATEX

Post by Chico Gois » 08 Jan 2012, 19:31

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
Or my board:

http://www.mundophpbb.com.br/forum/view ... p?f=14&t=8
You do not have the required permissions to view the files attached to this post.


User avatar
Stoker
Site Admin
Site Admin
Posts: 3534
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Math - LATEX

Post by Stoker » 08 Jan 2012, 20:05

Looks great :thumb:
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear

Jessica
BBCoder II
BBCoder II
Posts: 66
Joined: 25 Apr 2010, 23:26
BBCodes: 50
Favourite BBCode: spoilvtitle
Favourite MOD: AJAX Quick Edit
Location: Pennsylvania

Math - LATEX

Post by Jessica » 21 Mar 2012, 19:19

this is PERFECT. use it on my forum, really useful you can type it in the pop up