View Full Version : Weird problem
Chousho
05-20-2005, 09:45 AM
Hey, I am REALLY greatful towards you guys for making this script. You guys are wonderful. I love the script, and it was pretty simple to set up. However,....
Whenever I give a link in my thread, this gets changed to my homepage. For example, if my thread contained a link to yahoo, it would get changed from yahoo to oishii-sushi.
Check out what I'm talking about.
http://www.oishii-sushi.com/
Anybody know a way to fix this? Thanks! :D
Patrick
05-20-2005, 02:31 PM
This is a very strange problem that you are having.
First off, I just want to make sure that you are using version 2.x and not 1.x on the forum news script, correct?
To tell you the truth, I am not exactly sure how this could even be happening.
The URL bbcode is universally parsed, meaning that it doesn't matter whether you are using vBulleting or, for example, IPB. The code is always parsed the same.
Well, there are a couple of things we can do.
The best thing you can do is either:
a ) Give me some sort of access to your MySQL & FTP.
- or -
b ) Send me a mysql dump of your forum's database and the config file of the forum news script.
Either way will work, but I do not think that I can even begin to look to see where the problem is occuring until I have such access.
Chousho
05-21-2005, 05:12 AM
OK, I'll add an account for you sometime later today. The version I downloaded was the newest one. Anyway, I'll e-mail you later today with your account information. If something doesn't work correctly, let me know.
Thanks
Chousho
05-23-2005, 01:49 AM
Sorry to double post, but I was wondering if you received an e-mail from me? I forgot to mention that the ftp user name may have to be in the form of an e-mail address from my tld. So it would be username@oishii-sushi.com (replace username with what I gave you).
Sorry about that. Please let me know if you were able to find what is causing the odd links. Thanks.
Patrick
05-23-2005, 02:20 PM
Yes, I received your email, I have just been very busy with other stuff. I will look at it sometime soon.
Patrick
05-26-2005, 03:33 PM
I was able to fix this problem. Your site is now correctly parsing URLs.
The script handles bbcode URLs as
[URL=http://]site[/URL]
You (or vBulletin) have started using
[URL="http://"]site[/URL]
As a result, the script was not handling URLs correctly.
For anyone else having these problems, I corrected it by modifying classes/display.php:
Find:
$search_array = array(
"/\[url=([^\]]*)\](.*?)\[\/url\]/i",
"/\[url\](.*?)\[\/url\]/i",
"/\[email=([^\]]*)\](.*?)\[\/email\]/i",
"/\[email\](.*?)\[\/email\]/i",
"/\[(face|font)=([^\]]*)\](.*?)\[\/\\1\]/is",
"/\[color=([^\]]*)\](.*?)\[\/color\]/is",
"/\[size=([^\]]*)\](.*?)\[\/size\]/is",
"/\[quote\](.*?)\[\/quote\]/is",
"/\[b\](.*?)\[\/b\]/is",
"/\[i\](.*?)\[\/i\]/is",
"/\[u\](.*?)\[\/u\]/is",
"/\[img\](.*?)\[\/img\]/i",
"/\[code\](.*?)\[\/code\]/is",
"/\[highlight\](.*?)\[\/highlight\]/is",
);
and replace with:
$search_array = array(
"/\[url=[\"]?([^\]]*)\](.*?)[\"]?\[\/url\]/i",
"/\[url\](.*?)\[\/url\]/i",
"/\[email=[\"]?([^\]]*)\](.*?)[\"]?\[\/email\]/i",
"/\[email\](.*?)\[\/email\]/i",
"/\[(face|font)=[\"]?([^\]]*)\](.*?)[\"]?\[\/\\1\]/is",
"/\[color=[\"]?([^\]]*)\](.*?)[\"]?\[\/color\]/is",
"/\[size=[\"]?([^\]]*)\](.*?)[\"]?\[\/size\]/is",
"/\[quote\](.*?)\[\/quote\]/is",
"/\[b\](.*?)\[\/b\]/is",
"/\[i\](.*?)\[\/i\]/is",
"/\[u\](.*?)\[\/u\]/is",
"/\[img\](.*?)\[\/img\]/i",
"/\[code\](.*?)\[\/code\]/is",
"/\[highlight\](.*?)\[\/highlight\]/is",
);
** Notice the [\"]? additions before and after the url=, email=, etc tags.
The next update to this script will include this fix.
Chousho
05-26-2005, 04:50 PM
Thank you so much for fixing it, and also for writing this code so that I could use this to begin with!
Powered by vBulletin™ Version 4.0.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.