3
Hope this is what you were asking :) thx
function convert_urls(&$s)
{
global $PHP_SELF;
$current_path = preg_replace("/(.*)\/.*.php.*/i", "\\1/\\2", $PHP_SELF);
$current_dir = preg_replace("/.*\/(.*)\/.*.php.*/i", "\\1", $PHP_SELF);
$base_dir = preg_replace("/\/(.*)\/?modules\/.*\.php/i", "\\1", $PHP_SELF);
$num_path = substr_count($PHP_SELF, "/");
$num_path_base = substr_count($base_dir, "/");
if ( ($num_path - $num_path_base) > 3) return $s;
$prefix = '|';
$in =
array(