एक्सटेंशन:Comments

From mediawiki.org
This page is a translated version of the page Extension:Comments and the translation is 100% complete.
मीडियाविकि एक्सटेंशन मैन्युअल
Comments
प्रकाशन की स्थिति: स्थिर
कार्यान्वयन पर्सर एक्सटेंशन , हुक
विवरण ‎<comments /> पार्सर हुक टैग जोड़ता है जिससे लेखों पर टिप्पणियाँ जोड़ी जा सकती हैं
लेखक
नवीनतम संस्करण 5.0
MediaWiki 1.39+
डेटाबेस बदलता है हाँ
टेबल Comments
Comments_Vote
Comments_block
लाइसेंस GNU साधारण सार्वजनिक लाइसेंस 2.0 या अधिक
डाउनलोड करें
  • $wgCommentsDefaultAvatar
  • $wgCommentsInRecentChanges
  • $wgCommentsAbuseFilterGroup
  • $wgCommentsSortDescending
‎<comments />
  • comment
  • commentadmin
  • commentlinks
  • comment-delete-own
Quarterly downloads 76 (Ranked 76th)
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' );
    
  • अपडेट स्क्रिप्ट चलाएँ जो स्वचालित रूप से आवश्यक डेटाबेस टेबल्स का निर्माण करेगा जिसकी इस एक्सटेंशन को आवश्यकता है।
  • Yes पूर्ण – अपने विकि पर Special:Version पर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
You will need to download the master version in order for the extension to work properly, as there is an issue with the branched versions.

उपयोग

  • ‎<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-delete-own - जो सदस्यों को अपनी टिप्पणियाँ हटाने की अनुमति देता है, जैसे
$wgGroupPermissions['sysop']['commentadmin'] = true;

डिफ़ॉल्ट से गुमनाम सदस्यों सहित कोई भी टिप्पणियाँ पोस्ट कर सकता है, मगर सिर्फ स्वतः स्थापित सदस्य ही बाहरी कड़ियों वाली टिप्पणियाँ पोस्ट कर सकते हैं।

अगर आप चाहते हैं कि गुमनाम सदस्य भी बाहरी कड़ियाँ पोस्ट कर पाएँ, require_once के बाद यह जोड़ें:

$wgGroupPermissions['*']['commentlinks'] = true;

डिफ़ॉल्ट से सिर्फ commentadmin समूह के सदस्य टिप्पणियाँ हटा सकते हैं।

सदस्य पॉइंट्स

This is relevant only if the SocialProfile extension is installed and $wgUserLevels is properly configured.
  • $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 in extension.json and links to an external image on shoutwiki.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 to false. Set it to true to display comments log entries in Special:RecentChanges, too, in addition to the comments log at Special:Log/comments.
  • $wgCommentsSortDescending — by default, this variable is set to false. Set it to true to 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 would like AbuseFilter to pull all of 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 into the database, on the bottom of Comment::add function
  • $comment (instance of Comment class)
  • $commentID
  • $pageID
Comment::delete After a comment has been deleted and the caches have been purged (function delete on class Comment)
  • &$comment (instance of Comment class)
  • $commentID
  • $pageID
Comment::isSpam Called in Comment::isSpam before performing other spam checks.
  • &$text (user-supplied comment text to check against spam)
  • &$retVal (boolean; function return value, i.e. does the supplied text contain spam (true) or not (false))

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 $wgSpamRegex and $wgSummarySpamRegex
  • possibility for extension developers to implement custom spam checks via the Comment::isSpam hook point (see the #Hooks section above)
  • AbuseFilter interoperability — AbuseFilter can be made to check if the action variable's value is comment to write filters that apply only to comments made via the Comments extension; the new_wikitext variable contains the actual comment text, and the new_size variable is calculated on-demand based on the value of the new_wikitext variable. Refer to AbuseFilter's documentation for more details on how those variables and filters in general work.
    • The new configuration variable $wgCommentsAbuseFilterGroup can 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 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.

ये भी देखें