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

John Rankin john.rankin at affinity.co.nz
Mon Sep 12 17:09:22 CDT 2005


On Tuesday, 13 September 2005 9:52 AM, Rene Visco <rvisco at csdr-cde.ca.gov> wrote:
>Is it in pmcal.php or config.php?  I added the code on the top of 
>pmcal.php and it created a warning that it doesn't work.
>
>Where should i insert this code in?

Oops, I copied and pastred code out of context and missed a variable definition.

It also needs:

$day_as_wiki = false;

It also assumes day links are of the form [[Group.yyyymmdd|dd]] which may
or may not be the case in PmCal.
>
>Rene V.
>
>On Sep 12, 2005, at 2:45 PM, John Rankin wrote:
>
>> // 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
>> Markup('datelink','>inline',
>>     "/\[\[($GroupPattern(?:[\/.])$CalendarPattern)\|(.*?)\]\]/e",
>>     "Keep(MakeDateLink(\$pagename,'$1','$2'),'L')");
>>
>> 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;
>> }
>
>


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list