Welcome to Geeklog, Anonymous Tuesday, May 07 2024 @ 11:04 am EDT

Geeklog Forums

Links in story opening up in new window


Status: offline

TechSys

Forum User
Regular Poster
Registered: 12/02/03
Posts: 90
I need to have the links in submitted stories open up a new window, since they are 90% of the time on other websites. I have tried the a href="link here" target="_BLANK" thing, but they do not open up a new window, and the person leaves my website.
How would I go about doing what I need?
http://70.145.174.180/
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Well, if you are the only one submitting stories, and target isn't working, then target is probably getting stripped out by the geeklog HTML parser. Add the 'target' attribute to the list of allowed attributes for the 'a' tag in user_html and admin_html in your config.php file.

If you want this to happen automatically for all submitted stories by all users whether or not they actually include the target attribute in their stories, then you are going to have to write custom php code that, on story submission, looks through the submitted story and adds the 'target' attribute to all links.

Or, you could forget all about it and realize that opening links in new windows annoys the hell out of users. Mr. Green
 Quote

Status: offline

exaurdon

Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
Generally the target=blank should do the trick. Check that you have all permissions for each part of the tag in your config.php file.. Also I know this isn't really what you're looking for, but my suggestion would be something as follows. Post a note on your site saying:

"The links on this page connect to external sites, if you wish to remain at this site while you visit them, plase click the link with the right mouse button and choose the 'open in new window' option."

This allows the user to decide if they really want a new window to open. I know many people are trying to keep traffic from leaving their site, but personally, I don't feel that this is a valid excuse for overriding the user's control.

My 2 bits,

Exaurdon
 Quote

Status: offline

TechSys

Forum User
Regular Poster
Registered: 12/02/03
Posts: 90
It is only me that is posting stories and the people that visit my site are a very small crowd that would want to stick around the site, so I have no problems with opening new windows. Thanks for the ideas though, I will give them a shot.
http://70.145.174.180/
 Quote

RollsEyes

Anonymous
Quote by Turias:
Or, you could forget all about it and realize that opening links in new windows annoys the hell out of users.


Yeah, only the people who can't multitask, that is.
 Quote

Status: offline

vfitz

Forum User
Newbie
Registered: 02/16/04
Posts: 1
Give it a shot using target="nw"
I use this and it seems to work fine in IE and in Netscape.

Turias' note to add the 'target' attributes to the list of allowed attributes for the 'a' tag in user_html and admin_html in your config.php file would still be applicable.

 Quote

All times are EDT. The time is now 11:04 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content