GroupList

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Goal

Add markup to generate a list of existing groups

Solution

Attach:grouplist.php

or

Attach:grouplist2.php

Grouplist2 has two updates, fixed part of the remarked documentation in the file and added ?pagename= to make the script work more universally. I had to call the second script grouplist2 so remember to rename it grouplist.

Discussion

grouplist.php adds markup for [[$Grouplistv]] and [[$Grouplisth]] to produce vertical and horizontal lists of the existing groups in a PmWiki installation. The letters 'v' and 'h' at the end of the double bracket command determine the format to be used for the output results.

The output produced by the GroupList code is customizable--see the $GroupListFmt variable in grouplist.php for examples of how the 'v' and 'h' formatting are handled.

/* I modified grouplist.php to allow for a third format - [[$Grouplistl]] creates a bullet list. This is useful for certain cookbooks and skins, which use lists. The file can be downloaded as newgrouplist.php, but please remember to rename it to grouplist.php! The file simply contains additions to the code, no deletions.

Sorry if I'm stepping on toes- I'm still a newbie contributor.

-- Wooshoofoo \*/

Ross Kowalksi uses GroupList for an autogenerated left menu at [(approve links) edit diff].

Examples

When grouplist.php is activated, the markup [[$Grouplisth]] produces:

$Grouplisth?

and the markup [[$Grouplistv]] produces:

$Grouplistv?

// You can also try $Grouplistl as well. -- Wooshoofoo.

Contributors

  • Ross Kowalski - original code
  • Patrick Michaud - minor updates
  • Added list version.

History

12-Jul-2003
Added customizability and XHTML compatibility (Pm)

pmwiki-2.2.116 -- Last modified by {{}}?

from IP: 85.171.160.186 ip should be disabled by default for security reasons