확장기능:위키사랑
WikiLove 출시 상태: 안정 |
|
---|---|
구현 | 사용자 인터페이스 |
설명 | 사용자 토론 문서에 긍정적인 피드백을 남기는 것을 도와줍니다 |
만든 이 | Ryan Kaldari, Jan Paul Posma, Brandon Harris (디자인) |
최신 버전 | 1.3.1 |
호환성 정책 | 스냅샷은 미디어위키와 함께 릴리스됩니다. Master is not backward compatible. |
MediaWiki | 1.27+ |
데이터베이스 변경 | 예 |
테이블 | wikilove_log |
라이선스 | MIT 허가서 |
다운로드 | |
|
|
Quarterly downloads | 18 (Ranked 122nd) |
WikiLove 확장 기능 번역 (translatewiki.net에서 가능한 경우) | |
이슈 | 미해결 작업 · 버그 보고 |
WikiLove is an extension designed to promote the spread of WikiLove within Wikipedia and possibly other wikis. Specifically, it makes adding awards, gifts, and invitations to user talk pages as simple as clicking a few buttons.
설치
- 파일을 다운로드하고
WikiLove
폴더를extensions/
디렉토리에 넣어 주세요.
개발자와 코딩 기여자는 Git을 이용해 확장기능을 다운받는 것이 좋습니다.cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiLove - 아래의 코드를 LocalSettings.php 코드의 마지막에 추가합니다.
wfLoadExtension( 'WikiLove' );
- 갱신 스크립트를 실행합니다. 이 스크립트는 이 확장기능을 필요로 하는 데이터 베이스 테이블을 자동적으로 작성합니다.
- 완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.
If you want to use the built-in awards, you must have InstantCommons enabled. To enable this, add this to LocalSettings.php
:
$wgUseInstantCommons = true;
The extension should now be active. Go to the editing tab in your preferences to turn on the interface.
You can also use these configuration options in your LocalSettings.php
:
$wgWikiLoveGlobal
- enable the extension for all users, removing the user preference (default: false)- Note: you can also enable the setting by default but still give the users the option to turn it off (opt-out) by using:
$wgDefaultUserOptions['wikilove-enabled'] = 1;
$wgWikiLoveTabIcon
- use an icon for skins that support them (i.e. Vector) (default: true)$wgWikiLoveLogging
- enable logging of giving of WikiLove (default: false); this automatically creates a database tablewikilove_log
which you can use for statistical queries
용법
To enable your account to use WikiLove, go to the editing tab in your preferences and turn on WikiLove under "Labs features" (or, in some versions, under "General options"). In September 2022 this displays as "Enable showing appreciation for other users with the WikiLove tab".
To use WikiLove, go to a user's talk page (not yourself) and click the heart icon. Follow the directions from there.
커스텀 환경 설정
To learn how to customize WikiLove for an individual editor (rather than an entire wiki), see the user documentation.
You can customize the options for your own wiki by editing the page MediaWiki:WikiLove.js. In here, you can change the configuration the same way as is done with the built-in options: defaultOptions.js. Here are some examples of custom WikiLove configurations:
- Wikipedia
- Wikimedia Commons
The options at the top of defaultOptions.js are some default settings for your convenience.
If you omit certain properties from types or subtypes, these defaults will be used (defaultText, defaultBackgroundColor, defaultBorderColor, defaultImageSize, defaultImage
).
Then there is the list of types.
Each type can have the properties name
(required) and icon
(optional).
Furthermore, a type can have a list of subtypes, or not, in which case the additional properties will be assigned to the type itself.
If the type has subtypes, they are listed in an object list subtypes
.
Optionally, the type can also have the property select
, which specifies the label above the dropdown menu.
Each subtype can have the following properties:
option
- 드롭다운 메뉴에 이름을 입력하세요descr
- Description of the subtypeheader
- Header of the message that is being added, i.e. the part that will be between== ... ==
title
- 매세지 박스의 제목text
- Text of the message box (see below for details)image
- 메시지 상자의 그림gallery
- Gallery for selecting an image (see below for details)fields
- Array of fields that the user can edit; can contain these values:header, title, image, message
imageSize
- 그림 크기 (e.g.100px
)backgroundColor
- Background color (any CSS valid color, e.g.#fdffe7
oryellow
)borderColor
- 경계선 색 (같음)
When not using subtypes, these options (except for the first two) should be added to the type itself.
In the text
and email
fields (as well as in defaultText
, mentioned earlier), you can use a few codes that will be substituted automatically:
- $1 - User message
- $2 - Title
- $3 - Image name
- $4 - Image size
- $5 - Background color
- $6 - Border color
- $7 - Username of the recipient
To make it easy for the user to select images, you can create a gallery with predefined images. For this, create a gallery
property, which has the following properties:
imageList
- An array of image nameswidth
- Maximum width of the images in the gallery (in pixels); for 3 images145
is recommendedheight
- Maximum height of the images in the gallery (in pixels)number
- Number of random images to show (optional); if omitted all images are shown
You can use images from Wikimedia Commons, as the default awards do. Like mentioned before, you have to enable InstantCommons for this.
//<nowiki>
and end it with //</nowiki>
so that any Wikitext code (such as signatures or {{subst:foo}}
) doesn't get expanded within the JavaScript.Removing WikiLove types
If you just want to remove some of the default WikiLove types, you can delete them from the $.wikiLoveOptions object. Here are some examples that you could use in your wiki's MediaWiki:WikiLove.js page:
// Delete the Random Acts of Kindness Barnstar from the barnstars list
delete $.wikiLoveOptions.types.barnstar.subtypes.kindness;
// Delete the cheeseburger from the food and drink list
delete $.wikiLoveOptions.types.food.subtypes.cheeseburger;
// Delete the kittens interface entirely
delete $.wikiLoveOptions.types.kitten;
Adding new WikiLove types
Here's an example of adding a new puppy type:
$.wikiLoveOptions.types.puppy = {
name: 'Puppy', // name of the type (appears in the types menu)
fields: [ 'header', 'message' ], // fields to ask for in form
header: 'You get a puppy!', // header that appears at the top of the talk page post (optional)
text: '[[File:2009-08-16 Puppy at Duke East 1.jpg|left|150px]]\n$1\n\n~~'+'~~<br style="clear: both;"/>', // $1 is the custom message
icon: 'http://www.mysite.com/images/wikilove-icon-puppy.png' // appears in the types menu
};
Here's an example of adding a new hedgehog type with a gallery of images to choose from:
$.wikiLoveOptions.types.hedgehog = {
name: 'Hedgehogs', // name of the type (appears in the types menu)
fields: [ 'header', 'message' ], // fields to ask for in form
header: 'A hedgehog for you!', // header that appears at the top of the talk page post (optional)
text: '[[$3|left|150px]]\n$1\n\n~~'+'~~\n<br style="clear: both"/>', // $3 is the image filename, $1 is the message
gallery: {
imageList: [ 'Hedgehog1.jpg', 'Orizo5.jpg', 'Erinaceus europaeus LC0119.jpg' ],
width: 145, // maximum width of the images in the gallery
height: 150, // maximum height of the images in the gallery
number: 3 // number of random images to show (optional)
},
icon: 'http://www.mysite.com/images/wikilove-icon-hedgehog.png' // appears in the types menu
Here's an example of adding a new falafel subtype under the existing food type:
$.wikiLoveOptions.types.food.subtypes.falafel = {
fields: [ 'header', 'message' ], // fields to ask for in form
option: 'Falafel', // option listed in the select list
descr: 'Falafel is a popular Middle Eastern street food made from ground chickpeas or fava beans and topped with salads, vegetables, and sauces. It is typically served in a pocket of pita bread.',
header: 'Some falafel for you!', // header that appears at the top of the talk page post (optional)
image: 'Falafel award.png', // image for the item
imageSize: '120px' // size to display image (optional)
};
Glitches and problems
If the talk page you are attempting to edit contains a word that has been subsequently added to Special:SpamRegex, attempts to use the interface to add a barnstar or other award will fail. This is because the page cannot be edited, as it contains a forbidden word. Removing the word from the page or from the filter will fix the problem.
API documentation
WikiLove uses a special wikilove API to post messages to users' talk pages. The API is basically just a thin wrapper around some existing APIs. If the user's talk page is a Wikitext page, it uses the edit API. If it's a Flow page, it uses the flow API. And if it's a LiquidThreads page, it uses the threadaction API.
In order to call the API, use the parameter action=wikilove
.
변수:
title
- Title of the user or user talk page to send WikiLove to (required)
text
- Raw wikitext to add in the new section (required)
message
- Actual message the user has entered, for logging purposes (doesn't include the image and HTML formatting)
token
- Edit token. You can get one of these through prop=info (required)
subject
- Subject header of the new page section (required)
type
- Type of WikiLove (for statistics); this corresponds with a type selected in the left menu, and optionally a subtype after that (e.g. "barnstar-normal" or "kitten") (optional)
email
- Content of the optional email message to send to the user
예시:
api.php?action=wikilove&title=User:Dummy&text=Love&subject=Hi&token=%2B\
1.0버전의 디자인
This document describes the design and behavior of the WikiLove system of positive feedback for Wikipedia. This tool is designed to promote the spread of WikiLove within Wikipedia. Specifically, it makes adding awards and gifts to user talk pages as simple as clicking a few buttons.
이유
Wikipedia, as a community, has several mechanisms for indicating displeasure or to provide negative feedback to its users. Certain gadgets, such as Twinkle, are heavily engineered towards warning, blocking, and reverting.
Since Wikipedia is in need of positive reinforcement, especially for new users, a system designed specifically and only towards positive feedback is desired.
Use of whimsical style
The system has a heavy style of "whimsy" to its design. This is intentional and is intended to align closer to the expectations of users of modern websites. Further, the entire principle of "awards" is in and of itself whimsical (e.g., cookies and kittens).
This style may be abandoned based on user feedback.
Note on nomenclature
Some template types, such as welcome templates, are not technically "awards".
This document uses the term award interchangeably with template. Since the system is user-focused, and not intended directly for power-users, user-facing nomenclature has been used.
프로세스
Dialog behavior
The WikiLove dialog is modal. Initiating it (from anywhere) will cause it to appear over the text of the page. It can be dismissed with a simple click.
The WikiLove system requires JavaScript.
The user will initially be presented with a short set of easy-to-understand instructions and a list of available award categories.
Upon selecting an award type, the user is presented with a section in which they can add details to the award (such as a short message).
Note that some award categories (e.g., "cookie") will not have a secondary award creation step and will go directly to "Preview".
The user then clicks the "preview" button, which will load a preview of the award so that they may see how it will look on the user's talk page.
Once the user is satisfied, they may click the "Send WikiLove" button. At this time, AJAX calls to the server API will be fired, adding the template to the user's talk page.
이메일 인증
Since most new users are unlikely to be aware that they even have talk pages, they may not be aware that they have received the WikiLove in question.
Accordingly, the server will email the recipient (if they have provided an email address) informing them of the WikiLove as well as short instructions on how to access their talk page.
사이트 환경설정
Initially, the awards that can be given are to be defined in the gadget itself. If this system is elevated to an extension, then the names of the awards and the templates should be defined in the site's LocalSettings.php
.
Alternatively, such information can be stored in the database. An administration console would be required to add or subtract available awards and award categories.
데이터 저장소
For statistics gathering purposes, every time an award is given, data is tracked and stored in the database. A simple table, written to via the API, is all that need be required:
- From User - The username of the person who is giving the award
- To User - The username of the person receiving the award
- Template - the name of the template awarded
- Timestamp - when the award was given
- Award Text - Optional; this would be the text of the award
Special:WikiLoveStatistics
In the future, it should be possible to create a page, Special:WikiLoveStatistics, that could be used to see how often the system is used as well as providing insight into who gives the most love, what awards are most popular, and who receives the most awards.
This will help to provide a global overview of community health. The more awards given, the healthier the community.
Future thinking
Phase two of this project could result in "Send WikiLove" links being dynamically added to signatures on talk pages. This would allow for WikiLove to be sent in a much easier manner, directly from other talk pages.
같이 보기
- 위키사랑 - 오리지널 디자인 문서
- 확장기능:감사 - Echo를 사용하여 편집 한 것에 대해 더 가벼운 감사
- GiveCredit - MeatBall 위키
이 확장 기능은 하나 이상의 위키미디어 프로젝트에서 사용 중입니다. 이것은 아마도 이 확장 기능이 안정적이고 트래픽이 많은 웹 사이트에서 사용할 수 있을 만큼 충분히 잘 작동한다는 것을 의미합니다. 설치된 위치를 확인하려면 위키미디어의 CommonSettings.php 및 InitialiseSettings.php 구성 파일에서 이 확장 기능의 이름을 찾습니다. 특정 위키에 설치된 확장 기능의 전체 목록은 위키의 Special:Version 문서에서 볼 수 있습니다. |
This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
- Stable extensions/ko
- User interface extensions/ko
- MIT licensed extensions/ko
- Extensions in Wikimedia version control/ko
- BeforePageDisplay extensions/ko
- ChangeTagsListActive extensions/ko
- GetPreferences extensions/ko
- ListDefinedTags extensions/ko
- LoadExtensionSchemaUpdates extensions/ko
- SkinTemplateNavigation::Universal extensions/ko
- UserMergeAccountFields extensions/ko
- All extensions/ko
- Extensions used on Wikimedia/ko
- Extensions included in Miraheze/ko
- Extensions included in WikiForge/ko
- API extensions/ko