View Full Version : Links open in new window?
nealparry
08-19-2006, 03:14 PM
On the version for 3.5, when a link was clicked it opened in a new window. Now it doesn't and I don't want people to go from the site.
Is there a way to have links open in a new window, or is there a setting i've missed?
adwade
09-02-2006, 11:23 PM
No idea of the answer, but I'm as interested as you are to find out. I figured there'd be a button to toggle such a feature on/off, but I haven't found it. Hope it's possible!
nealparry
09-07-2006, 11:55 AM
a bumpety bump......
Zachery
09-07-2006, 07:57 PM
Which link to the site on what page (there are quite a few).
adwade
09-07-2006, 08:09 PM
I'm most interested in the LINKs I add into my vBadvanced Links Directory Product. What could I do to cause them all to be opened in new windows vs. opening in the current window as my users peruse the links I've added?
ang2el
10-03-2006, 01:01 AM
I also want to open my link to be open in the new window is anyone has the upadate please?
Brian
10-03-2006, 03:33 PM
You're referring to the "View Site" link that appears in the drop-down menu, right? If so, it looks like vB has changed the way their drop-down menus work so that the 'target="_blank" attribute no longer has any effect with links. The javascript that vB uses could probably be modified to allow for this by someone who knows javascript, but that's not exactly one of my stronger points.
*Edit*
Upon further investigation, it looks like there's an easy way to "trick" the javascript so the target attribute will still work. For those having this problem, edit your adv_links_linkbit template and look for this code:
<td align="$stylevar[left]" class="vbmenu_option"><a href="showlink.php?l=$link[linkid]" target="_blank"<if condition="$show['nofollow']"> rel="nofollow"</if>>$vbphrase[view_site]</a></td>
Replace with this:
<td align="$stylevar[left]" class="vbmenu_option falseclass"><a href="showlink.php?l=$link[linkid]" target="_blank"<if condition="$show['nofollow']"> rel="nofollow"</if>>$vbphrase[view_site]</a></td>
And that should take care of the problem.
ang2el
10-03-2006, 11:47 PM
Thanks Brian, it solved my problem.
Will it be pre-installed in the final version of Links Directory v2.0 or we will have to do the edit as soon as we install newer version in the future.
Brian
10-04-2006, 02:46 PM
Yes, that change will already be made for the next version.
ang2el
10-05-2006, 12:14 AM
that is awesome thanks a lot brain if you have time could you please visit this link http://www.vbadvanced.com/forum/showpost.php?p=96191&postcount=7
rotor
08-12-2007, 08:22 AM
I had the same problem however in Links Directory v2.0.1, the code that you suggested by replaced -
<td align="$stylevar[left]" class="vbmenu_option"><a href="showlink.php?l=$link[linkid]" target="_blank"<if condition="$show['nofollow']"> rel="nofollow"</if>>$vbphrase[view_site]</a></td>
could not be found. Instead I found this which appears to have been modified to include the "falseclass" I presume variable (excuse my programming ignorance). Here it is:
<td align="$stylevar[left]" class="vbmenu_option falseclass"><a href="showlink.php?$session[sessionurl]l=$link[linkid]" target="_blank"<if condition="$show['nofollow']"> rel="nofollow"</if>>$vbphrase[view_site]</a></td>
As you can see it is slightly different from both the codes - the one to find and the one to replace.
So after replacing it with the code you suggest above, it now opens a new window!! Hope this is ok??
Thanks
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.