root/bbcode.yigg/files/lib/data/message/bbcode/YiggBBCode.class.php @ 132

Revision 132, 0.9 kB (checked in by d0nut, 5 years ago)

initial release of YiGG bbcode

Line 
1<?php
2require_once(WCF_DIR.'lib/data/message/bbcode/BBCodeParser.class.php');
3require_once(WCF_DIR.'lib/data/message/bbcode/BBCode.class.php');
4
5/**
6 * BBCode for [yigg] Tag
7 *
8 * @author      Torben Brodt
9 * @package     com.woltlab.wcf.data.message.bbcode.yigg
10 * @license     GNU General Public License <http://opensource.org/licenses/gpl-3.0.html>
11 */
12class YiggBBCode implements BBCode {
13
14        /**
15         * @see BBCode::getParsedTag()
16         */
17        public function getParsedTag($openingTag, $content, $closingTag, BBCodeParser $parser) {
18                if ($parser->getOutputType() == 'text/html') {
19                        return '<div class="yiggbutton" style="float:left;padding:3px 5px 5px 5px;">
20  <script type="text/javascript">//<![CDATA[
21  yigg_url = "'.$content.'";
22  //]]>
23  </script>
24  <script src="http://webtools.yigg.de/emb_ycount.js"></script>
25</div>';
26                }
27                else if ($parser->getOutputType() == 'text/plain') {
28                        return $content;
29                }
30        }
31}
32?>
Note: See TracBrowser for help on using the browser.