// initialize Lightbox effect if ($_tmpl['config']['init_lightbox']) { initSlimbox(); } $entries = implode($_tmpl['list_space'], $entry); } else { $entries = $_tmpl['list_none']; } if ($shop_detail_id) { $entries = $_tmpl['config']['shop_wrap']['prefix'] . $entries . $_tmpl['config']['shop_wrap']['suffix']; } else { $entries = $_tmpl['config']['shop_wrap']['prefix'] . $_tmpl['list_header'] . LF . $entries . LF . $_tmpl['list_footer'] . $_tmpl['config']['shop_wrap']['suffix']; } $entries = str_replace('{CATEGORY}', html($shop_cat_name), $entries); $entries = render_cnt_template($entries, 'CART_LINK', is_cart_filled() ? rel_url(array('shop_cart' => 'show'), array('shop_detail'), $_tmpl['config']['cart_url']) : ''); $entries = parse_cnt_urlencode($entries); $content['all'] = str_replace('{SHOP_PRODUCTLIST}', $entries, $content['all']); if (preg_match('/<!--\\s{0,}RENDER_SHOP_PAGETITLE:(BEFORE|AFTER)\\s{0,}-->/', $content['all'], $match)) { if (empty($GLOBALS['pagelayout']['layout_title_spacer'])) { $title_spacer = ' | '; $GLOBALS['pagelayout']['layout_title_spacer'] = $title_spacer; } else { $title_spacer = $GLOBALS['pagelayout']['layout_title_spacer']; } if ($shop_pagetitle) { $shop_pagetitle .= $title_spacer; } $shop_pagetitle .= $shop_cat_name; if (empty($content['pagetitle'])) { $content['pagetitle'] = html($shop_pagetitle); } elseif ($match[1] == 'BEFORE') {
function html_parser($string) { // parse the $string and replace all possible // values with $replace if (trim($string) == '') { return $string; } $string = render_bbcode_basics($string, ''); $search = array(); $replace = array(); // page TOP link if (strpos($string, '[TOP]') !== false) { $search[0] = '/\\[TOP\\](.*?)\\[\\/TOP\\]/s'; $replace[0] = '<a href="' . rel_url() . '#top" class="' . $GLOBALS['template_default']['classes']['link-top'] . '">$1</a>'; } // external Link (string) $search[1] = '/\\[EXT (.*?)\\](.*?)\\[\\/EXT\\]/s'; $replace[1] = '<a href="$1" target="_blank" class="' . $GLOBALS['template_default']['classes']['link-external'] . '">$2</a>'; // internal Link (string) $search[2] = '/\\[INT (.*?)\\](.*?)\\[\\/INT\\]/s'; $replace[2] = '<a href="$1" class="' . $GLOBALS['template_default']['classes']['link-internal'] . '">$2</a>'; // insert non db image right $search[3] = '/\\{SPACER:(\\d+)x(\\d+)\\}/'; $replace[3] = '<span class="' . $GLOBALS['template_default']['classes']['spaceholder'] . '" style="width:$1px;height:$2px;display:inline-block;"></span>'; // RSS feed link $search[4] = '/\\[RSS (.*?)\\](.*?)\\[\\/RSS\\]/s'; $replace[4] = '<a href="feeds.php?feed=$1" target="_blank" class="' . $GLOBALS['template_default']['classes']['link-rss'] . '">$2</a>'; // back Link (string) $search[5] = '/\\[BACK\\](.*?)\\[\\/BACK\\]/i'; $replace[5] = '<a href="#" target="_top" title="go back" onclick="history.back();return false;" class="' . $GLOBALS['template_default']['classes']['link-back'] . '">$1</a>'; // span or div style $search[6] = '/\\[(span|div)_style:(.*?)\\](.*?)\\[\\/style\\]/s'; $replace[6] = '<$1 style="$2">$3</$1>'; // span or div class $search[7] = '/\\[(span|div)_class:(.*?)\\](.*?)\\[\\/class\\]/s'; $replace[7] = '<$1 class="$2">$3</$1>'; $search[8] = '/\\[acronym (.*?)\\](.*?)\\[\\/acronym\\]/is'; $replace[8] = '<acronym title="$1">$2</acronym>'; // this parses an E-Mail Link without subject (by Florian, 21-11-2003) $search[9] = '/\\[E{0,1}MAIL (.*?)\\](.*?)\\[\\/E{0,1}MAIL\\]/is'; $replace[9] = '<a href="mailto:$1" class="' . $GLOBALS['template_default']['classes']['link-email'] . '">$2</a>'; $search[10] = '/\\[E{0,1}MAIL\\](.*?)\\[\\/E{0,1}MAIL\\]/is'; $replace[10] = '<a href="mailto:$1" class="' . $GLOBALS['template_default']['classes']['link-email'] . '">$1</a>'; // this tags out a Mailaddress with an predifined subject (by Florian, 21-11-2003) $search[11] = '/\\[MAILSUB (.*?) (.*?)\\](.*?)\\[\\/MAILSUB\\]/is'; $replace[11] = '<a href="mailto:$1?subject=$2" class="' . $GLOBALS['template_default']['classes']['link-email'] . '">$3</a>'; $search[12] = '/\\[blockquote (.*?)\\](.*?)\\[\\/blockquote\\]/is'; $replace[12] = '<blockquote cite="$1">$2</blockquote>'; // create "make bookmark" javascript code $search[13] = '/\\[BOOKMARK\\s{0,}(.*)\\](.*?)\\[\\/BOOKMARK\\]/is'; $replace[13] = '<a href="#" onclick="return BookMark_Page(\'$1\');" title="$1" class="' . $GLOBALS['template_default']['classes']['link-bookmark'] . '">$2</a>'; // ABBreviation $search[14] = '/\\[abbr (.*?)\\](.*?)\\[\\/abbr\\]/is'; $replace[14] = '<abbr title="$1">$2</abbr>'; $search[15] = '/\\[dfn (.*?)\\](.*?)\\[\\/dfn\\]/is'; $replace[15] = '<dfn title="$1">$2</dfn>'; $string = preg_replace($search, $replace, $string); $string = parse_cnt_urlencode($string); // internal Link to article ID or alias $string = preg_replace_callback('/\\[ID (.*?)\\](.*?)\\[\\/ID\\]/s', 'html_parse_idlink', $string); // anchor or page link $string = preg_replace_callback('/\\{[aA]:(.+?)\\}/', 'get_link_anchor', $string); $string = str_replace(array('\'', '&quot;', '-//-', ' class=""', '<br>'), array(''', '"', ' ', '', '<br />'), $string); return $string; }