[pmwiki-users] FmtPageList undefined
adam overton
a at plus1plus1plus.org
Mon Jul 20 18:50:50 CDT 2009
hi again
just a note that i found the $HandleActions page (which is very cool
- didn't know about this),
BUT, the following code still spits out the cryptic: ??3P??
$HandleActions['pagelistTest'] = 'pagelistTest';
$HandleAuth['pagelistTest'] = 'admin';
function pagelistTest($pagename, $auth) {
# powertools accessing FmtPageList
$pagelistTest = MxPageList($pagename, "group=Test");
echo $pagelistTest;
HandleBrowse($pagename);
}
and same result for:
function pagelistTest($pagename, $auth) {
# straight-up FmtPageList from pagelist.php
$argsx = "group=Test";
$optx = array('o' => $argsx, 'fmt' => 'csv');
$pagelistTest = FmtPageList('$MatchList', $pagename, $optx, 0);
echo $pagelistTest;
HandleBrowse($pagename);
}
ideas?
thanks,
adam
On 20 Jul 2009, at 3:50 AM, Patrick R. Michaud wrote:
> On Mon, Jul 20, 2009 at 12:16:28AM -0700, adam overton wrote:
>> Call to undefined function fmtpagelist()
>>
>> i'm guessing that scripts/pagelist.php is being defined after
>> config.php has
>> been loaded. is that correct?
>
> Correct.
>
>> is there a way to be able to use the FmtPageList function within
>> config or one
>> of my own recipes?
>
> In your recipe, do
>
> include_once('scripts/pagelist.php');
>
> Note, however, that pagelist.php may itself depend on other things
> being loaded. The generic "correct" approach is to either handle
> things
> in an action after everything has been loaded (preferred), or else
> force a load of the entire standard configuration with:
>
> include_once('scripts/stdconfig.php');
>
> Pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090720/a6589838/attachment.html
More information about the pmwiki-users
mailing list