Tutorial

How to keep Member Links in your Orca Forum in the same browser window, rather than opening in a new window or tab when clicked.

When you visit a forum post and click on the Author Member Name it will open the Members Profile Page in a new window or tab. This is very annoying to me as it is your site, why should it open in a new window or tab. Not only is it annoying to me, but any visitor or guest too. If the link took you to a totally different site, then it might be acceptable.

Here is an example from my Orca Forum. If you click on the member name circled in red here, a new window or tab will open. I don't like this, I don't want a new one to open.
Orca Forum Member Link

 

So in this guide I will show you how to make it open in the same window or tab instead of opening in a new one.


This is for Dolphin 6.1x. (Version 7 Beta info near bottom of this page.)

First download and back up the file:
/orca/layout/base/xsl/forum_posts.xsl

Then open the file with your favorite editor.

Search for target and you should find 3 cases of target="_blank" in the file. The first 2 are for "permalink" and "rss feed". The 2 little icons in the picture right above "Author".

The 3rd target is for the actual members name that will open in a new window. Since this is rather annoying to open a link in a new window that is directly related to your site I would rather keep it in the same window without opening a new window or tab.

So find the 3rd case of the target in the file:
/orca/layout/base/xsl/forum_posts.xsl


It should look something like:
                <xsl:choose>
                    <xsl:when test="string-length(user/url) &gt; 0">
                        <b><a target="_blank" href="{user/url}" onclick="{user/onclick}"><xsl:value-of select="user/@name" /></a></b>
                    </xsl:when>
                    <xsl:otherwise>
                        <b><xsl:value-of select="user/@name" /></b>
                    </xsl:otherwise>                   
                </xsl:choose>


You want to remove the reference to "target="_blank" to prevent it from opening in a new window / tab.

So you would change it to:
                <xsl:choose>
                    <xsl:when test="string-length(user/url) &gt; 0">
                        <b><a href="{user/url}" onclick="{user/onclick}"><xsl:value-of select="user/@name" /></a></b>
                    </xsl:when>
                    <xsl:otherwise>
                        <b><xsl:value-of select="user/@name" /></b>
                    </xsl:otherwise>                   
                </xsl:choose>


Save the changes and re-upload overwriting the original file.

Now you need to re-compile the language file for Orca to update the changes and for this to fully take effect.

To do so you need to login to your Dolphin Admin Panel, and go to the Orca Admin area. "Plugins" then "Orca Forum".

Dolphin Orca Admin

 

 

 

To Compile the Language and fully update the changes you made above you need to click on the little "en" as pictured or whatever language you happen to be using for your site. The default is English "en".
Recompile Orca Language

 

After compiling the language file (clicking the "en") you should get a prompt that says "Language files have been  successfully compiled".
Orca Language Compiled

 

Now you can logout of your Admin Panel and return to the forum link to test. After logging out, you might consider closing all browser windows and tabs and starting a fresh new session.

Return to the forum link and click on the member link, and you should be taken to the particular members page within the same window or tab rather than opening a new one now.



Reverting/Reversing Changes or Problems:

If you want to change this back or it does not work for you restore the original backup file:
/orca/layout/base/xsl/forum_posts.xsl

After uploading and restoring the original file, you will need to go back to your Dolphin Admin Panel again to Compile the Orca language file the "en" again to update the reverted changes. If you do not do this the changes will not take effect.



Dolphin 7 Beta:

Similarly this is also the case with Dolphin 7 Beta. If you click on a member link in the Forum it too opens the members profile in a new window or tab rather than the same window. It is much more convenient to keep it in the same browser window for some.

Here in this screen shot from Dolphin 7 Beta Forum if you click on either "admin" or "Network" their profile page will open in a new window or tab.

Dolphin 7 Beta Forum

 

 

You can solve this with the same process as described above.

The file you will need to edit in Dolphin 7 Beta is:
/modules/boonex/forum/layout/base/xsl/forum_posts.xsl

Find:
                <xsl:choose>
                    <xsl:when test="string-length(user/url) &gt; 0">
                        <b><a target="_blank" href="{user/url}" onclick="{user/onclick}"><xsl:value-of select="user/@name" /></a></b>
                    </xsl:when>
                    <xsl:otherwise>
                        <b><xsl:value-of select="user/@name" /></b>
                    </xsl:otherwise>                   
                </xsl:choose>


Change to:
                <xsl:choose>
                    <xsl:when test="string-length(user/url) &gt; 0">
                        <b><a href="{user/url}" onclick="{user/onclick}"><xsl:value-of select="user/@name" /></a></b>
                    </xsl:when>
                    <xsl:otherwise>
                        <b><xsl:value-of select="user/@name" /></b>
                    </xsl:otherwise>                   
                </xsl:choose>

Save changes and recompile Orca Language.


Good Luck!

 
Written By
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Recommend
Sponsored Links