Hello,
I know for this question I should ask the extensions programmer, but
he is not anzwering, so I am asking here, because maybe someone has a
solution for this:
It is all about: http://www.mediawiki.org/wiki/Extension:ArticleComments
I got it to work properly on my Mediawiki Installation, but it gets
spammed massive. That is why i would like to install the reCAPTCHA
Plugin, announced here:
www.mediawiki.org/wiki/Extension_talk:ArticleComments#Captcha_support
I wrote "Jaroslav Tulach" and he is sending me some
article-comments.diff file which has the following code (see below).
Is someone able to read this code and knows what to do so that
reCAPTCHA could be installed in that wonderful Article Comments
Extension?
Your Help is highly appreciated
Isabell
~~~~~~~~~~~~~~~~~~~~~~~~
diff -r 5ab5e1459c4f -r 761476165c97 httpdocs/extensions/ArticleComments.php
--- a/httpdocs/extensions/ArticleComments.php Tue May 12 21:42:16 2009 +0200
+++ b/httpdocs/extensions/ArticleComments.php Wed May 13 09:50:06 2009 +0200
@@ -69,6 +69,8 @@
# Confirm MW environment
if (!defined('MEDIAWIKI')) die();
+require_once 'EditPage.php';
+
# Credits
$wgExtensionCredits['other'][] = array(
'name'=>'ArticleComments',
@@ -138,7 +140,7 @@
*/
function wfArticleCommentForm( $title = null, $params = array() ) {
- global $wgScript, $wgArticleCommentDefaults, $wgContentLang, $wgContLang;
+ global $wgScript, $wgArticleCommentDefaults, $wgContentLang,
$wgContLang, $wgCaptcha;
$wcl = ($wgContentLang ? $wgContentLang : $wgContLang);
# Merge in global defaults if specified
@@ -177,6 +179,7 @@
'<p>'.wfMsgForContent($ac.'comment-field').'<br />'.
'<textarea id="comment" name="comment" style="width:30em" rows="5">'.
'</textarea></p>'.
+ $wgCaptcha->getForm().
'<p><input id="submit" type="submit" '.
'value="'.wfMsgForContent($ac.'submit-button').'" /></p>'.
'</form></div>';
@@ -292,6 +295,7 @@
$wgMessageCache->addMessage('article-comments-submission-view-all',
'You may view all comments on that article [[$1|here]]');
$wgMessageCache->addMessage('article-comments-prefilled-comment-text', '');
$wgMessageCache->addMessage('article-comments-user-is-blocked',
'Your user account is currently blocked from editing [[$1]].');
+ $wgMessageCache->addMessage('article-comments-no-captcha', 'Your
response to captcha was not correct. Go back and try again.');
$wgMessageCache->addMessage('article-comments-new-comment', "\n==
\$1 ==\n\n<div class='commentBlock'>\n\$2\n\n--\$3 \$4\n</div>\n");
$wgMessageCache->addMessage('article-comments-no-spam', "At least
one of the submitted fields was flagged as spam.");
$wgMessageCache->addMessage('processcomment', 'Process Article Comment');
@@ -302,7 +306,7 @@
*/
function specialProcessComment() {
- global $wgOut, $wgParser, $wgUser, $wgContentLang, $wgContLang;
+ global $wgOut, $wgParser, $wgUser, $wgContentLang, $wgContLang, $wgCaptcha;
$wcl = ($wgContentLang ? $wgContentLang : $wgContLang);
# Retrieve submitted values
@@ -352,6 +356,18 @@
return;
}
+ # Captcha & Recaptcha
+ if ($wgCaptcha->passCaptcha()) {
+ $article->purge();
+ } else {
+ $wgOut->setPageTitle(wfMsgForContent($ac.'submission-failed'));
+ $wikiText = "<div class='errorbox'>";
+ $wikiText .= wfMsgForContent($ac.'failure-reasons')."\n\n";
+ $wikiText .= '* '.wfMsgForContent($ac.'no-captcha',
$talkTitle->getPrefixedText())."\n";
+ $wgOut->addWikiText($wikiText . "</div>");
+ return;
+ }
+
# Retrieve article content
$articleContent = '';
if ( $article->exists() ) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: Isabell Alcott <uv22ealcott(a)googlemail.com>
>
> ... if DISQUS change the API or something
> that mediawiki and DISQUS cant communicate anymore, all the comments
> might be gone.
>
> We are planning to do a archive page for a 80 yo professor, which
> should stay for the next 20+ years and so should the comments.
The same might be said for MediaWiki itself -- or of JavaScript, or CSS, or any of a dozen or so technologies involved!
If this is for an archive, I would capture the HTML from a common browser rendering and save that instead.
> I tested this DISQUS for several hours now... it dont seem to be very practicable. I
> posted many comments on one Testsite and after closing Firefox and IE
> and repointing to the testsite, there are shown "0 Comments". After
> pointing to "Newest" I see the old comments but still the Counter
> above stands on zero... it takes 15 minutes or so
> till the comments are actualized.
This has not been my experience. When I post a comment on our site, it shows up immediately. Try it if you like in our Sandbox page: http://www.EcoReality.org/wiki/Sandbox
Do you have a reliable Internet connection? Sometimes when ours is slow, the comment won't show up until refreshing the page several times. But this is not a Disqus problem.
----------------
:::: I think our [energy] policy is called "aircraft carriers." -- Irwin Steltzer
:::: Jan Steinman, EcoReality Co-op ::::
> From: Isabell Alcott <uv22ealcott(a)googlemail.com>
>
> I got it to work properly on my Mediawiki Installation, but it gets
> spammed massive. That is why i would like to install the reCAPTCHA
> Plugin
Not the answer you asked for, but I'm using the Disqus extension for article comments, and have minimal spam, and all of it is referrer spam. Disqus gives you great moderation options, such as moderate only if a link is posted, by which I catch all the referrer spam.
----------------
:::: When you’re born into this world, you get a ticket to the freak show. When you’re born in America, you get a front row seat. -- George Carlin
:::: Jan Steinman, EcoReality Co-op ::::
Hello,
I wanna know If there's some way to make that all the pages of a category
contain a certain text.
I've been looking at CategoryFunctions extension, but I think it is not
what im needing.
Thanks in advance,
Marcelo.
Hello Everyone,
Good day!
When we had our first official out of town outreach project in Naga City,
about 300 km south of Manila, we encountered a problem when 50+ students,
librarians and professors attempt to create an account with the Bikol
Wikipedia. Apparently it only allows 6 applications per IP in 24 hours.
Is there a creative way to have not experience the same issue in our future
outreach projects? Say one school has one public IP address but many
attempt to register?
Another, we would like to ask if we can have a possibility to have an
client software that can perform to do sandbox editing for those who wants
to learn to edit Wikipedia but offline?
There will be places we would visit that has computers with no stable
internet connection but willing to contribute to Wikipedia. Say edit and
export it as xml and then upload that article in Wikipedia in bulk?
Your inputs are valuable to us.
--
Roman "Butch" Bustria Jr.
Vice President (2012-2013)
Wikimedia Philippines Inc.
------------------------------
The information contained in this message is privileged and intended only
for the recipients named. If the reader is not a representative of the
intended recipient, any review, dissemination or copying of this message or
the information it contains is prohibited. If you have received this
message in error, please immediately notify the sender, and delete the
original message and attachments.
Please consider the environment before printing this email.
---------- Forwarded message ----------
From: Thorsten Glaser <t.glaser(a)tarent.de>
Date: Mon, Jul 2, 2012 at 10:04 AM
Subject: [Pkg-mediawiki-devel] Skins
To: pkg-mediawiki-devel(a)lists.alioth.debian.org
Hi,
does anyone reading here have a quick reference for how to
convert a theme away from:
$this->html( 'headelement' );
In this case, I need to switch MonoBook back to $useHeadElement = false;
for adding the FF/Evolvis customisations.
Thanks in advance,
//mirabilos