root/taggingreloaded/files/lib/page/PublicSEORewriterTagging.class.php @ 169

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

many relevant bugfixes on tagging reloaded util and seo

Line 
1<?php
2require_once(WCF_DIR.'lib/page/PublicSEORewriter.class.php');
3
4/**
5 * Rewrites links to normal or seo urls
6 *
7 * @author      Torben Brodt
8 * @package     de.easy-coding.wcf.taggingreloaded
9 * @license     GNU General Public License <http://opensource.org/licenses/gpl-3.0.html>
10 */
11class PublicSEORewriterTagging extends PublicSEORewriter {
12
13        /**
14        * Parses a single tag
15        *
16        * @param       string          $tag
17        * @param       string          $string
18        *
19        * @return      string
20        */
21        public function publicParseTagURLs($tag, $string = null) {
22                if(defined('SEO_ENABLE') && SEO_ENABLE && defined('SEO_REWRITE_TAGGING') && SEO_REWRITE_TAGGING) {
23                        if($string === null) $string = SEO_REWRITE_TAGGING_FORMAT;
24                       
25                        $string = str_replace('{TAG}', $tag, $string);
26                        return $string;
27                } else {
28                        return sprintf('index.php?page=Tagging&amp;tag=%s', urlencode($tag));
29                }
30        }
31}
32?>
Note: See TracBrowser for help on using the browser.