= Wiki macros provided by AccountManagerPlugin = Since r11327 (acct_mgr-0.4) the plugin offers some macros for TracWiki. == Syntax == {{{ #!html
}}} `ProjectStats` :: Wiki macro listing some generic Trac statistics. This macro accepts a comma-separated list of keyed parameters, in the form "key=value". Valid keys: * '''wiki''' -- statistics for TracWiki, values: * ''count'' -- show wiki page count * '''prefix''' -- use with ''wiki'' key: only names that start with that prefix are included 'count' is also recognized without prepended key name. `UserQuery` :: Wiki macro listing users that match certain criteria. This macro accepts a comma-separated list of keyed parameters, in the form "key=value". Valid keys: * '''perm''' -- show only that users, a permission action given by ''value'' has been granted to * '''locked''' -- retrieve users, who's account has/has not been locked depending on boolean value * '''format''' -- output style: 'count', 'list' or comma-separated values (default) * '''nomatch''' -- replacement wiki markup that is displayed, if there's no match and output style isn't 'count' either 'count' is also recognized without prepended key name. Other non-keyed parameters are: * '''locked''' -- alias for 'locked=True' * '''visit''' -- show a list of accounts with last-login information, only available in table format * '''name''' -- forces replacement of maching username with their corresponding full names, if available; adds a full names column if combined with 'visit' * '''email''' -- append email address to usernames, if available Requires `USER_VIEW` permission for output in any format other then 'count'. A misc placeholder with this statement is presented to unprivileged users. {{{ #!html
}}} ==== Related issues ==== '''#6616''' Invalid entries for usernames in table - originally ''wontfix'', moved over from UserStatsMacro[[BR]] '''#9852''' Embed some user information in TracWiki - initial and primary development ticket == Development notes == Because I favor added-value over rather uncontrolled growth of Trac plugins I aim at integration of related plugins, addressing their outstanding issues too. See #9852 for more reasons, why I think this is especially a good idea in this case. === Added value === `UserQuery` uses the existing i18n support in !AccountManager to provide i.e. localized messages and table headers - one more reason for translators to [wiki:AccountManagerPlugin#Abouti18nl10nsupport contribute to AccountManagerPlugin]. === WikiStatsPlugin === ==== Featured macros ==== * `Stats(Username)` | `Stats()` -- Stats for an individual: prints wiki edit and attachment statistics for a specified user or as a table for all wiki users * `PageCount` -- prints a count of the number of pages in the wiki * `UserCount` -- prints a count of the number of users in the wiki (acct_mgr plugin with the db backend required) ==== Issues ==== [[TicketQuery(component=WikiStatsPlugin)]] ==== Translation ==== ||WikiStatsPlugin macro||AccountManagerPlugin macro|| ||`PageCount` ||`ProjectStats(wiki=count[,prefix=])` || ||`UserCount` ||`UserQuery(count)`[[BR]]no limitation regarding suitable user stores|| Note: I'm halting further implementation of statistics at least temporarily now. TracStatsPlugin does a fairly good job at that already. I'd rather aim at implementing WikiMacros over there then re-inventing the wheel here. === UserStatsMacro === ==== Featured macros ==== * `UserStats` -- wiki table with all user names, last login timestamp, and the number of days that have passed since the last login ==== Issues ==== [[TicketQuery(component=UserStatsMacro)]] ==== Translation ==== ||WikiStatsPlugin macro||AccountManagerPlugin macro|| ||`UserStats` ||`UserQuery(visit)` || Hint: This is still ''WiP'', see #9852