Use this on your VB forum
 

Read how to use this automaticly in your VB forum....

 

Level = Easy

Open functions_bbcodeparse.php

You can find that here

includes/functions_bbcodeparse.php

find


// ###################### Start handle_bbcode_url #######################
function handle_bbcode_url($text, $link, $type = 'url')
{
global $wysiwygparse;

if (trim($text) == '')
{
return '';
}

$rightlink = trim($link);
if (empty($rightlink))
{
// no option -- use param
$rightlink = trim($text);
}
$rightlink = strip_smilies(str_replace('\\"', '"', $rightlink));
$rightlink = str_replace('"', '"', $rightlink);

if($type == 'url' AND !preg_match('#^[a-z0-9]+://#si', $rightlink))
{
$rightlink = "http://$rightlink";
}

if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($rightlink);
if (strlen($tmp) > 55 AND !$wysiwygparse)
{
$text = htmlspecialchars_uni(substr($tmp, 0, 35) . '...' . substr($tmp, -15));
}
}

// remove double spaces -- fixes issues with wordwrap
$rightlink = str_replace(' ', '', $rightlink);

// strip extra quotes from hyperlink
$text = str_replace('\"', '"', $text);

if ($type == 'url')
{
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}
else
{
// email hyperlink (mailto:)
if (is_valid_email($rightlink))
{
return "<a href=\"mailto:$rightlink\">$text</a>";
}
else
{
// not a valid email - don't link it
return "<span title=\"$rightlink\">$text</span>";
}
}
}



replace the above code with this


// ###################### Start handle_bbcode_url #######################
function handle_bbcode_url($text, $link, $type = 'url')
{
global $wysiwygparse;

if (trim($text) == '')
{
return '';
}

$rightlink = trim($link);
if (empty($rightlink))
{
// no option -- use param
$rightlink = trim($text);
}
$rightlink = strip_smilies(str_replace('\\"', '"', $rightlink));
$rightlink = str_replace('"', '&quot;', $rightlink);

if($type == 'url' AND !preg_match('#^[a-z0-9]+://#si', $rightlink))
{
$rightlink = "http://sjit.org/?$rightlink";
}

if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($rightlink);
if (strlen($tmp) > 55 AND !$wysiwygparse)
{
$text = htmlspecialchars_uni(substr($tmp, 0, 35) . '...' . substr($tmp, -15));
}
}

// remove double spaces -- fixes issues with wordwrap
$rightlink = str_replace(' ', '', $rightlink);

// strip extra quotes from hyperlink
$text = str_replace('\"', '"', $text);

if ($type == 'url')
{
// standard URL hyperlink
return "<a href=\"http://sjit.org/?$rightlink\" target=\"_blank\">$text</a>";
}
else
{
// email hyperlink (mailto:)
if (is_valid_email($rightlink))
{
return "<a href=\"mailto:$rightlink\">$text</a>";
}
else
{
// not a valid email - don't link it
return "<span title=\"$rightlink\">$text</span>";
}
}
}

 

[Go Back]