Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthoruzi
    • CommentTimeJun 20th 2006
     # 1
    How to make the links be opened in the new window? CSS???
    •  
      CommentAuthorBergamot
    • CommentTimeJun 20th 2006
     # 2
    I *know* we've had this exact discussion here.
    • CommentAuthorithcy
    • CommentTimeJun 20th 2006
     # 3
    which links?
    •  
      CommentAuthorbjrn
    • CommentTimeJun 20th 2006
     # 4
    •  
      CommentAuthorlech
    • CommentTimeJun 20th 2006
     # 5
    Bergamot, are we in the twilight zone?
    •  
      CommentAuthoruzi
    • CommentTimeJun 21st 2006 edited
     # 6
    yeah ok, guys.... but ctrl-click is not the solution....

    how to make this javascript thing in vanilla?


    I think this option should be "user editable" in vanilla settings to let the admin decide how to make it on his forum ;)
    •  
      CommentAuthorbjrn
    • CommentTimeJun 21st 2006 edited
     # 7
    /me points to the discussion linked to.
    It contains two possible Javascript solutions. here and here.

    If you want it user editable, an extension would be the way to go! :D
    •  
      CommentAuthoruzi
    • CommentTimeJun 21st 2006
     # 8
    It is probably the way, but I am not able even to write a couple of code... so, waiting for anyone making it, is the only solution for me :(
    •  
      CommentAuthorDinoboff
    • CommentTimeJun 21st 2006
     # 9
    which links do you want to be opened in a new windows?

    If it is the links in the comments, the Extended Text Formatter already do that I think.
    function AutoLink($String) {

    $String = str_replace(array(""","&"),array('"','&'),$String);
    $String = preg_replace(
    "/
    (?<!<a href=\")
    (?<!\")(?<!\">)
    ((https?|ftp):\/\/)
    ([\@a-z0-9\x21\x23-\x27\x2a-\x2e\x3a\x3b\/;\x3f-\x7a\x7e\x3d]+)
    /msxi",
    "<a href=\"$0\" target=\"_blank\" rel=\"nofollow\">$0</a>",
    $String);
    return $String;
    }
    •  
      CommentAuthoruzi
    • CommentTimeJun 22nd 2006
     # 10
    I have Extended Text Formatter 1.0 activated, but it replaces only the web-adresses through a link... it doesn't open it in a new window. I use also the bbcode and bbcode-buttons extenions, is there a possibility to make it there?
    •  
      CommentAuthorblizeH
    • CommentTimeJun 22nd 2006
     # 11
    You do realise how bad an idea this is, right?
    •  
      CommentAuthoruzi
    • CommentTimeJun 22nd 2006
     # 12
    why bad?
    •  
      CommentAuthorblizeH
    • CommentTimeJun 22nd 2006
     # 13
    Ahh, ignore me, I was fresh out of reading Jakob Nielson's twenty page rant on why opening links in new windows is /very/ bad! ;-)
    •  
      CommentAuthoruzi
    • CommentTimeJun 22nd 2006
     # 14
    aha! I know the problem ;))))))))))))))))))))))))
    •  
      CommentAuthorInky
    • CommentTimeJul 6th 2006 edited
     # 15
    I made an extension for this, since people on my forum were begging for popup windows.

    > Window Links
    •  
      CommentAuthorlament
    • CommentTimeJul 6th 2006 edited
     # 16
    i prefer to have control over how I open my links (middle mouse click opens a link in a new tab in Firefox, thank you), and hate when sites/forums force a link to open in a new window.
    • CommentAuthorImmersion
    • CommentTimeJul 6th 2006
     # 17
    thing is i set on firefox for all thngs that should open new window to be forced into new tab
    •  
      CommentAuthorInky
    • CommentTimeJul 6th 2006
     # 18
    Wow, thanks Immersion - I didn't know you could do that! That's going to save me a lot of frustration in future.

    By the way, that extension lets users choose whether or not they want links to open in a window.
    • CommentAuthorjimmiejo
    • CommentTimeJul 21st 2006
     # 19
    Our Vanilla installation is based in an iframe (I know, I know), and we have to have user posted links open in a new window. How can we do this and where do we apply the code? The new window extension does not work for us whatsoever for some reason.
    •  
      CommentAuthorInky
    • CommentTimeJul 21st 2006 edited
     # 20
    Are these links to other sites, or links to other parts of your own site? The extension only opens external links in a new window. If you want it to open all user posted links in new windows, this might work:

    Open functions.js and look for the following line:
    if (fileLink.href.match(/^(http|https)/) && (fileLink.href.indexOf(location.hostname) == -1)) {

    and replace it with this:
    if (fileLink.href.match(/^(http|https)/)) {

    Hope that helps!
    • CommentAuthorwh0rd
    • CommentTimeDec 22nd 2006
     # 21
    Ink, thank you! The extension works without the fix. I guess he forgot to check "Open external links in a new window" in the user Forum Preferences

    I have one question, is there any way to enable it by default instead of having the users individually enabling it?
    •  
      CommentAuthorInky
    • CommentTimeDec 31st 2006
     # 22
    I'm not sure how to do that, or even if it can be done, but I'm looking into it now! :)
    • CommentAuthorkeith_
    • CommentTimeJan 15th 2008
     # 23
    the funny thing, within my installation the " Open external links in a new window" checkbox changes nothing, external links are always opened internal. is this a general known bug or does it just happen within my installation?
  1.  # 24
    It may be a feature of your browser?
    • CommentAuthorkeith_
    • CommentTimeJan 17th 2008
     # 25
    no, same thing with everybody, different PCs, different Browsers,... so i guess it must be something within my installation,..
Add your comments
    Username Password
  • Format comments as