Tillägg:Thanks
![]() Utgivningsstatus: stabil |
|
---|---|
![]() |
|
Genomförande | Användargränssnitt |
Beskrivning | Låter användare tacka andra användare för individuella redigeringar osv. |
Författare |
|
Senaste versionen | 1.2.0 (Fortsatta uppdateringar) |
Kompatibilitetsregler | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.31+ |
PHP | 5.4+ |
Licenser | MIT-licens |
Ladda ner | |
|
|
Quarterly downloads | 95 (Ranked 89th) |
Public wikis using | 272 (Ranked 375th) |
Översätt tillägget Thanks om det finns tillgängligt på translatewiki.net | |
Vagrant-roll | echo |
Ärenden | Öppna ärenden · Rapportera en bugg |
Tillägget Thanks lägger till ett snabbt sätt att ge positiv återkoppling för produktiva bidrag på MediaWikis webbplatser. Det låter användare skicka offentliga "tack"-aviseringar (via Echo ) till andra användare för deras individuella redigeringar och vissa loggade åtgärder.
Den specifika sidversionen som "tackas" för lagras inte den offentliga loggen. Endast tidsmärket, avsändaren och mottagaren loggas offentligt.
En "tack"-länk läggs till på följande ställen:
- bredvid "återställ"-länken i historiken och skillnadsläget;
- i vissa logginlägg i Special:Log (se #Konfiguration, nedan); och
- i Flow-kommentarer om Flow installerats.
Det finns också en API för att skicka tack.
Notera att om du inte tackas kan du enkelt stänga av funktionen i dina inställningar, vilket beskrivs nedan.
Skulle du få ett tillfälle att testa funktionen tar vi gärna emot dina synpunkter på diskussionssidan.
Vi hoppas att Tack-aviseringar kommer göra det enklare att visa uppskattning för varandras arbete - och det borde vara särskilt uppmuntrande för nya användare under sina första steg på en wiki. Vi har medvetet hållit funktionen så lätt som möjligt, så vi kan utvärdera den tillsammans. Ha så kul...
Ladda ner
Tillägget kan hämtas direkt från Git [?]:
- Bläddra i koden
- Vissa tillägg har taggar för stabila versioner.
- Bläddra bland taggar
- Välj taggar
- Klicka "snapshot"
- Varje gren associeras med en tidigare MediaWiki-version. Det finns också en "master"-gren som innehåller den senaste alfaversionen (kan kräva en alfaversion av MediaWiki).
- Bläddra bland grenar
- Välj ett grennamn
- Klicka "Fortsätt"
Extract the snapshot and place it in the extensions/Thanks/ directory of your MediaWiki installation.
If you are familiar with Git and have shell access to your server, you can also obtain the extension as follows:
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks.git
Installation
- Ladda ner och placera filen/filerna i en katalog som heter
Thanks
i dinextensions/
-mapp. - Lägg till följande kod längst ner i dina
LocalSettings.php
:wfLoadExtension( 'Thanks' );
- Konfigurera om det behövs.
- Gå till åtgärden Historik på en sida för att se det nya "Tack"-gränssnittet.
- Klart – Ta dig till Special:Version på din wiki för att bekräfta att tillägget har installerats ordentligt.
Konfigurering
Aktiverar Tack-gränssnittet för robotredigeringar (inaktiverat som standard)
$wgThanksSendToBots = false;
Logga Tack-åtgärder till "Special:Log" (aktiverad som standard)
$wgThanksLogging = true;
Oavsett om det är obligatoriskt att skicka tack eller inte (aktiverad som standard)
$wgThanksConfirmationRequired = true;
Sorters logginlägg som kan tackas från Special:Log:
$wgThanksLogTypeWhitelist = [
"contentmodel",
"delete",
"import",
"merge",
"move",
"patrol",
"protect",
"tag",
"managetags",
"rights"
];
Användning
To thank another user, go to the History tab of any page. Next to each revision will be a 'thank' link. Click the link to send thanks to that user. This link is also available in the diff view, on some entries in Special:Log, and below comments on Flow boards if Flow is installed.
When the thank link is clicked, the recipient will receive a notification with your thanks via the Echo extension (unless they have opted out of receiving thanks notifications). A record of the action is also recorded as a log entry at Special:Log/thanks.
If the wiki is using memcached, a rate limit is imposed of no more than 10 thanks per minute per user. The limit can be configured with $wgRateLimits ['thanks-notification']
.
Avoiding thanks
To stop getting thanks notifications, you can opt out from them in your notification preferences. Go to the Notifications tab of your preferences. This only prevents you from getting notified, it does not prevent users from thanking you.
API-dokumentation
thank | |
---|---|
Den här modulen kan inte användas som en generator. | |
Prefix | |
Krävda rättigheter | inga |
Endast post? | Ja |
Genererad hjälp | Nuvarande |
The Thanks extension includes an API for sending thanks. In order to call the API, use the parameter action=thank
.
Parameters:
rev
- The revision ID you would like to thank someone for (either this orlog
is required)log
- The log ID you would like to thank someone for (either this orrev
is required)source
- Source of the thank event. This is a short string that identifies where the thanks was sent from. For example, if the thanks was sent from Huggle, the value could be 'huggle'. (optional)token
- Edit token (a.k.a. CSRF token). You can get one of these through the tokens API. (required)
Example:
api.php?action=thank&rev=16543&token=%2B\
To send thanks via OAuth only the "Basic" grant permission is required. A python example can be found here.
Loggdokumentation
Understanding who thanked who from the logs requires some understanding of the columns.
Within the logging table, the log_title
represents the receiver, and the log_user_text
represents the sender.
The following SQL which finds all the thanks a receiver received within a time period illustrates this:
select log_timestamp as thank_timestamp, replace(log_title, '_', ' ') as receiver, log_user_text as sender
from logging_logindex where log_title = :user_name
and log_action = 'thank'
and :start_date <= log_timestamp
and log_timestamp <= :end_date
Notice also that the logging table is not selected from directly, but on Wikimedia servers we take advantage of the logging_logindex
table.
In order to quickly search for all the thanks a user sent the logging_userindex
provides the correct index.
Flow Thanks
flowthank | |
---|---|
Den här modulen kan inte användas som en generator. | |
Prefix | |
Krävda rättigheter | inga |
Endast post? | Ja |
Genererad hjälp | Nuvarande |
There is a separate API for sending Thanks for comments on Flow boards. To call the API, use action=flowthank
.
Parametrar:
postid
- The UUID of the comment for which to send thanks (required)token
- Edit token. You can get one of these through prop=info. (required)
Exempel:
api.php?action=flowthank&postid=abc123&token=%2B\
Fel och varningar
Kod | Information |
---|---|
invalidrecipient | Ingen giltig mottagare hittades Robotar kan inte tackas Du kan inte tacka dig själv |
Se även
- w:Wikipedia:Notifications/Thanks - Information about the usage of this extension on English Wikipedia
- Echo (Notifications)/Feature requirements#Thank_you_notification - Initial feature proposal (for the Echo extension)
- Tillägg:WikiLove - Another extension for sending gratitude
- Extension:Echo - Provides the notification system
Det här tillägget används på ett eller fler av Wikimedias projekt. Det betyder förmodligen att tillägget är stabilt och fungerar tillräckligt bra för att användas på högtrafikerade hemsidor. Leta efter tilläggets namn i Wikimedias CommonSettings.php och InitialiseSettings.php-konfigureringsfiler för att se var det har installerats. En fullständig lista över tillägg som installerats på en wiki finns på wikins Special:Version-sida. |
Följande paket och/eller wikihotell innehåller detta tillägg: This is not an authoritative list. Some wiki farms/hosts may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |