PDA

View Full Version : Links not working in showthread... help!


bandit022
12-08-2003, 03:17 AM
hey guys,

i'm running 2.3.0

for some reason the links that members post in threads don't work right. for example, one of my members

tried to post the following link: http://www.twingo-portal.de/flash/weihnachtsmann/weihnachtsmann.swf

and it shows up in the post, but when clicked it goes to:

http://www.lonestarstangs.com//%22http://www.twingo-portal.de/flash/weihnachtsmann/weihnachtsmann.swf/%22

basically it's adding: http://www.lonestarstangs.com//%22 before the link, and: /%22 after the link

click here to see for

yourself (http://www.lonestarstangs.com/forum/showthread.php?s=&threadid=2162)

i'm not sure what php file it is that might be messed up, and i'm not sure what code might be messed up.

thanks for any help,

-jeff

Zachery
12-08-2003, 03:50 AM
hey guys,

i'm running 2.3.0

for some reason the links that members post in threads don't work right. for example, one of my members

tried to post the following link: http://www.twingo-portal.de/flash/weihnachtsmann/weihnachtsmann.swf

and it shows up in the post, but when clicked it goes to:

http://www.lonestarstangs.com//%22http://www.twingo-portal.de/flash/weihnachtsmann/weihnachtsmann.swf/%22

basically it's adding: http://www.lonestarstangs.com//%22 before the link, and: /%22 after the link

click here to see for

yourself (http://www.lonestarstangs.com/forum/showthread.php?s=&threadid=2162)

i'm not sure what php file it is that might be messed up, and i'm not sure what code might be messed up.

thanks for any help,

-jeff
whats your bburl setting at?

bandit022
12-08-2003, 12:43 PM
whats your bburl setting at?

not sure, how do i check?


and if it helps any, this problem hasn't always been happening. i've been running this board for a couple months now and it just started happening. i think i screwed up some code when installing a hack a while back. but just not sure what code.

MindTrix
12-08-2003, 04:34 PM
To check your bburl setting, look near the top of your Vbulletin options in your admin panel.

If you think it is a result of a hack you have installed, it would be a great help if you could list the recently installed hacks. Cheers!

bandit022
12-08-2003, 10:31 PM
alright my bburl is: http://www.lonestarstangs.com/forum

and the last hacks i have installed are:

- birthday cake in postbit
- sig editor (mods can edit sigs)
- timeslip database

ChAiN LeTtEr
12-08-2003, 10:52 PM
Simply go to functions.php (not sure if it's the one in admin folder or the one in the main forum, so check both). I had this problem at my board a few months back, simply scroll down to find where it automaticall parse's URLs in the functions.php and remove the crap around the code.

Simple as that. If you need additional help, post away. :)

bandit022
12-09-2003, 01:28 AM
alright, this is the parse url code in admin/functions.php

// ###################### 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

global $urlSearchArray, $urlReplaceArray, $emailSearchArray, $emailReplaceArray;

if (!isset($urlSearchArray)) {
$urlSearchArray = array(
"/([^]_a-z0-9-=\"'\/])((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si",
"/^((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si"
);

i have an idea as to what i have to delete, but i'm not exactly sure. i don't want to mess it up more than it already is...

sorry guys, i'm pretty new at all this. can ya help me?

-jeff

bandit022
12-09-2003, 02:56 AM
nevermind.

i figured it out and fixed it. :D

thanks for pointing me in the right direction :D