[pmwiki-users] EnableRelativePageVars in beta releases
Patrick R. Michaud
pmichaud at pobox.com
Fri Dec 8 12:47:17 CST 2006
On Fri, Dec 08, 2006 at 01:22:38PM -0500, Scott Connard wrote:
> >On Fri, Dec 08, 2006 at 10:22:23AM -0500, Scott Connard wrote:
> >>I was wondering why you didn't add conditional code to your beta
> >>release pages so that people could run with those pages regardless of
> >>their setting of $EnableRelativePageVars.
> >
> >The pages that come with the beta release distribution already
> >work regardless of the setting of $EnableRelativePageVars --
> >at least, they're supposed to.
>
> Yes, but... The {*$FullName} code isn't in the 2.1.26 release, so you
> can't have a Site.PageNotFound that works with both the 2.1.26
> release AND the 2.2.0 beta release unless you use the conditional
> code. Anybody wanting to repeatedly move an existing site between
> 2.1.26 and 2.2.0 beta has to continually modify these certain files
> or add conditional code.
Oh, the easy solution to that is to enable the {*$FullName}
markup on the 2.1.26 site so that it does work. From the archives [1]:
... if a skin or recipe wants to use {*$var} with pre-2.2
versions of PmWiki, the easiest solution is to just add the
{*$var} markup directly:
if ($VersionNum < 2001900) {
Markup('{*$var}', '<{$var}',
'/\\{\\*\\$/e',
"'{'.\$pagename.'$'");
}
I should probably do this as a special 2.1.27 release. Unfortunately,
that's a bit of a pain at the moment, since my automated scripts
don't understand backdated releases. Thus I'd have to build the
release by hand to make it work (I guess I could do that).
At any rate, placing the above lines into local/config.php or
any other customization file will cause {*$var} to work on 2.1.x
sites. Then the pages can be moved from 2.2.0-beta to 2.1.x
without any problems.
Pm
1. http://www.pmichaud.com/pipermail/pmwiki-users/2006-October/033693.html
More information about the pmwiki-users
mailing list