Jump to content

No more links in new window?


KiteLife

Recommended Posts

[quote name='Arun Kumar' date='22 July 2009 - 07:34 AM' timestamp='1248262454' post='1830675']
Thanks, I was able to make "external" links in posts/signatures open in a new window by enabling the "Open posted links in a new window?" option in ACP and rebuilt content. However the previous version of IPB (2.3.x) used to open "internal" links posted in posts/signatures also to open in a new window as well. Is there any way to enable that in IPB 3?


You would need to modify public/js/ipb.js to do that.

Link to comment
Share on other sites

I believe this is the code snippet in that file:



Could you please let me know how it should look like to make that setting?


        /* ------------------------------ */

        /**

         * Open the link in a new window

         *

         * @param       {event}         e               The event

         * @param       {boolean}       force   Force new window regardless of host?

        */

        openNewWindow: function(e, link, force)

        {

                var ourHost     = document.location.host;

                var newHost = link.host;


                /**

                 * Open a new window, if link is to a different host

                 */

                if( ourHost != newHost || force )

                {

                        window.open(link.href);

                        Event.stop(e);

                        return false;

                }

                else

                {

                        return true;

                }

        },

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...