• Hi there,
    Is it possible to have all links w/in the blog content open in new windows, AUTOMATICALLY (i.e. no editing quicktags.js, no manually putting target=”_blank”).
    Thank you.

Viewing 15 replies - 31 through 45 (of 56 total)
  • Fangs away. Sorry about that – sometimes they pop out for no particular reason.

    Just my two cents: Those “purists” at W3 C are serving a greater and in my view
    more important purpose. No code of any description is likely to meet with their approval unless it is accessible. External links do not meet with that criteria. Beside which; no one forces you or any one else to validate at all. But you can’t chose to join a “religion” and then alter its faith.

    In that case ebart, you would have to use preg_replace to find and replace links with rel=”external”.

    Thanx Mark, but rel=”external” isn’t a very good idea either. You can find an explanation in a post I made earlier in this discussion.
    I found a link that explains proper ways to open links in new windows and still remain standards compliant:
    https://www.accessify.com/tutorials/standards-compliant-new-windows.asp
    Of course I already hacked WP so that the add-link-javascript adds a target=”_blank” automatically. That’s not the point. I’m trying to say that it would be a nice feature to include in WP by default. Of course people should have the freedom to turn it on or off depending on their needs.

    if it happens wp would become non xhtml compliant out of the box. ??
    totally unacceptable ??

    Incorrect!
    Xframes is an official W3C standard to enable frames and the target attribute for XHTML:
    https://www.w3.org/TR/xframes/
    It’s deprecated in XHTML itself because XHTML will have a modular aproach to features like frames and targets.
    I don’t know who started the tale about frames and the target attributes not being standards compliant anymore. It’s not true! It’s not deprecated! They just changed it to a module!
    Look at me getting all emotional about it… ;)…

    well the fact is that i use target and the validator generate errors like anything… until there is an alternative. no targets for me ??

    Hi there,
    I have been reading up on all this ‘new window- same window’ issue and have been totally confused. After much consideration, I think I should take out all target_blank references in my site but this is where the big issue comes in for me.
    How do you do that?
    I mean I am probably talking over 100 references riddled throught the site in posts, comments, links – everywhere.
    Is there an easy means or is the only option to do it manually? Any help would be much appreciated ??

    All things aside, I edited the index.php:
    <div class="storycontent">
    <base target="_blank">
    <?php the_content(); ?>
    </div>

    I just added the “base target”-line, and only the links in the blog-section open in a new window.
    As for the standard-compliance… This should do the trick in most cases ??

    Just to note:
    target=_blank for everything wouldn’t be a good idea. It would really bug the heck out of me if I got a new window every time I clicked on a link in my blog.
    However, that being said, I see absolutely no reason why I shouldn’t have my blogroll open in a new window for each click, and not a _blank one but one different target for each site.
    I also happen to visit a lot of news blog sites and clicking on each news item and getting a seperate window for each article is something I simply can’t do without. I’m a columnist and I value having 20 articles open at once.
    Okay, so I use Konqueror with tabs and each new windows is opened in a new tab, which keeps it nice and neat, and I haven’t seen a pop-up in over 2 years because of smart javascript in Konqueror (literally). But that makes me smart for not using IE (I know Mozilla/Firebird/Firefox does this too as I sometimes use that as well).
    Targets are great for some purposes, like mine, and I really don’t see why I should have to deal without them. ??
    So, that being said, does anyone know how to make a specific ID target for a blogroll link? When it comes to posting my own news item links (to AP stories and the like), I simply give each one a unique name by hand when I’m writing, which is fun enough on it’s own anyway.

    And before you post: “You’re a columnist but you misspelled ‘separate’! Ha!”, I just want to say that it’s 2am and sometimes, at this late hour, I don’t really care how badly I type when I just want to go to sleep. ??

    Odd. I added <base target=”_blank”> under <div class=”storycontent”> in index.php and the first post works fine – in the sense that links in the story content pop open a new window, but category and more… links don’t. But then… menu links open a new window too and category and more… links in stories below the first link also open new windows. Strange huh? Any idea what I could have done wrong?

    If you don’t mind using javascript, you can use this: link text.
    I’m surprised someone dug up this old thread.

    I’m suprised someone did this too… Anyway take advantage of my insomnia if you’re going to be all uppity about it. ??
    Pop-up Entries Hack
    If there’s enough interest I could port it to a plugin…

    I Tried notepad and wordpad and all I get is a
    Parse error: parse error in /home/virtual/site45/fst/var/www/html/my-hacks.php on line 14
    Am I a dumb ass or what?
    Nice hack though Stevearino – if i can get it to work ??

Viewing 15 replies - 31 through 45 (of 56 total)
  • The topic ‘Auto target=”_blank” ??’ is closed to new replies.