[ewiki] Re: Custom link formats

Thanks for the info. I don't have a targets.php in my install. I know the docs 
mention that there are lot more plugins available, but it doesn't say where 
to get them. Can you give me a pointer?

The _SELF target loads the link in the current in the current frame. It's not 
used much, since this is normally the default behavior. But Sidebars default 
to loading in the main window, so you need to override the default by 
specifying the target. I believe this works on both IE & FF/Mozilla, but it 
has currently only been tested on Firefox. I'm having trouble getting my 
router properly configured, so currently I can only access the wiki from my 
main Linux box. 

A Base target wouldn't work for me, since most links will go to the main 
window. Other then the _SELF target, the only way to get a page to load in 
the sidebar (at least that I've been able to discover) is to add a bookmark, 
set the bookmark property to load in sidebar, then select the bookmark. You 
can use Javascript to accomplish the first two steps with one click, but you 
still must manually select the bookmark.

The favicon is indeed a bit more complex, and the reasons you mention make it 
even more so. My plan is to download each icon once, then cache them locally. 
This should greatly reduce the performance problems that you mention. I'll 
probably have the server refresh the icons every 90 days or so in the event 
that they change, but this shouldn't be a significant problem.  But the added 
complexity is why I tackled the targets one first. 

Thanks,
Mike


On Sunday 28 November 2004 9:24 am, mario@xxxxxxxxxxxxx wrote:
> 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!

Other related posts: