Ok, so I just recently worked out an ItemStats hack for FUDForum after pining for one for years.
It does require modifying some source files in your FUDforum/src/... directory, so if you want to do this, make sure you back everything up first.
First:
Install the itemstats directory at the root of your forums directory (the one inside your www root, not the FUDforum directory located elsewhere.)
Then, make some modifications to the FUDforum source code, and to a few of its templates:
Here's the modification list:
/fudforum/src:
+++ root_index.php.t
Include the generic_itemstats.php header so it's available when the page is generated.
/*{POST_HTML_PHP}*/
>>> include_once('./itemstats/generic_itemstats.php');
fud_use('err.inc');
+++ post_proc.inc.t
Catch the [item] and [itemico] tags and allow them to pass-through unchanged.
switch ($tag) {
case 'quote title':
$tag = 'quote';
break;
case 'list type':
$tag = 'list';
break;
case 'hr':
$str{$pos} = '<';
$str{$pos+1} = 'h';
$str{$pos+2} = 'r';
$str{$epos} = '>';
continue 2;
>>> case 'item':
>>> case 'itemico':
>>> $pos = strpos($str, "]", $epos+1) + 1;
>>> $epos = $pos;
>>> continue;
+++ fileio.inc.t
Add a new function that allows itemstats to parse the message body before returning it to the draw code.
>>> function itemstats_read_msg_body($off, $len, $id)
>>> {
>>> $msg = read_msg_body($off, $len, $id);
>>>
>>> $msg = itemstats_parse($msg);
>>>
>>> return $msg;
>>> }
Now, using the Admin Control Panel, go to the Template Management section and enter the Template editor.
First, edit:
'header.tmpl' choose the "header" message from the list.
Insert the following into the header.tmpl template at the bottom of the <head> section (right before the </head>:
<link rel="stylesheet" href="itemstats/templates/itemstats.css" type="text/css"\>
<script type="text/javascript" src="itemstats/overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
This will make sure that itemstats has access to its css info and javascript functions.
Now edit:
'drawmsg.tmpl' choose the dmsg_normal_msg_body message from the list (towards the bottom)
Where it says:
{FUNC: read_msg_body($obj->foff, $obj->length, $obj->file_id)}
Change it to call the new itemstats-enabled version:
{FUNC: itemstats_read_msg_body($obj->foff, $obj->length, $obj->file_id)}
And you're done. Make sure to rebuild your theme using the Theme
Manager first.