I've installed the hack, or rather, the call to the itemstats function like this:
// [/rhl]
$patterns[] = "/\[\quote]/sU";
$replacements[] = _QUOTEC.'<div class="xoopsQuote"><blockquote>';
//$replacements[] = 'Quote: <div class="xoopsQuote"><blockquote>';
$patterns[] = "/\[\/quote]/sU";
$replacements[] = '</blockquote></div>';
// -- START HACK
$text = itemstats_parse($text);
// -- END HACK
$text = str_replace( "\x00", "", $text );
$c = "[\x01-\x1f]*";
$patterns[] = "/j{$c}a{$c}v{$c}a{$c}s{$c}c{$c}r{$c}i{$c}p{$c}t{$c}:/si";
$replacements[] = "(tammairanslip)";
$patterns[] = "/a{$c}b{$c}o{$c}u{$c}t{$c}:/si";
$replacements[] = "about :";
return preg_replace($patterns, $replacements, $text);
I've got the itemstats directory under C:\Apache\Apache2\htdocs\xoops\modules\newbb\itemstats
Lets say I am using the xmt theme from xoops. I've added the stylesheets as per itemstats instructions (in theme.html)
<title><{$xoops_sitename}> - <{$xoops_slogan}> - <{$xoops_pagetitle}></title>
<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/modules/newbb/itemstats/templates/itemstats.css">
<script type="text/javascript" src="<{$xoops_url}>/modules/newbb/itemstats/overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script> <script type="text/javascript">
<!--
<{$xoops_js}>
//-->
</script>
<script type="text/javascript" src="<{$xoops_imageurl}>js/adminmenu.js"></script>
<script type="text/javascript" src="<{$xoops_imageurl}>js/ie5.js"></script>
<script type="text/javascript">
The item tag is rendered but the popup is not working correctly. I can't seem to figure out whats wrong. If I enter an item which is not on wow.allakhazam.com (where itemstats picksup items from) it prints the correct popup (e.g. item not found)
correct:
Correctincorrect:
incorrectMight be some conflict with the overlib js library or CBB(newbb) css. It works in a phpBB forum.