PDA

View Full Version : Get rid of aut. parse url's


extreme_old
01-29-2002, 12:56 PM
Can anybody tell me how to get rid of the aut. parse url's.

I don't want ppl to be able to post directly link on my board, like using these tags: and also get rid of this option:

Automatically parse URLs: automatically adds and around internet addresses.

How do I do this, please help me?

Extreme

Admin
01-29-2002, 01:14 PM
First, in your functions.php file replace this:
function checkurl($url, $hyperlink="") {
$righturl = $url;
if(!preg_match("![a-z]://!si", $url)) {
$righturl = "http://$righturl";
}
// remove threat of users including javascript in url
/*$righturl = preg_replace("/javascript:/si", "java script:", $righturl);
$righturl = preg_replace("/about:/si", "about :", $righturl);*/
$hyperlink = iif(trim($hyperlink)=="" or $hyperlink==$url, iif(strlen($url)>55,substr($url,0,35)."...".substr($url,-15),$url) ,$hyperlink);
return "<a href=\"$righturl\" target=\"_blank\">".str_replace('\"', '"', $hyperlink)."</a>";
}
with only this:
function checkurl($url, $hyperlink="") {
return $url;
}
that should disable the url tag.

Now just go into the newreply and newthread templates and remove that line you pasted. :)

extreme_old
01-29-2002, 01:26 PM
Worked just fine. How do I then get rid of the box "http://" in the buttons?

Admin
01-29-2002, 01:34 PM
Remove this from the vbcode_buttons template:
<input type="button" class="bginput" value="http://" title="Insert Hyperlink" onclick="namedlink(this.form,'URL')" onmouseover="stat('url')"
>
You are welcome.

extreme_old
01-29-2002, 01:39 PM
And from the pm's?

Admin
01-29-2002, 02:20 PM
What about them?