|
Revision 65, 0.8 kB
(checked in by d0nut, 6 years ago)
|
|
mimetex integration
|
-
Property svn:executable set to
*
|
| Rev | Line | |
|---|
| [63] | 1 | <?php |
|---|
| 2 | require_once(WCF_DIR.'lib/data/message/bbcode/BBCodeParser.class.php'); |
|---|
| 3 | require_once(WCF_DIR.'lib/data/message/bbcode/BBCode.class.php'); |
|---|
| 4 | |
|---|
| 5 | /** |
|---|
| 6 | * BBCode for [tex] Tag |
|---|
| 7 | * |
|---|
| 8 | * @author Torben Brodt |
|---|
| 9 | * @package com.woltlab.wcf.data.message.bbcode.tex |
|---|
| 10 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> |
|---|
| 11 | */ |
|---|
| 12 | class TexBBCode implements BBCode { |
|---|
| 13 | /** |
|---|
| 14 | * @see BBCode::getParsedTag() |
|---|
| 15 | */ |
|---|
| 16 | public function getParsedTag($openingTag, $content, $closingTag, BBCodeParser $parser) { |
|---|
| 17 | if ($parser->getOutputType() == 'text/html') { |
|---|
| [65] | 18 | return '<img src="'.MESSAGE_BBCODE_TEX_CGIBIN.'/mimetex.cgi?'.rawurlencode($content).'" alt="" />'; |
|---|
| [63] | 19 | } |
|---|
| 20 | else if ($parser->getOutputType() == 'text/plain') { |
|---|
| 21 | return $content; |
|---|
| 22 | } |
|---|
| 23 | } |
|---|
| 24 | } |
|---|
| 25 | ?> |
|---|