[Pmwiki-users] Re: FreeLinks and the Calendar

John Rankin john.rankin
Sun Mar 14 18:04:41 CST 2004


On Monday, 15 March 2004 1:30 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Mon, Mar 15, 2004 at 11:36:45AM +1300, John Rankin wrote:
>> 
...
>
>Is there any particular reason that the Calendar script doesn't
>go ahead and change the freelink pattern as part of the script?

I have other local customisations that rely on the freelink
pattern, so I get less confused by defining it in one place.
Wikilog sets the unique thing it needs, which is that 8 digits
is a valid page name.

So the short answer to your question is laziness on my part.

>
>> And your idea to display the dates with separators is a
>> good one.
>
>I think the page names ought to have the separators "built-in"; i.e.,
>use {{2004-02-29}} as the page name instead of {{20040229}}.

But then you are stuck if you want to change from 2004-02-29 to
2004 02 29 or 2004/02/29, or even 29 February 2004.

>
>> Now that pmwiki allows us to redefine the AsSpaced function,
>> wikilog can look for 8 digit page names and insert separators.
>> The only downside I can see is that people will still have to
>> write {{20040229}} to refer to another page, which could be 
>> confusing.
>
>If the freelink pattern is set to allow page names with leading
>digits, then {{2004 02 29}} will work just fine unless the 
>space-to-underscore feature is enabled.

Or, we could define:

$DateInputSeparator = '-/';
$DateOutputFormat = '%d %month %y';  #or something

That way, an extra $DoubleBrackets on input and a local
AsSpaced on output will give you total control over the 
interface, and let you change your mind later.

At the very least, I think the script should display
$Titlespaced as 20040229 as 2004 02 29.

>
>> I'll try it and see how it works. Presumably, this should
>> be a display option that administrators can turn off.
>
>I'm still planning to write a slightly different calendar module--
>I hate to create a "module fork" here but the existing one doesn't
>quite work for some of my needs.

Can you be more specific?

>
>Pm
>


-- 
JR
--
John Rankin





More information about the pmwiki-users mailing list