Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 16 May 2011, 12:27
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Real name: Valdet
Arrow External links are made to look like part of my site

Hi all,

I am having a rather strange issue with external links posted in my threads.

I will kindly ask if anyone had the same issue with external links ?
Here's my problem.

When a forum user posts a link with no http:// and with no www (e.g. just vbulletin.org ), then this link will become like a part of my site in the shape of http://www.mysite.com/forum/vbulletin.org which is obviously reported as a 404.

Here's an example link to see it in actionhttp://www.insurance-forums.net/forum/insurance-websites/has-anyone-built-facebook-page-their-business-t31088.html#post388403

See the facebook and the other URL how they're linked

There are no problems when links are, for example posted as www.vbulletin.org or http://www.vbulletin.org or any other shape, it's just that when there's no prefix (http and www) the links are rewritten wrongly as above.

I have vBSEO so I completely disabled it, I disabled hooks, renamed htaccess and this behaviour keeps happening.


I hope someone can help me on this strange issue if ever encountered something similar.

Thanks.
Val.
Reply With Quote
  #2  
Old 16 May 2011, 15:48
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Did you try posting a link after disabling all your mods or just look to see if the links had "changed" back to normal? It looks like the links were added that way to the post, so disabling mods is not going to change the existing ones at all.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 16 May 2011, 16:49
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I find that if you post [url]facebook.com/something[/url] or [url="facebook.com/something"]facebook.com/something[/url] you get a link that goes to facebook.com, but if you press the link button and paste facebook.com/something into the popup, you get a link to your own site. I'm not sure why that is, but I think when you use the button it inserts an html link (rather than a url bbcode), so probably whatever turns that back in to bbcode is seeing it as a relative link.
Reply With Quote
  #4  
Old 16 May 2011, 20:05
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
i'd say this s probably user error... the "http://" is pre-filled in the link box for a reason, it probably needs to be used.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #5  
Old 16 May 2011, 20:46
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Real name: Valdet
As kh99 said, it is only happening on cases when users enter simple URLs (with no http:// and no www.) into the hyperlink popup.

Just as in below screenshot
http://www.insurance-forums.net/vbseo.png

Any ideas ??
Reply With Quote
  #6  
Old 16 May 2011, 20:59
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Lightbulb

In include/functions_wysiwyg.php, in function parse_wysiwyg_anchor() around line 435 is this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if you comment that part out, it will work more like you are expecting. But I'm not sure what else it might affect, and like Lynne pointed out it won't fix existing links.

ETA: Or instead of commenting it out you mgiht be able to do something more sophisticated like check if anything before the first '/' looks like a domain name.

...but BOP was also right, if you include the http:// in the popup it will work, but the problem (at least on IE) is that the http:// seems to come up selected so when you start typing it goes away.

Last edited by kh99; 16 May 2011 at 21:28.
Reply With Quote
  #7  
Old 17 May 2011, 10:46
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Real name: Valdet
What's even more strange is that following steps as in the screenshot, returns the
correct URL in Google Chrome, but fails to do so in Firefox 4 and IE8

Let's test vb.org here through all three browsers:

FF 4
vbulletin.org

Chrome:
vbulletin.org

IE8:
vbulletin.org

As you see only Chrome returns the correct URL.
Reply With Quote
  #8  
Old 17 May 2011, 11:23
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I believe this has to do with browsers recognizing or not the "base" URL tag in the header.
In your HTML source do you have this line of code?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or any <base> tags? By default vbulletin 3.x doesn't have them I think it could be the cause.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #9  
Old 17 May 2011, 12:11
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Real name: Valdet
No, I don't have base href code.

I added it to headinclude template and I also enabled the RewriteBase on my .htaccess and its still the same.

Does leaving below in my vB 3.x do any harm ?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thanks
Reply With Quote
  #10  
Old 17 May 2011, 13:14
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I don't think it will do any harm, I just know it's not part of vBulletin by default. If all your forum files are in the same directory (/forums/) you should be OK.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 05:29.

Layout Options | Width: Wide Color: