News:

Wondering if this will always be free?  See why free is better.

Main Menu

mimetex + smf 1.1.2

Started by riax, April 28, 2007, 07:56:01 AM

Previous topic - Next topic

riax

I got a problem getting mimetex running in smf

mimetex itself is installed and running, i tested it via ./mimetex.cgi and it shows me nice ascii pictures.

so, but the problem is, i have no idea how to include die feature in smf board.
The problem is, that most of the howtos refer to an example.php and the link to those files is always down.

Some tutorials include some code in the /sources/Subs.php - but as i told u above, they dont tell the code itself, and just report to a php file which is down ...

the only hint ive got is this:
hxxp:blog.superadditive.com/2006/12/03/quick-way-to-use-mimetex-with-smf/ [nonactive]
it refers to a .diff file which includes this code:
--- smf-1.1/Sources/Subs.php 2006-12-02 14:15:00.000000000 +0100
+++ smf-1.1+mimetex/Sources/Subs.php 2006-12-02 23:48:26.000000000 +0100
@@ -1593,6 +1593,11 @@
'before' => '<span style="color: white;">',
'after' => '</span>',
),
+ array(
+ 'tag' => 'tex',
+ 'type' => 'unparsed_content',
+ 'content' => '<img src="/cgi-bin/mimetex.cgi?$1" alt="$1" title="$1" border="0" align="absmiddle" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'\' => \'\'));'),
+ ),
);

// This is mainly for the bbc manager, so it's easy to add tags above.  Custom BBC should be added above this line.


but i have no idea what to do with that file.

I hope u can help me in this regard.

SleePy

That is a diff file. If you got the ability to run those on your server you can run it to make the changes.

Otherwise open Subs.php find:
'before' => '<span style="color: white;">',
'after' => '</span>',
),


And add After:
array(
'tag' => 'tex',
'type' => 'unparsed_content',
'content' => '<img src="/cgi-bin/mimetex.cgi?$1" alt="$1" title="$1" border="0" align="absmiddle" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'\' => \'\'));'),
),
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: