Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases

Reply
 
Thread Tools
Mimetex Details »»
Mimetex
Version: 1.00, by the_sisko the_sisko is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-07-2004 Last Update: Never Installs: 15
Is in Beta Stage  
No support by the author.

As I promised in this thread some time ago, I will post a short install note on how to get mimetex to work on vB.

1.
You need to download the mimeTex source files to compile and install mimeTeX. I don't know if it is allowed to attached the compied mimetex.cgi file, nor do I know if there is something server specific in my file. So you have to do this on your own. Compile and installation instruction can be found in the mimetex source files.
http://moodle.org/download/mimetex/source/mimetex.html
EDIT (2005-06-14):Added the mimetex.cgi file as attachment

2.
Upload the mimetex.cgi file to a folder on your server where it could be used. As we don't wanted our users or anybody else to access this file, we put it outside the webserver root.

3. Create a folder on your webserver where the mimeTex images should be stored.

4.
Open the atteched functions_mimetex.php and alter the three variables at the beginning to your needs. Upload the attached functions_mimetex.php file to your /includes/ folder.

5.
Open /includes/functions_bbcodeparse.php
Find:
PHP Code:
    // end smilies 
below add:
PHP Code:
  // Latex Hack by CDK
    
require_once('functions_mimetex.php');   
    
$bbcode mimetex($bbcode); 
upload altered file.

6. If everything went right you should now can use [tex]\frac{x^3 + 2 x^2 - 6 x + 7}{x^2+1}[/tex] which results in http://www.chemieonline.de/images/fo...97a0d49e15.gif


I've put up some samples in the zip file. More samples by one of our Moderators can be found here: http://www.studenten-city.de/forum/s...91&postcount=1


It was a hack made for our forum, I have no further interest in developing this into a real stabel hack. Its working for us. I posted this, just to give other users who needed this a start into the right direction.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-16-2004, 12:29 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can somebody please explain to me what this hack does?
Reply With Quote
  #13  
Old 09-16-2004, 12:35 PM
the_sisko's Avatar
the_sisko the_sisko is offline
 
Join Date: Oct 2001
Location: Hamburg,Germany
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bitg
Can somebody please explain to me what this hack does?
Just take a look at the samples in the zip file.
You can post latex codes on your forums which will generate a picture with the formular.
Reply With Quote
  #14  
Old 06-06-2005, 11:11 PM
php4dev php4dev is offline
 
Join Date: Jan 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please attach the compiled mimetex.cgi as a zip file....

and if you want give us more infromations about the installation ...

I am not a profissional like you :tired:

thanks and best regards
Reply With Quote
  #15  
Old 06-07-2005, 07:21 AM
the_sisko's Avatar
the_sisko the_sisko is offline
 
Join Date: Oct 2001
Location: Hamburg,Germany
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As I said in my first post, I don't know if I can do this nor do I know if there is anything server specific in my CGI file.
Here a quote from the install README:
Quote:
QUICK START
------------------------------------------------------------------------
To compile and install mimeTeX
* unzip mimetex.zip in any convenient working directory
* to produce an executable that emits anti-aliased
gif images (recommended)
cc -DAA mimetex.c gifsave.c -lm -o mimetex.cgi
-or- for gif images without anti-aliasing
cc -DGIF mimetex.c gifsave.c -lm -o mimetex.cgi
-or- to produce an executable that emits mime xbitmaps
cc -DXBITMAP mimetex.c -lm -o mimetex.cgi
(For Windows, see "Compile Notes" in Section III below.)
* mv mimetex.cgi to your server's cgi-bin/ directory
* mv mimetex.html to your server's htdocs/ directory
* if the relative path from htdocs to cgi-bin isn't
../cgi-bin then edit mimetex.html and change the
few dozen occurrences as necessary.
Then, to quickly learn more about mimeTeX
* point your browser to www.yourdomain.com/mimetex.html
Any problems with the above?
* read the more detailed instructions below,
or see http://www.forkosh.com/mimetex.html
Reply With Quote
  #16  
Old 06-07-2005, 09:12 AM
php4dev php4dev is offline
 
Join Date: Jan 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by the_sisko
* to produce an executable that emits anti-aliased
gif images (recommended)
cc -DAA mimetex.c gifsave.c -lm -o mimetex.cgi
-or- for gif images without anti-aliasing
cc -DGIF mimetex.c gifsave.c -lm -o mimetex.cgi
-or- to produce an executable that emits mime xbitmaps
cc -DXBITMAP mimetex.c -lm -o mimetex.cgi
(For Windows, see "Compile Notes" in Section III below.)
This is very complex way .... :cry: :cry: :cry: :cry: :cry:


Can you give me another way to compile the cgi file ? please ?


Thanks & best regards
Reply With Quote
  #17  
Old 06-10-2005, 11:03 AM
php4dev php4dev is offline
 
Join Date: Jan 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reply With Quote
  #18  
Old 06-14-2005, 05:28 PM
the_sisko's Avatar
the_sisko the_sisko is offline
 
Join Date: Oct 2001
Location: Hamburg,Germany
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Added the compiled mimetex.cgi file to the first post.
Reply With Quote
  #19  
Old 06-14-2005, 07:29 PM
php4dev php4dev is offline
 
Join Date: Jan 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you veeeeery much my friend



Reply With Quote
  #20  
Old 08-31-2005, 02:30 PM
edst edst is offline
 
Join Date: Aug 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've just installed this and have followed the directions thoroughly. Note that there's a missing close quote and ; from line 11 of the functions_mimetex.php in the zip file.

When I try to put an equation in a thread, I now get an error message:

Warning: system() has been disabled for security reasons in /includes/functions_mimetex.php on line 49

How do I address this error message? I see the system() call is what's actually referencing the cgi file, so it's clearly critical to this functionality.
Reply With Quote
  #21  
Old 08-31-2005, 04:04 PM
edst edst is offline
 
Join Date: Aug 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, I've found a workaround. So if you cannot use system calls on your system, replace all the lines inside the $do_latex loop as follows:
Code:
    if($do_latex) {
    	$mimetex_formula = $tex_matches[1][$i];
   	$text = substr_replace($text, "<img src='".$cgi_path."?".$mimetex_formula."' alt='".htmlentities($mimetex_formula, ENT_QUOTES)."' align=absmiddle>",$pos,strlen($tex_matches[0][$i]));
    }
Where $cgi_path is defined at the top as:
Code:
	$cgi_path = "http://yourdomain/cgi-bin/mimetex.cgi";
There are no images stored with this method, so some could be trimmed down from the initial php code too.

edit: cleaned up the img tag a bit.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04431 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete