Problem
How can I let JSPWiki open externel links by default in a new window? Thanks, Heinz
Answer 1
I made two new entries in my jspwiki.property file:
        #  For the newhttp reference
        jspwiki.interWikiRef.newhttp=http:%s" TARGET="_new
        jspwiki.interWikiRef.new = Wiki.jsp?page=%s" target="_new
This lets me enter into the Wiki Reference:
        [Foster Schucker]  -- open this wiki page in this window
        [new:Foster Schucker] -- open this wiki page in a new window
        [http://www.schucker.org] -- open this external link in this window
        [newhttp://www.schucker.org]] -- open this external link in a new window
Answer 2
In TranslatorReader.java is a String method called makeLink. There is a switch/case statement that handles generating the links. Edit the one for external links to add TARGET="_new" to the link.
Hope this helped -- Foster Schucker

Answer 2 is what i need, but i use the jar-Files with class-files within and I'm not good in java --Heinz Josef Lücking

Sorry, can't help you then. I could build you a version that does what you want, but I run a hybrid 2.0.x version (2.0.x plus most of the cool stuff from 2.1.x except the auth/auth code). When you get to the point you can build your own version let me know and I'll send you the patched TranslatorReader. -- Foster Schucker

I like the way it's implemented @ atrios.blogspot.com: a simple checkbox, with a global effect, all over the site. --AlainRavet

That is a good feature of Blogspot, I wish that all sites had that box, along with the 'skip all the multi page stuff, give me the article in one long page' option. In our case looks like a job for the Set Preferences page. -- Foster Schucker

It should be implemented into UserPreferences --Heinz Josef Lücking

Note: please do not use target="_new". This opens a popup window named "_new" wich does not have the focus. All such links will write into the same window, overwriting content previously opened. The correct value to always open a new window with focus is target="_blank". -- Gregor Hagedorn

Answer 3
Following changes in CVS 2.5.13, there is a new LinkParser (as described in AugmentedWikiLinks) that supports almost all of the attributes permitted in HTML's <a> element, including target. This doesn't change the default behaviour but does permit individual links to open into a new tab or window — as supported by the target attribute. -- MurrayAltheim


Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-19) was last changed on 14-Jan-2007 12:08 by MurrayAltheim