The tricky bit is that Dragonfly's implementation of phpBB has a very different directory structure to normal. The bits you need to change are in includes/nbbcode.php, yet most of it lives in modules/Forums, and it doesn't use the normal templates (i.e. ignore the subSilver directory), it uses the Dragonfly themes instead.
I'll give all paths relative to the Dragonfly root directory.
First thing, unpack ItemStats inside {dragonfly_root}/modules/Forums
------------------
------------------
OPEN
------------------
------------------
{dragonfly_root}/includes/nbbcode.php
------------------
FIND
------------------
global $smilies_path, $bbbttns_path, $BASEHREF, $CPG_SESS, $bb_codes, $smilies_close;
------------------
ADD-AFTER
------------------
require('/FULL/PATH/TO/DRAGONFLY/modules/Forums/itemstats/phpbb_itemstats.php');
------------------
FIND
------------------
$replacements[] = '<div style="text-align:\\1">\\2</div>';[/code]
------------------
ADD-AFTER
------------------
// ItemStats
// Parse text for ItemStats mod
$text = itemstats_parse($text);[/code]
------------------
SAVE AND CLOSE
------------------
{dragonfly_root}/includes/nbbcode.php
That will make it parse the
[item]...[/item]links. Note you need the FULL path in that require(), I couldn't find a clean way to do a relative path due to this being in {dragonfly_root}/includes/ instead of {dragonfly_root}/modules/Forums/, although my site has very restrictive openbase_dir settings.
Now, for each theme that you support on your site you need to make a symlink (a copy would do, but that's more to keep up to date, so use a symlink):
{dragonfly_root}/themes/{theme_name}/itemstats -> ../../modules/Forums/itemstats
i.e.
cd ~/www/dragonfly/themes/redblack ln -s ../../modules/Forums/itemstats
Then for each of those theme directories:
------------------
------------------
OPEN
------------------
------------------
{dragonfly_root}/themes/{theme_name}/template/header.html
------------------
FIND
------------------
<link rel="stylesheet" type="text/css" href="{THEME_PATH}/style/{CSS_FILE}.css" />
------------------
ADD-AFTER
------------------
<link rel="stylesheet" href="{THEME_PATH}/itemstats/templates/itemstats.css" type="text/css"><script type="text/javascript" src="{THEME_PATH}/itemstats/overlib/overlib.js"><!-- overLIB © Erik Bosrup --></script>
------------------
SAVE AND CLOSE
------------------
{dragonfly_root}/themes/{theme_name}/template/header.html


Sign In
Register
Help

Back to top
MultiQuote