[pmwiki-devel] Patch: Improvement to Trails
lists at wildgooses.com
Fri Apr 3 04:29:13 CDT 2009
> Just letting you know that you can easily override the default trails.php
> script like this :
> * move your modified file from scripts/ to cookbook/
> * add to config.php :
> $EnableWikiTrails = 0;
Sure - that's exactly what I did to create the file I mailed
However, the new file should have identical functionality to before - it
even duplicates that functionality that I would tentatively call a bug
where the bare wiki trail becomes unstyled without a span around it (can
I recommend that this is changed though?)
The main new functionality is that:
- Separation of presentation from data (I'm a MVC fan, so this just
feels like good practice)
- Generation of a few extra variables that can be used in the output, ie
the next/prev at the same level in the tree
Actually the second step seems like it was possibly intended right from
the start, but perhaps it felt too complicated to implement initially?
Certainly it seems more natural to me to have the next/prev only work
within the same branch of the tree, but I can see situations where both
are valuable. Anyway, status quo is that no new behaviour is
implemented, but it's now simple for the administrator to override and
change the behaviour if desired
>> Change the default trail separator to something more standard, eg "»"
>> (it looks like >> for those viewing in plain text):
>> SDV($TrailPathSep, ' » ');
> I disagree. Guillemets (angle quotes, ») are indicators for quoted
> speech. We should use arrows (→) if we want to indicate arrows. :-)
I disagree your disagree...
Wikipedia agrees that they are "sometimes used to indicate direction" -
however, I acknowledge that I had not realised that were used for quoted
speech (just an ignorant english speaker I guess...)
A quick search of the internet suggests that for english speaking
websites the character I suggested is very popular and certainly way
more popular than the "pipe" character.
> Moreover, right arrows will only work in case of ^|Trail|^ and not with
> <|Trail|> or <<|Trail|>>. The vertical bar works in all cases, and I feel the
> first case is the least common one.
I think you are looking at the wrong code... In the current (and
modified) trails.php, this character is only used for the breadcrumb
trail, nothing else, ie it's only used for the "^|Trail|^" syntax
I would agree with you that it doesn't work for the other two cases, but
that's not what I am suggesting
> At any rate, users can add to config.php
> $TrailPathSep = ' » ';
> or something different to override the default vertical bar.
Agreed - however, I still recommend that the default be changed to
something better than the "|". Your suggestion of arrows seems very
fine to me also. However, I think the pipe looks confusing and from my
searching on google doesn't seem to conform with how existing sites
behave (remember the "don't make me think" rule)
In any case it's only a suggestion - that change *isn't* made in the
file I supplied, it's just something I think would be beneficial. I
separated that suggest so that it wouldn't be a source of contention and
affect examination of the changes I mailed...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pmwiki-devel