एक्सटेंशन:Comments
![]() प्रकाशन की स्थिति: स्थिर |
|
---|---|
![]() |
|
कार्यान्वयन | पर्सर एक्सटेंशन , हुक |
विवरण | <comments /> पार्सर हुक टैग जोड़ता है जिससे लेखों पर टिप्पणियाँ जोड़ी जा सकती हैं |
लेखक |
|
नवीनतम संस्करण | 4.6.0 (2019-08-08) |
MediaWiki | 1.39+ |
डेटाबेस बदलता है | हाँ |
टेबल | Comments Comments_Vote Comments_block |
लाइसेंस | GNU साधारण सार्वजनिक लाइसेंस 2.0 या अधिक |
डाउनलोड करें | |
उदाहरण | सोशल उपकरण विकास विकि |
|
|
<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 पर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
उपयोग
<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
समूह के सदस्य टिप्पणियाँ हटा सकते हैं।
सदस्य पॉइंट्स
$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 में दो जादुई शब्द और एक पार्सर फ़ंक्शन शामिल है:
{{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)
ये भी देखें
इस एक्सटेंशन को निम्न पैकेजेस और/या विकि फ़ार्म्स में शामिल किया गया है: यह कोई आधिकारिक सूची नहीं है। कुछ विकि फ़ार्म्स/होस्ट्स में यह extension हो सकता है हालाँकि शायद वे यहाँ सूचीबद्ध न हों। सुनिश्चित करने के लिए हमेशा अपने विकि फ़ार्म/होस्ट से संपर्क करें या बंडल जाँचें। |