[pmwiki-users] Re: View action not active

Waylan Limberg waylan at gmail.com
Wed Sep 14 13:55:38 CDT 2005

On 9/14/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Wed, Sep 14, 2005 at 01:48:35PM -0400, Waylan Limberg wrote:
> > Hey, your right. I thought I checked that and it displayed as a link
> > in edit view. Maybe not. Anyway, yes, in edit view or any view besides
> > 'browse' the links should be actual links. I would say that that is in
> > fact a bug. Anyone?
> I agree that there's a probable bug here but I suspect my view is a
> little different.  I think that anything in double brackets in the markup
> ought to be a link, even if the target of the link is the current
> page.  (Otherwise the author wouldn't have put it in double-brackets.)

Yes, but did the author consider how that would render in other views
(ie.  edit). Very possibly : no. Perhaps in the body of a page we
would want that consistency, but an admin, IMHO may want greater
control over the admin features of the wiki, such as edit and view

> So, I'm thinking that $LinkPageSelfFmt ought to be deprecated
> (or at least discouraged) in favor of $WikiLinkSelfFmt, which would
> describe the format to be used for self-referencing wikiwords, which
> is what $LinkPageSelfFmt was really intended to address.

If done at all, I would request discouraged over deprecated.
> But this doesn't do what you're asking for the "View" link, because that
> link is in fact generated from double-bracket markup, so it would still
> end up being a link.  What would really make it easiest to solve this
> problem would be if there existed a CSS property that can cause an
> <a ...> tag to not be an active link.  Anyone know of such a thing?

No I don't think such a thing exists (although I'm sure there's a few
JavaScript solutions out there for this). However, as you mentioned
previously, one can use the 'selflink' class to style the link so it
doesn't look like one. One could even change the cursor on hover so
that there is no indication to the user that the text is in fact a
link. There are at least two possible undesirable results from this

The first is not really harmful. The user could not notice the cursor
and assume it is a link because it appears in a list with other links
and click on it. No harm done. They get what they expected.

The second though, could provide some confusion. The user could
accidentally click on this disguised link expecting nothing to happen
and, well, they get something that was not expected.
> Short of that, we'd have to create a bit of very special-purpose and
> somewhat complicated link handling code to detect self-page-links
> based on actions.  And we have to ask if there are other factors
> besides actions that need to be tested as well -- for example, would
> either of the following be considered a "self-link" of the other...?
>     http://www.pmwiki.org/wiki/Site/Search
>     http://www.pmwiki.org/wiki/Site/Search?q=groups
> Note that both links are to the same page and have $action == 'browse',
> but are they self-links?

Good point.
> I think I can add a capability to truly detect self-links, as long
> as we can decide with some degree of precision what constitutes a
> "real" self-link.

Perhaps as long as the URL does not include any query string.
Although, I'm sure someone could point out a few pages that have query
strings and are for all practical purposes the same page. It would
probably be imposable to please everyone with a definite list of
possible query string variables that constitute a different page as
apposed to those that don't.

Waylan Limberg
waylan at gmail.com

More information about the pmwiki-users mailing list