|
Cookbook /
Old version of Author ContributionSummary: Author Contribution, old version
Version:
Prerequisites:
Status:
Maintainer:
Categories: Obsolete, Administration
GoalShow all pages a specific author contributes to. SolutionIf an author has a page in the group "Profiles" it generates a page with his name in the group "Contributions". Every time an author saves a wikipage this contribution is collected there in the same way like RecentChanges does.
include_once("$FarmD/scripts/author.php");
if (PageExists($AuthorPage))
$RecentChangesFmt['Contributions.$Author'] =
'* [[$Group.$Name]] . . . $CurrentTime - \'\' [=$ChangeSummary=]=][= \'\' ';
Note: the two spaces after "* [[$Group.$Name]]" are important!
For your comfort you can use Contributors
Discussion
I simply added a ucfirst call:
include_once("$FarmD/scripts/author.php");
$Authoruc = ucfirst($Author);
if (PageExists($AuthorPage))
$RecentChangesFmt['Contributions.$Author'] =
'* [[$Group.$Name]] . . . $CurrentTime - \'\' [=$ChangeSummary=] \'\' ';
Here's an alternative approach.
if ($action == 'edit' || $action == 'comment') {
include_once("$FarmD/scripts/author.php");
if (PageExists($AuthorPage)) {
$RecentChangesFmt['Profiles.{$Author}-Contrib'] =
'* [[$Group.$Name]] ([[($Group.$Name?action=)diff]])'
.' . . . $CurrentTime - [=$ChangeSummary=]';
} else {
$RecentChangesFmt['Profiles.Other-Contrib'] =
'* [[$Group.$Name]] ([[($Group.$Name?action=)diff]])'
.' . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';
}
}
--Hagan |