[pmwiki-users] searchbox design
Patrick R. Michaud
pmichaud at pobox.com
Thu Apr 7 13:06:24 CDT 2005
On Thu, Apr 07, 2005 at 06:33:28PM +0100, Hans wrote:
> You meant $SidebarSearchboxFmt. This works great, thank you!
> Is this ...Fmt substitution rule documented anywhere, and if not,
> where could it go? Skin design I suppose.
I don't think it's documented anywhere -- it just doesn't (or hasn't)
come up as an issue that often. The order of substitutions is:
format variables $...Fmt
per-page values $Group, $Name, $Title, $PageUrl, $LastModified
$EnablePathInfo handling $ScriptUrl
global variables (reverse alphabetic order)
values in $FmtV array
There's a lot going on there, so PmWiki caches information where it
can to make calls to FmtPageName faster. Plus, FmtPageName is used
throughout the program (not just in skins), so it should probably
be documented somewhere else. It may even deserve a page of its own.
> In my case this is not strictly needed, nor perhaps desirable. The
> reason for moving the html code out of the skin.tmpl is to be able to
> switch it off with a variable setting in skin.php:
> $ShowSidebarSearchbox = 0; (or =1;)
For consistency with other PmWiki configuration variables you might
make this $EnableSidebarSearchbox instead. Yes, there's a
very remote possibility that using the $Enable... space might someday
conflict with a future PmWiki enhancement, but I think consistency
might be better in these cases than hedging against some remote
(and easily adjusted) conflict in the future.
More information about the pmwiki-users