확장기능:댓글
![]() 출시 상태: 안정 |
|
---|---|
![]() |
|
구현 | 파서 확장 기능 , 훅 |
설명 | <comments /> 파서 후크 태그를 문서 내에 추가하면, 문서 내에 댓글을 달 수 있는 기능을 사용할 수 있도록 합니다. |
만든 이 |
|
최신 버전 | 4.6.0 (2019-08-08) |
MediaWiki | 1.39+ |
데이터베이스 변경 | 예 |
테이블 | Comments Comments_Vote Comments_block |
라이선스 | GNU General Public License 2.0 or later |
다운로드 | |
예제 | 소셜 기능 개발 위키 |
|
|
<comments /> |
|
Quarterly downloads | 107 (Ranked 88th) |
Comments 확장 기능 번역 (translatewiki.net에서 가능한 경우) | |
이슈 | 미해결 작업 · 버그 보고 |
댓글 확장기능은 <comments />
파서 후크 태그를 추가해 해당 태그가 있는 문서에 댓글을 달 수 있도록 하는 기능입니다.
댓글을 다는 행동은 Special:Log/comments
에 로깅되지만, 기본적으로는 숨겨져 있습니다. 마치 patrol 로그 항목 처럼 말입니다.
당신은 $wgCommentsInRecentChanges = true;
를 설정하여 댓글을 보여줄 수 있고, Special:RecentChanges를 설정하여 댓글 기록까지 보여줄 수 있습니다. (2.8 버전 이상에서 가능합니다)
기본적으로 코드는 Misza과 Jack Phoenix로 결정됩니다.
설치
- 파일을 다운로드하고
Comments
폴더를extensions/
디렉토리에 넣어 주세요. - 아래의 코드를
LocalSettings.php
의 말미에 추가합니다:wfLoadExtension( 'Comments' );
- 갱신 스크립트를 실행합니다. 이 스크립트는 이 확장기능을 필요로 하는 데이터 베이스 테이블을 자동적으로 작성합니다.
- 완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.
사용
<comments />
— 기본적인 댓글 형태입니다. 대부분의 경우에 적합합니다.<comments allow="Derfel,Jack Phoenix,Misza" />
— 사용자들 중에서 "Defel", "Jack Pheonix", "Misza"만이 댓글을 달 수 있습니다.<comments voting="Plus" />
— 사용자들이 댓글의 평가를 부정적으로평가 (반대, 👎) 하는 것을 막고, 오직 긍정적으로 평가 (추천, 👍 )만 할 수 있도록 합니다.
오늘의 댓글
이 확장기능은 "오늘의 댓글" 기능을 불러옵니다. (<commentsoftheday />
). 이 기능은 기본적으로 사용되지 "않습니다". 당신은 위키의 LocalSettings.php
안에, require_once
다음 줄에 아래 줄을 추가하여 이 기능을 사용할 수 있습니다.
require_once "$IP/extensions/Comments/CommentsOfTheDay.php";
If the nocache
argument is passed to the parser hook (like this: <commentsoftheday nocache=true />
), the parser hook will not use memcached and will just fetch the data from the database instead of cache.
This is useful if you want to show the most up-to-date data, but it can be very server-intensive.
사용자 권한
이 확장기능은 세 가지의 사용자 권한을 추가합니다.
comment
- (댓글을 다는 것을 허용합니다)commentlinks
- (댓글에 외부 링크를 넣고 달 수 있습니다.)commentadmin
- (다른 사용자가 단 댓글을 삭제할 수 있습니다.)comment-delete-own
- which allows deleting one's own comments, e.g.
$wgGroupPermissions['sysop']['commentadmin'] = true;
기본적으로 모든 사람들은 익명이더라도 댓글을 달 수 있습니다. 하지만 댓글 안에 외부 링크를 삽입한 댓글은 $manual로 제한됩니다.
만약 익명 사용자들도 댓글에 외부 링크를 삽입하는 것을 허용하고 싶으시다면 require_once
뒤에 아래 구문을 추가하세요.
$wgGroupPermissions['*']['commentlinks'] = true;
기본적 설정으로는 commentadmin
그룹에 속한 사용자들만 댓글을 삭제할 수 있습니다.
사용자 점수
$wgUserStatsPointValues['comment_plus']
— amount of points to give out when another user gives "thumbs up" to your comment.$wgUserStatsPointValues['comment_ignored']
— amount of points to give out when another user adds your comments to their ignore list (Special:CommentIgnoreList).
매개 변수
$wgCommentsDefaultAvatar
— path to an image which will be displayed instead of an avatar if social tools (SocialProfile extension) aren't installed. Should be 50x50px. Note that there is no default avatar image shipped with this extension. The default is defined inextension.json
and links to an external image onshoutwiki.com
server, an ad driven wiki farm. You may prefer to set this parameter to point to a local file.$wgCommentsInRecentChanges
— by default, this variable is set tofalse
. Set it totrue
to display comments log entries in Special:RecentChanges, too, in addition to the comments log atSpecial:Log/comments
.$wgCommentsSortDescending
— by default, this variable is set tofalse
. Set it totrue
to sort comments by date descending, with the new comment box and most recent comments at the top.
매직 워드/파서 함수
Comments includes 2 magic words and a parser function:
{{NUMBEROFCOMMENTS}}
gives the entire number of comments on the wiki.{{NUMBEROFCOMMENTSPAGE}}
gives number of comments on the current page.{{NUMBEROFCOMMENTSPAGE:<pagename>}}
gives number of comments on the given page.
후크
Comments extension adds three hooks, Comment::add
, Comment::delete
and Comment::isSpam
.
Hook name | When it is called | Parameters |
---|---|---|
Comment::add
|
After a comment has been added into the database, on the bottom of Comment::add function |
|
Comment::delete
|
After a comment has been deleted and the caches have been purged (function delete on class Comment )
|
|
Comment::isSpam
|
Called in Comment::isSpam before performing other spam checks.
|
|
국제화
The Comments extension currently has (partial or full) support for 68 different languages, including English. Please visit translatewiki.net if you want to translate Comments into your language.
할일 목록
- HTML output is not valid XHTML - would be nice if it were but we can live without that
- Would be nice if there was a special page that gives a overview of all uses of the Comments extension on all pages (for an adminstrator to be able to moderate easier)
같이 보기
This extension is included in the following packages and/or wiki farms: 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. |