एक्सटेंशन:Comments

This page is a translated version of the page Extension:Comments and the translation is 100% complete.
मीडियाविकि एक्सटेंशन मैन्युअल
Comments
प्रकाशन की स्थिति: स्थिर
कार्यान्वयन पर्सर एक्सटेंशन , हुक
विवरण ‎<comments /> पार्सर हुक टैग जोड़ता है जिससे लेखों पर टिप्पणियाँ जोड़ी जा सकती हैं
लेखक
नवीनतम संस्करण 4.6.0 (2019-08-08)
MediaWiki 1.39+
डेटाबेस बदलता है हाँ
टेबल Comments
Comments_Vote
Comments_block
लाइसेंस GNU साधारण सार्वजनिक लाइसेंस 2.0 या अधिक
डाउनलोड करें
उदाहरण सोशल उपकरण विकास विकि
  • $wgCommentsDefaultAvatar
  • $wgCommentsInRecentChanges
  • $wgCommentsAbuseFilterGroup
  • $wgCommentsSortDescending
‎<comments />
Quarterly downloads 108 (Ranked 87th)
Comments एक्सटेंशन को अनुवादित करें अगर यह translatewiki.net पर उपलब्ध है
मुद्दे अधूरे कार्य · बग की रिपोर्ट करें

Comments एक्सटेंशन ‎<comments /> पार्सर हुक टैग जोड़ देता है जिससे उन पृष्ठों पर लेखों से संबंधित टिप्पणियाँ जोड़ी जा सकती हैं जिनपर यह टैग मौजूद है।

टिप्पणी के कार्यों को Special:Log/comments पर लॉग किया जाता है, मगर परीक्षण एंट्रियों की तरह उन्हें डिफ़ॉल्ट से छिपाया जाता है। आप Special:RecentChanges में टिप्पणियों की लॉग एंट्रियाँ दिखाने के लिए $wgCommentsInRecentChanges = true; सेट कर सकते हैं (संस्करण 2.8+ में उपलब्ध)।

कोड में ज़्यादातर सुधार Misza और Jack Phoenix द्वारा किए गए हैं।

स्थापना

  • फाइलों को डाउनलोड करें और अपने extensions/ फोल्डर के Comments नामक डिरेक्ट्री में डालें।
  • अपने LocalSettings.php फ़ाइल के नीचे निम्नलिखित कोड जोड़ें:
    wfLoadExtension( 'Comments' );
    
  • अद्यतन स्क्रिप्ट चलाएँ जो स्वचालित रूप से आवश्यक डेटाबेस टेबल्स का निर्माण करेगा जिसकी इस एक्सटेंशन को आवश्यकता है।
  •   पूर्ण – अपने विकि पर 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.

जादुई शब्द/पार्सर फ़ंक्शन्स

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))

अंतर्राष्ट्रीयकरण

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.

करने के लिए काम

  1. HTML output is not valid XHTML - would be nice if it were but we can live without that
  2. 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)

ये भी देखें