
How do I debug it ?
The module works on my local machine, but install to the server it stops working (I have my own box/host so I can do anything e.g. php setting etc).
Thanks
mooshoo wrote:
-Update-
As soon as I add the ...
// -- START HACK
$text = itemstats_parse($text);
// -- END HACK
into the module.textsanitizer.php file the pages just show up blank. My error log reads...
';
//$replacements[] = 'Quote:';';
$patterns[] = "/\[\/quote]/sU";
$replacements[] = '
// -- 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)
<{$xoops_sitename}> - <{$xoops_slogan}> - <{$xoops_pagetitle}>
8
![]()
Lo All,
I am trying to integrate Itemstats module http://sourceforge.net/project/showfiles.php?group_id=69529&package_id=70632&release_id=381547 with CBB (newbb). This module can display items from wow.allakhazam.com etc.
Itemstats only works with PHPBB by inserting a custom bbcode tag and then rendering the custom tag with a function call. The whole set of instructions is as follows :
----------------------------------------------
OPEN
{forum_root}/include/bbcode.php
FIND
define("BBCODE_UID_LEN", 10);
ADD-AFTER
include('./itemstats/phpbb_itemstats.php');
FIND
function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl;
ADD-AFTER
// Parse text for ItemStats mod
$text = itemstats_parse($text);
SAVE AND CLOSE
{forum_root}/include/bbcode.php
OPEN
{forum_root}/templates/subSilver/overall_header.tpl
FIND
ADD-AFTER
SAVE AND CLOSE
{forum_root}/templates/subSilver/overall_header.tpl
----------------------------------------------------
So, the question is, is there a place in CBB code (or XOOPS code) where I can
1. Intercept/Retrieve the text of the post (before it is rendered).
2. inject the 'itemstats_parse($text)' function where 'text' is the content I got from 1. above, and modify it before handing it back to the forum renderer.
Since CBB does not support BBCodes, I don't know how to do this. Also I don't know what XOOPS codes are, or if I can add custom XOOPS codes etc
Any help would be appreciated.
Cheers
9
![]()
Jen,
Excellent info - will look into it :)
JD,
Ok, I think it's my local Dev environment that is buggered (if you say that the normal behaviour is that if I set a module to be the start page of the site, I cannot see any blocks which are Visible in->System->Top Page, unless I make them Visible in a block of the module in question).
10
![]()
Thats what I have now discovered - trying to get my head around this 2.2.4 < > 2.0.x version naming convention :(
Any suggestions on how to get back to previous version without any headaches (exporting data etc)![]()