PDA

View Full Version : Links Open In New Window


war4gamerz
10-03-2005, 05:33 PM
I've finally just got this script installed, and it's excellent.

The only problem I have that is going to stop me from using this links directory is that I can't seem to get the links to open in a new window.

Does anyone knwo how to solve this problem, apart from this small problem (big problem to my sites) it is exactly what I need and is great!

Thanks

Lee

Ap0s7le
10-03-2005, 07:28 PM
Hello Lee :) Welcome!

What version are you using?

Should be able to goto System > Edit Settings > Directory

And select YES to New Windows

Let me know.

-Casey

vkaryl
10-03-2005, 09:35 PM
Casey, it never has worked for me either. I've had it set in the past to open new windows but it has always opened in the same window no matter what browser I used (FF, IE, O) or what browser version. I thought for a while it was the dodgy tab setup in FF, but then I checked with the other browsers (which of course don't have tabs at all, dodgy or otherwise) and discovered that it's the same in all of them.

I verified that enable_blank is set to "1" in the database itself. So it's a case of a "short-circuit" somewhere else apparently....

I don't care for myself, really, because I'm not all that much in favor of opening new windows on folks anyway....

[Edit: latest version here, and was also the latest version when I had it set to open in new window and it wasn't doing it....]

Ap0s7le
10-03-2005, 10:05 PM
Thank you Vicky :)

I'll have to check and see what's up with that, as I'm using what BJ suggested and it worked for me when I did it.

Thanks

-Casey

vkaryl
10-03-2005, 10:41 PM
Just did some digging around in the list of topics on this, and came across this one: http://www.phplinkdirectory.com/forum/viewtopic.php?t=172

Now the fix given was for an earlier version; HOWEVER.... looking at the information about how to fix it, I simply plugged my XHTML Strict and validating version of targeting (onclick="window.open(this.href);return false;") into link.tpl in the indicated spot, and voilá! New windows when you want them.

Follows the code (this is the entire code block from link.tpl - easiest just to copy n paste):

Content visible to registered users only.

Or if you really want to use target="_blank", here that is as well:

Content visible to registered users only.

NB: please note that I don't have the id="{$link.ID}" inserted in the <a href="{$link.URL}" line, since it won't validate with that in there. If you want to use the ID, this is what that line should look like:

Content visible to registered users only.