एक्सटेंशन:Comments
प्रकाशन की स्थिति: स्थिर |
|
|---|---|
| कार्यान्वयन | पर्सर एक्सटेंशन, हुक |
| विवरण | <comments /> पार्सर हुक टैग जोड़ता है जिससे लेखों पर टिप्पणियाँ जोड़ी जा सकती हैं |
| लेखक | |
| नवीनतम संस्करण | 5.1 |
| MediaWiki | 1.43+ |
| डेटाबेस बदलता है | हाँ |
| टेबल्स | Comments Comments_Vote Comments_block |
| लाइसेंस | GNU साधारण सार्वजनिक लाइसेंस 2.0 या अधिक |
| डाउनलोड करें | |
|
|
<comments /> |
|
|
|
| Comments एक्सटेंशन को अनुवादित करें अगर यह translatewiki.net पर उपलब्ध है | |
| मुद्दे | अधूरे टास्क्स · बग रिपोर्ट करें |
Comments एक्सटेंशन <comments /> पार्सर हुक टैग जोड़ देता है जिससे उन पृष्ठों पर लेखों से संबंधित टिप्पणियाँ जोड़ी जा सकती हैं जिनपर यह टैग मौजूद है।
टिप्पणी के कार्यों को Special:Log/comments पर लॉग किया जाता है, मगर परीक्षण एंट्रियों की तरह उन्हें डिफ़ॉल्ट से छिपाया जाता है।
आप Special:RecentChanges में टिप्पणियों की लॉग एंट्रियाँ दिखाने के लिए $wgCommentsInRecentChanges = true; सेट कर सकते हैं (संस्करण 2.8+ में उपलब्ध)।
कोड में ज़्यादातर सुधार Misza और Jack Phoenix द्वारा किए गए हैं।
स्थापना
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केCommentsनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Comments
- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
wfLoadExtension( 'Comments' );
- अपडेट स्क्रिप्ट चलाएँ जो स्वचालित रूप से आवश्यक डेटाबेस टेबल्स का निर्माण करेगा जिसकी इस एक्सटेंशन को आवश्यकता है।
पूर्ण – अपने विकि पर Special:Version पर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
उपयोग
<comments />— बुनियादी टिप्पणी फ़ॉर्म, ज़्यादातर चीज़ों के लिए काफ़ी है।<comments allow="Derfel,Jack Phoenix,Misza" />— सिर्फ सदस्य Derfel, Jack Phoenix और Misza को टिप्पणियाँ प्रस्तुत करने देता है।<comments voting="Plus" />— सदस्यों को टिप्पणियों पर नकारात्मक प्रतिक्रिया (नीचा अंगूठा) देने से रोकता है, और सिर्फ सकारात्मक प्रतिक्रिया (ऊँचा अंगूठा) की अनुमति देता है।
दैनिक निर्वाचित टिप्पणी
इस एक्सटेंशन में एक "दैनिक निर्वाचित टिप्पणी" सुविधा (<commentsoftheday />) भी है, जो डिफ़ॉल्ट से सक्षम नहीं होता है। आप इस सुविधा को विकि के LocalSettings.php में सक्षम कर सकते हैं, और ऐसा करने के लिए require_once पंक्ति के बाद निम्न कोड जोड़ें:
require_once "$IP/extensions/Comments/CommentsOfTheDay.php";
अगर nocache तर्क पार्सर हुक को पास किया जाता है (ऐसे: <commentsoftheday nocache=true />), पार्सर हुक memcached का इस्तेमाल करने के बजाय कैश की जगह डेटाबेस से डेटा प्राप्त करेगा।
यह तब काम आता है जब आपको नवीनतम डेटा चाहिए हो, मगर यह सर्वर पर काफ़ी बोझ डालता है।
सदस्य अधिकार
यह एक्सटेंशन निम्न नए सदस्य अधिकार जोड़ता है:
comment- (जो टिप्पणियाँ जोड़ने की अनुमति देता है)commentlinks- (जो टिप्पणियों पर बाहरी कड़ियाँ पोस्ट करने की अनुमति देता है)commentadmin- जो सदस्यों द्वारा पोस्ट की गई टिप्पणियाँ हटाने की अनुमति देता हैcomment-edit-own- allows editing one's own comments after postingcomment-delete-own- जो सदस्यों को अपनी टिप्पणियाँ हटाने की अनुमति देता है, जैसे
$wgGroupPermissions['sysop']['commentadmin'] = true;
डिफ़ॉल्ट से गुमनाम सदस्यों सहित कोई भी टिप्पणियाँ पोस्ट कर सकता है, मगर सिर्फ स्वतः स्थापित सदस्य ही बाहरी कड़ियों वाली टिप्पणियाँ पोस्ट कर सकते हैं।
अगर आप चाहते हैं कि गुमनाम सदस्य भी बाहरी कड़ियाँ पोस्ट कर पाएँ, require_once के बाद यह जोड़ें:
$wgGroupPermissions['*']['commentlinks'] = true;
डिफ़ॉल्ट से सिर्फ commentadmin समूह के सदस्य टिप्पणियाँ हटा सकते हैं।
सदस्य पॉइंट्स
$wgUserStatsPointValues['comment_plus']— the number of points to give out when another user gives a "thumbs up" to your comment.$wgUserStatsPointValues['comment_ignored']— the number of points to give out when another user adds your comments to their ignore list (Special:CommentIgnoreList).
पैरामीटर्स
$wgCommentsDefaultAvatar— the path to an image which will be displayed instead of an avatar if social tools (SocialProfile extension) aren't installed. It should be 50x50px. Note that there is no default avatar image shipped with this extension. The default is defined inextension.jsonand links to an external image onshoutwiki.comserver, 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 totrueto 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 totrueto sort comments by date descending, with the new comment box and most recent comments at the top.$wgCommentsAbuseFilterGroup— This is the custom group name for AbuseFilter for when the AbuseFilter extension is enabled. It ensures that AbuseFilter only pulls the filters related to Comments. If you want AbuseFilter to pull all the filters, enter'default'here. The default value for this is'comment', which ensures that AbuseFilter will only look for filters specifically written to target comments.
जादुई शब्द/पार्सर फ़ंक्शन्स
Comments में दो जादुई शब्द और एक पार्सर फ़ंक्शन शामिल है:
{{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 to the database, at 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.
|
|
Anti-spam
Though (as of Q3/2023) Comments does not (yet) support ConfirmEdit, MediaWiki's de facto CAPTCHA extension, there are plenty of other anti-spam measures built in, including:
- restricting who can add comments and/or comments that contain hyperlinks (see the #User rights section above)
- support for
$wgSpamRegexand$wgSummarySpamRegex - possibility for extension developers to implement custom spam checks via the
Comment::isSpamhook point (see the #Hooks section above) - AbuseFilter interoperability — AbuseFilter can be made to check if the
actionvariable's value iscommentto write filters that apply only to comments made via the Comments extension; thenew_wikitextvariable contains the actual comment text, and thenew_sizevariable is calculated on-demand based on the value of thenew_wikitextvariable. Refer to AbuseFilter's documentation for more details on how those variables and filters work.- The new configuration variable
$wgCommentsAbuseFilterGroupcan be set to'default'to make existing AbuseFilter filters apply to comments as well. By default, it is set to'comment', so only filters specifically designed to target comments will be executed against comments made via the Comments extension.
- The new configuration variable
अंतर्राष्ट्रीयकरण
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 or other extensions of the social tools family of extensions into your language or modify existing translations.
ये भी देखें
| इस एक्सटेंशन को निम्न विकि फ़ार्म्स/होस्ट्स और/या पैकेजिस में शामिल किया गया है: |
- Stable extensions/hi
- Parser extensions/hi
- Hook extensions/hi
- GPL licensed extensions/hi
- Extensions in Wikimedia version control/hi
- ArticlePurge extensions/hi
- BeforeCreateEchoEvent extensions/hi
- GetMagicVariableIDs extensions/hi
- LoadExtensionSchemaUpdates extensions/hi
- ParserFirstCallInit extensions/hi
- ParserGetVariableValueSwitch extensions/hi
- All extensions/hi
- Social tools/hi
- Extensions included in Miraheze/hi
- Extensions included in Telepedia/hi
- Discussion and forum extensions/hi
