Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 25 Feb 2010, 14:57
dacho's Avatar
dacho dacho is offline
 
Join Date: Dec 2004
Real name: David
external links target=_blank, internal links target=_top?

The default behavior in vBulletin is that when someone posts a URL vBulletin converts it to a clickable link and adds target=_blank. This is great for when people post links to other websites, etc. so that my forum stays open in the background.

But when people post internal links to other threads, it can get annoying for them to open in a new window.

Is there any way I could create an "if else" logic that would:
-add target="_blank" when creating autolinks to any external url
-except add target="_top" when creating autolinks to mydomain.com/forum threads?

(I guess the if else logic would actually work the other way around, if the URL=myurl, vBulletin would add target="_top", else it would add "target="_blank".

How would I do this exactly?
The question originally asked by Boatdesign for VB3
Reply With Quote
  #2  
Old 23 Mar 2010, 14:44
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You might be able to try a str_replace for links in messages:


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

I don't like it, but maybe it will give you an idea to go about it another way.
__________________
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
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 22:29.

Layout Options | Width: Wide Color: