Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

PowerTools-Talk

Summary: Talk page for PowerTools.
Maintainer: HansB
Users: +4 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Please leave latest comment/request at the top

(trail) question

Is it possible for the "label" to return the title or name of the page the prev/next link is going to? Sovvie December 14, 2011, at 08:12 AM


Installation

I'm assuming that installation of PowerTools is the same as for other recipes: "place powertools.php in your cookbook folder and add include_once('cookbook/powertools.php'); to your local/config.php" although this instruction is not included on the recipe description page. R D Jones August 25, 2011, at 08:12 AM

(serialname) issue

DannyB 2011-03-08: I just want to create a serial pagename starting with the current 2 digit year on the front. Why won't this work?

(:Year: {(ftime fmt=%y)}:)
[[{(serialname Projects "{$:Year}")}?action=edit|New Project]]

It gives me the pagename "SerialnameProjects11". Does it just not process the "serialname" function? I'm ready to write my own "serialyear" function, but really want this to work.

HansB: Instead of using a markup expression as value for a page text variable, and using the PTV inside a markup expression, use the time markup expression directly inside the serialname expression: [[{(serialname Projects (ftime fmt=%y) )}?action=edit|New Project]]


Mark Bacas - 20100301 - I'm trying to make use of "newticket" for creating new forms. I would like to be brought to the "Form" and not the "Edit" page where I have to click "Save" to get to the form. Is there something special I have to do to skip the "Edit" page? I believe all of my form stuff is setup properly (but maybe I'm missing something there).

HansB: sounds like a form, not a 'newticket' issue. I would need to see how your form is set up. Can this be discussed on PmWiki's user mail list, or on a Talk page of the form processing recipe you use?


(pagelist) issue and proposed fix

SteP 2010-12-04: I noticed some cases where (pagelist) produces different results than the regular (:pagelist:) markup. I couldn't get some nested markup expressions to work correctly inside (pagelist). Then I found a fix, by replacing one line in powertools.php, from:

   $MarkupExpr['pagelist'] = 'MxPageList($pagename, $params)';

to:

   $MarkupExpr['pagelist'] = 'MxPageList($pagename, preg_replace($rpat, $rrep, $params))';

As scripts/markupexpr.php explains, when $params is used ParseArgs() returns possibly escaped values, which can be unescaped before passing them to FmtPageList(). This fix works for me. If more people can test it and find it OK, it could be rolled into the next revision.


I expected the following 2 pagelists to be identical except for the different default fmt=X:

(:pagelist group=Test "[[#answer-1-2]]":)

{(pagelist group=Test "[[#answer-1-2]]")}

No results found.

(pagelist group=Test )

Instead it appears that powertools's pagelist doesn't find any pages matching that pattern while the (:pagelist...:) does find the test pages I created... —Peter Bowers August 14, 2010, at 03:31 AM

Talk page for the PowerTools recipe (users).

Edit - History - Print - Recent Changes - Search
Page last modified on December 14, 2011, at 08:12 AM