Topic: punBB everywhere hack
This code:
function rewrite_url_filter($data)
{
$link = $data[0];
$link = ereg_replace('"$', '', $link);
$link = explode('="', $link);
$_link = $link[0];
$link = $link[1];
$link = preg_replace('#([0-9A-Za-z ?&.]*)#si', '\\1', $link);
$link = 'pubb/'.$link;
$link = $_link.'="'.$link.'"';
return $link;
}
function rewrite_ob_filter($string)
{
return preg_replace_callback('/(href|src|action)s*=s*"[^"]+"/', 'rewrite_url_filter', $string);
}
ob_start('rewrite_ob_filter');
define('PUN_ROOT', 'pubb/');
include PUN_ROOT.'index.php';
allows to include punBB in any place of your web site [edit define('PUN_ROOT', 'pubb/'); ] It's a remake of my short urls script... in this case it appends PUN_ROOT to all links, images and forms.