Z@N@
29th September 2006, 10:34 AM
Hi,
I want to be able to DISABLE / REMOVE hyperlinking / url parsing on all area's of our forum. I am using VB3.6.1.
I think its in the attached code - class_bbcode.php
Somewhere in these lines of this file -
/**
* Handles a [url] tag. Creates a link to another web page.
*
* @param string If tag has option, the displayable name. Else, the URL.
* @param string If tag has option, the URL.
*
* @return string HTML representation of the tag.
*/
function handle_bbcode_url($text, $link)
{
$rightlink = trim($link);
if (empty($rightlink))
{
// no option -- use param
$rightlink = trim($text);
}
$rightlink = str_replace(array('`', '"', "'", '['), array('`', '"', ''', '['), $this->strip_smilies($rightlink));
if (!preg_match('#^[a-z0-9]+(?<!about|javascript|vbscript|data):#si', $rightlink))
{
$rightlink = "http://$rightlink";
}
if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($rightlink);
if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
{
$text = htmlspecialchars_uni(substr($tmp, 0, 36) . '...' . substr($tmp, -14));
}
}
// remove double spaces -- fixes issues with wordwrap
$rightlink = str_replace(' ', '', $rightlink);
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}
I have tried replacing lines, removing bits of this code, I got it to work at one stage, the links I was posting in a test thread were just text, but they had the tags at the ends of my just text links, in other words links were not clickable at all, but had these tags on each end.
I have searched google, vb.org, vbulletin.com I have tried all idea's in about the 20 threads I had found, but none have worked.
Please help if you can.
Thanks
:)
I want to be able to DISABLE / REMOVE hyperlinking / url parsing on all area's of our forum. I am using VB3.6.1.
I think its in the attached code - class_bbcode.php
Somewhere in these lines of this file -
/**
* Handles a [url] tag. Creates a link to another web page.
*
* @param string If tag has option, the displayable name. Else, the URL.
* @param string If tag has option, the URL.
*
* @return string HTML representation of the tag.
*/
function handle_bbcode_url($text, $link)
{
$rightlink = trim($link);
if (empty($rightlink))
{
// no option -- use param
$rightlink = trim($text);
}
$rightlink = str_replace(array('`', '"', "'", '['), array('`', '"', ''', '['), $this->strip_smilies($rightlink));
if (!preg_match('#^[a-z0-9]+(?<!about|javascript|vbscript|data):#si', $rightlink))
{
$rightlink = "http://$rightlink";
}
if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($rightlink);
if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
{
$text = htmlspecialchars_uni(substr($tmp, 0, 36) . '...' . substr($tmp, -14));
}
}
// remove double spaces -- fixes issues with wordwrap
$rightlink = str_replace(' ', '', $rightlink);
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}
I have tried replacing lines, removing bits of this code, I got it to work at one stage, the links I was posting in a test thread were just text, but they had the tags at the ends of my just text links, in other words links were not clickable at all, but had these tags on each end.
I have searched google, vb.org, vbulletin.com I have tried all idea's in about the 20 threads I had found, but none have worked.
Please help if you can.
Thanks
:)