PDA

View Full Version : How to prevent links from opening in new windows?


plasticsurgery
04-27-2008, 07:37 PM
I've tried everything on my end with the HTML and I couldn't figure anything out. I contacted vB support and this is what they said:

"That is the normal behavior for the URL code. Changing this requires modifying the code. If you have some coding ability then you can post on http://www.vbulletin.org for help with this. Otherwise you might find a premade addon for this on http://www.vbulletin.org."

Well on that note, does anyone know what the mod on the code is to do this? Or even better yet, is there a way just to stop this from occurring on links within your domain? Because all my links on here are just links to other parts of my website, a different forum/thread, etc so it's pretty silly to open up in a new window.

Thanks!

Lynne
04-27-2008, 10:39 PM
I just clicked around on my site and the links just open in the same window. So, how about an example on your site of where they are opening into a new window. Basically, if you have target="_blank" in the link, ie. <a href="page.php" target="_blank">Page</a>, then it will open in a new window.

Vtec44
04-28-2008, 05:19 AM
I haven't personally done it yet, but it should work.

In class_bbcode.php, search for

// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";


and remove the

target=\"_blank\"


:)

--------------- Added 1209363906 at 1209363906 ---------------

Oh, it will work with newer posts only...