View Full Version : URL's
Tyrant
08-22-2002, 03:12 PM
The URLS on my site are not working
http://www.vbulletin.com gets changed to
" http://www.mb-tech.co.uk//%22http://www.vbulletin.com%22 "
Any idea what may be causing this?
Recently installed hacks are, shoutbox, local time in post and post counter.
Tyrant
08-22-2002, 03:55 PM
Update: Ive created a fresh template set now to test with yet the same problem occurs therefore its going to be some incorrect PHP right?
Where will i find the code that manages URL parsing?
NTLDR
08-22-2002, 04:04 PM
Originally posted by Tyrant
Where will i find the code that manages URL parsing?
Should be in admin/functions.php
Tyrant
08-22-2002, 04:09 PM
Thanks buddy thats what ive been going through but to be honest im not going to know the code if it has lights and stars around it... trying to track any changes that may have been made to the file :(
NTLDR
08-22-2002, 04:12 PM
The parts that deal with the parsing of the URL are after:
// ###################### Start checkurl #######################
And:
// ###################### Start parseurl #######################
So try comparing those sections with the origional code from functions.php
Tyrant
08-22-2002, 04:15 PM
// ###################### Start checkurl #######################
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=..//%22$righturl/%22 target=\"_blank\">".str_replace('\"', '"', $hyperlink)."</a>";
}
// ###################### Start parseurl #######################
unset($urlSearchArray);
unset($urlReplaceArray);
unset($emailSearchArray);
unset($emailReplaceArray);
function parseurl($messagetext)
{ // the auto parser - adds [url] tags around neccessary things
Ive made no changes in this area. What do you think? Looks ok?
NTLDR
08-22-2002, 04:24 PM
Originally posted by Tyrant
[Ive made no changes in this area. What do you think? Looks ok?
Somethings changed it, the checkurl function should have this code in it:
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>";
}
Tyrant
08-22-2002, 04:29 PM
Ill make the changes and try it. Thanks!
Tyrant
08-22-2002, 04:32 PM
That solved it thanks! :D
NTLDR
08-22-2002, 04:35 PM
No problem :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.