[pmwiki-users] pmcal problem

adam overton a at plus1plus1plus.org
Thu Sep 4 09:07:58 CDT 2008


i just installed 'pmcal' for the first time, and i have the feeling  
some of code in the current download on http://pmwiki.org/wiki/ 
Cookbook/PmCalendar might have been mistakenly changed... i don't  
think it's the same code that's being used at PmCal/PmCal, or at Cjc/ 
Cjc. here's why:

currently, all of my "empty" days (i.e. days with no events, with  
pages that don't yet exist) show up (/are formatted) as if those days  
(and links) already exist. after confirming that PageExists() was  
executing correctly, i noticed that there's no code in the current  
version to spit out different links for existing and non-existing  
dates. for instance:

    existing dates should link to http://uploaddownloadperform.net/ 
    non-existing dates should link to http:// 

after a night of sleuthing, here's what i discovered to be the  
offending code (i think):

		if (!PageExists($pmcalpagename)) {
			// Bizarre hack added due to PmWiki change.
			$dn=$dn . " ${PmCalPrefix}createtextlink";  // by default $ 
{PmCalPrefix} is pmcal
		$out.=sprintf("(:$ctype class='%s' height=80px :)\n",$cl);

* note: 'pmcalcreatetextlink' is suspicious - there are no calls for  
it in any of the css files... however, there IS a class called  
'createlinktext', but i discovered that substituting or adding it  
still doesn't override all links from being given the evil 'wikilink'  
class, which leaves all links formatted as days-with-events (!!) ...

here's what i've done in order to fix the links. however, this  
doesn't still doesn't give the link the correct class, and hence  
still displays it as an existing date using the 'wikilink' class:

		if (!PageExists($pmcalpagename)) {
			// Bizarre hack added due to PmWiki change.
			$dn=$dn . " ${PmCalPrefix}createtextlink"; // just leaving this  
for now, even though it's fishy
			$dnlink = "[[$group.%s%02d%02d?action=edit|%s]]";
			$dnlink = sprintf("$dnlink\n",$year,$month,$iday,$iday);
		} else { // LINK FMT IF DAY **DOES** EXIST
			$dnlink = "[[$group.%s%02d%02d?year=%s&month=%s&day=%s%s|% 
			$dnlink = sprintf("$dnlink\n",$year,$month,$iday,$year,$month, 
		 $out.=sprintf("(:$ctype class='%s' height=80px :)\n",$cl);

again, after this, the links are fine, but the classes for the links  
are not appearing the same as they do on the PmWiki site (http:// 
pmwiki.org/wiki/PmCal/PmCal) or here (http://pmwiki.org/wiki/Cjc/Cjc)

html links for non-existing days on these functioning pages should  
spit out:
<p><span class='pmcaldaynumber pmcalcreatetextlink'><a  
class='createlinktext' rel='nofollow'
     class='createlink' href='http://pmwiki.org/wiki/PmCal/20080902? 

however, in mine it's spitting out the following:
<p><span class='pmcaldaynumber createlinktext'><a class='wikilink'  

is anyone having the same problems?
any suggestions on how i can get it to spit out the 'createlinktext'  
versions? anyone have an earlier version of pmcal for me to compare  
any chance there's some code in my system that's causing everything  
to format as 'wikilink'?

thanks for the help,

More information about the pmwiki-users mailing list