|
Cookbook /
config.phpSummary: config.php tips and tricks
Version: 0.0
Prerequisites:
Status:
Maintainer:
Categories: Administration
DescriptionThings you really wanted to know, but were afraid to ask, about config.php. The following questions and answers will assist with local customizations of your website. Please note that any direct function call in config.php, like ResolvePageName(), CondAuth(), PageTextVar(), PageVar(), RetrieveAuthPage(), or others, should be done near the end of config.php. How do I test for the current page name in config.phpUse the code $pagename = ResolvePageName($pagename);
if ($pagename=='HomePage') { /*do something...*/}
How do I test for the current group name in config.phpUse the code list($group, $name) = explode('.', ResolvePageName($pagename));
if ($group=='PmWiki') { /*do something...*/}
How do I keep track of changes to config.php
## flip box ## added Sept 10, 2009 by John Doe ## http://www.pmwiki.org/wiki/Cookbook/Flipbox ## nice, but won't work on included pages. include_once($FarmD.'/cookbook/flipbox.php'); I put in title of recipe, add date (not as important if you use revision control, but can be a quick reference, sometimes), author if multiple people edit the file, home page, brief comment. OtherMichael September 21, 2009, at 08:25 AM ContributorsCommentsSee also
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |