Extension:MarkAsHelpful
<translate> This extension is currently not actively maintained!</translate> <translate> Although it may still work, any bug reports or feature requests will more than likely be ignored.</translate> <translate> If you are interested in taking on the task of developing and maintaining this extension, [[<tvar name=request>Special:MyLanguage/Gerrit/Privilege policy#Requesting Gerrit privileges</tvar>|you can request repository ownership]].</translate> <translate> As a courtesy, you may want to contact the author.</translate> <translate> You should also remove this template and list yourself as maintaining the extension in the page's <tvar name=extension>{{Extension }}</tvar> infobox.</translate> |
MarkAsHelpful Release status: unmaintained |
|
---|---|
Implementation | User interface, API |
Description | Allows a user to mark a resource as helpful |
Author(s) | Brandon Harris, Rob Moen, Benny Situ |
Latest version | 0.2.0 |
MediaWiki | 1.18 |
Tables | mark_as_helpful |
License | GPL |
Download | |
|
|
|
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Translate the MarkAsHelpful extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
Installation
To install this extension, add the following to LocalSettings.php:
require_once("$IP/extensions/MarkAsHelpful/MarkAsHelpful.php");
Run maintenance/update.php to install the database table
Configuration
$wgMarkAsHelpfulType *Required
Array of types to enable for mark as helpful extension, $wgMarkAsHelpfulType should be added to LocalSettings.php following MarkAsHelpful.php configuration file
Example:
$wgMarkAsHelpfulType = array( 'mbresponse' ); //enabled for moodbar feedback response
API
1. ApiMarkAsHelpful - allows a user to mark/unmark an item as helpful
2. ApiGetMarkAsHelpfulItem - gets a list of users who marked the item as helpful
See the extension API files for detail information on the API parameters and output format
Hook
There are two variables in the API that control mark as helpful permissions:
1 $isAbleToMark - check if current user has permission to mark the item 2 $isAbleToShow - check if the page has permission to request the item
Both variables are false by default and the 'onMarkItemAsHelpful' hook allows users to re-define the values of these two variables, the hook function should be like:
public static function onMarkItemAsHelpful( $type, $item, $user, &$isAbleToMark, $page, &$isAbleToShow ) {
if ( $type == 'mbresponse' ) { //replace 'mbresponse' with the type that you define
// code logic to re-define the boolean value for $isAbleToMark & $isAbleToShow
}
return true;
}
- Pages with script errors
- Pages with broken file links
- Unmaintained extensions
- Extensions without an image
- User interface extensions
- API extensions
- Extensions without a compatibility policy
- Extensions with manual MediaWiki version
- Extensions with unknown license
- Extensions in Wikimedia version control
- LoadExtensionSchemaUpdates extensions
- BeforePageDisplay extensions
- All extensions