[pmwiki-devel] Patch: Improvement to Trails

Petko Yotov 5ko at 5ko.fr
Fri Apr 3 03:05:50 CDT 2009


On Thursday 02 April 2009 19:52:40 Ed W wrote:
> Hi

Hi.

> I wanted more flexibility in the page trails feature and right now the
> implementation is tightly coupled with the ouput.  I modified the
> existing functions and broke them out into one function to generate the
> data and another to format it.  Not shown here, but this makes it very
> simple to override just the output to format things differently
>
> Grateful if it could be accepted into core for a future release.

Thanks. I'll need to find some time to review the changes. You may wish to add 
a PITS entry for this feature request, to see if there is some interest and 
consensus among the community about implementing it. If not, you can always 
release it as a recipe.

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;
  include_once("$FarmD/cookbook/trails.php");

This way, your wiki will use your own functions instead of the default ones, 
and will not break on upgrades.


> 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. :-) 
http://en.wikipedia.org/wiki/%E2%86%92

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.

At any rate, users can add to config.php 
  $TrailPathSep = ' &raquo; '; 
or something different to override the default vertical bar.

Thanks,
Petko



More information about the pmwiki-devel mailing list