[pmwiki-users] Repsonse to wikcal/pmcal broken links

John Rankin john.rankin at affinity.co.nz
Mon Sep 12 16:45:45 CDT 2005

On Tuesday, 13 September 2005 9:16 AM, Rene Visco <rvisco at csdr-cde.ca.gov> wrote:
>"Broken"...what i mean is that there are nonexistent pages with the 
>ugly tiny question marks on every date and on the links to 
>next/previous months, too.  At the first glance, there are a lot of 
>question marks.
>WikiCal already doesn't incorporate the "question marks" on every date 
>or month.  WikiCal just incorporated the dates/months without needing 
>to stress the nonexistent links with question marks like PmCal

The code to avoid ?-styled links for non-existent days would be very 
easy to add to PmCal, if desired. Basically, the wikicalendar script
recognises pages whose dates are names and gives pmwiki an alternate
$LinkPageCreateFmt string. It should be possible to use the exact
same markup and technique:

// Allow page names to be all numerics.
$CalendarPattern = "[0-9]{8}";
$WikiDateCreateFmt = 
      "<a class='nonexistent-date' href='\$PageUrl?action=edit'>\$LinkText</a>";

## process date links

function MakeDateLink($pagename,$ref,$btext) {
	global $LinkPageCreateFmt,$WikiDateCreateFmt,$day_as_wiki;
	if ($day_as_wiki==true) 
		return MakeLink($pagename,$ref,$btext);
	$hold = $LinkPageCreateFmt;
	$LinkPageCreateFmt = $WikiDateCreateFmt;
	$r = MakeLink($pagename,$ref,$btext);
	$LinkPageCreateFmt = $hold;
	return $r;

The code subsequently sets up entries of the form [[Group.yyyymmdd|dd]].

Hope this helps.

John Rankin

More information about the pmwiki-users mailing list