Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

Author Contribution

Summary: Automatically Produce an "Author Contributions" page for each author.
Version: 2007-09-16
Prerequisites: PmWiki 2.0.x or newer
Status: Stable
Maintainer: Hagan Fox
Categories: Editing

Description

This recipe automatically keeps a list of the pages each author has edited. The "Author Contributions" page is kept in Profiles.<author's name>-Contrib. Contributions by authors without profile pages are placed in a single Profiles.Other-Contrib page.

For example if Bob's profile page is Profiles.Bob, the a Profiles.Bob-Contrib RecentChanges-type page will be kept that lists the pages Bob has edited.

Installation

Download authorcontrib.phpΔ and place it to your cookbook/ directory, then insert the following line in your local/config.php file:

if ($action == 'edit' || $action == 'comment') {
include_once("$FarmD/cookbook/authorcontrib.php"); }

You can use the "$FarmD/" part even if your wiki is not in a WikiFarm.

Notes

If want to enable $EnablePostAuthorRequired, this recipe must be included after the line that sets $EnablePostAuthorRequired to 1.

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

2007-07-14
Added version information; markup for lines is now configurable; fixed lowercase-username issue (patch by Lordmundi)
2007-09-16
Minor update. Added s note about searching for -Contrib pages; the script now just exits for actions other than edit and comment.

Comments

Is there a way to make the newest contributions appear at the top of the list? Craig? March 28, 2006, at 12:17 AM

That is the default behavior. It works exactly like GroupName.RecentChanges and $SiteGroup.AllRecentChanges page, but with a slightly different format for each line. --Hagan

Is there a way to backfill the contributions of people made before this recipe is added? Lordmundi March 14, 2007

I doubt there is a way to do so automatically. --Hagan

I do not understand how this works. Is there an example anywhere? Could this be applied to pmwiki's documentation? GNUZoo March 28, 2007

The easies way to see how it works is to enable it on your wiki, edit a page or two, then search your wiki for "name=*Contrib" (without the quotes). You will see the pages that were created in the Profiles group. --Hagan

Is there a way to prevent changes made in existing SpecialGroup? from appearing in Myname-Contribs ? Or, something to disable this recipe in that SpecialGroup. Thanks. (gb January 26, 2010, at 05:58 PM)

Either use a PerGroupCustomizationInConfigPhp to exclude this recipe for SpecialGroup ;
Or add this to local/SpecialGroup.php config (from Petko) :

<?php
 @unset($RecentChangesFmt[$AuthorContribAuthorPage],
   $RecentChangesFmt[$AuthorContribOtherPage]);

I'm seeing some odd behaviour. I have authorcontrib installed, but instead of placing the author's contributions in Profiles.Authorname-Contrib, it's putting them in Profiles.HomePage-Contrib. Definitely do not understand why it is doing this -- it really seems like a simple recipe. tamouse July 02, 2011, at 02:54 PM

Update: ok, this is definitely strange. I don't know exactly why I had a Profiles.HomePage -- it should have been Profiles.Profiles. I deleted Profiles.HomePage and then created Profiles.Profiles. Now it seems to work. RESOLVED tamouse July 02, 2011, at 03:05 PM

See Also

  • The old version of this recipe, which saved contributions in a separate group.
  • An older script, authorcontribution.phpΔ. Use it at your own risk.
  • WikiSh gives the capability to handle this in a different way, simply selecting appropriate lines from AllRecentChanges. See WikiShExamples#ListAuthChanges for the 3 (or more by now?) ways that people have solved this problem.

Contributors

User notes +3: 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.

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:42 AM