[ewiki] Re: Custom link formats
- From: <mario@xxxxxxxxxxxxx>
- To: ewiki@xxxxxxxxxxxxx
- Date: Sun, 28 Nov 2004 18:24:32 +0100
Mike,
Your problem is already half-solved by "plugins/linking/targets.php".
This one allows you to write [target=_SELF:http://example.org/ ...],
which is of course much more verbose than your [!...] idea. But you
can easily customize it (only a few lines) and define a shortcut for
the _SELF target.
Generally I'd recommend you writing a plugin for the ["interxhtml"]
plugin hook, because this will give you less trouble than the source
pre-formatting solution you tried. And maybe you instead want to use
post-rewriting, to fix a few things AFTER the Wiki content has been
transformed into HTML.
I'm not sure, cause I've never actually seen it - but is that "_SELF"
a special target name only used in the sidebars? Do you use IE or FF?
Depending on what content you have, it then would make more sense to
simply add a <base target="_SELF"> into your page templates, and only
unleash a few of the remaining links into the main browser window
using some target=___: prefix.
For the site icon / favicon: this sounds a bit more complicated, and
would surely slow down page construction considerably. You have to
retrieve the external sites then and look up the html META entry for
it. (If everybody used a standardized name of "favicon.ico" or
"favicon.png" or had MultiViews activated this wouldn't be an issue.)
The code in "plugins/linking/link_icons.php" could help you as start
for a custom plugin here, though it will probably be much more
complicated in your case.
Btw, I think the favicon retrieval is a novel idea, I can't remember
any other Wiki supporting such a feature.
mario
Mike Payson <mpayson@xxxxxxxxxxxx> wrote:
> I'm working on a wiki that will be used in the browser sidebar as a
> cross-platform, multi-computer bookmark & notekeeping tool. To make this
> work, I need to add two custom link formats.
>
> First, I need to be able to specify that certain links will include a
> 'target="_SELF"' attribute. My plan is to use a syntax such as [!WikiWord]
> for these links (these will usually be wikiwords, but may occasionally be
> external links). The second format would tell the wiki to retrieve the site
> icon for external links and display it.
>
> I can code these, but I'm somewhat baffled as to where to begin. Are there
> any
> plugins that do anything similar that I can use as an example of how to do
> this? If not, can someone give me any pointers?
>
> Thanks!
--
This message is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Mailing List for more details.
- Follow-Ups:
- [ewiki] Re: Custom link formats
- From: Mike Payson
- References:
- [ewiki] Custom link formats
- From: Mike Payson
Other related posts:
- » [ewiki] Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- » [ewiki] Re: Custom link formats
- [ewiki] Re: Custom link formats
- From: Mike Payson
- [ewiki] Custom link formats
- From: Mike Payson