Hi,
how can I delete old versions of articles in my mediawiki
installation? I know that I can delete all versions and restore the
latest. But I have to to this on about 500 articles.
greetings
Juergen
I filed a bugzilla report on the problem I reported on this mailing list on Fri Feb 3
http://bugzilla.wikimedia.org/show_bug.cgi?id=4918
There is a fix for that available. Here is an rcsdiff -w UserMailer.php
for the suggested fix (base64 encoded so the mailinglist does not wrap/corrupt it)
UkNTIGZpbGU6IFJDUy9Vc2VyTWFpbGVyLnBocCx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4xCmRp
ZmYgLXcgLXIxLjEgVXNlck1haWxlci5waHAKMjA3LDIwOGMyMDcsMjEwCjwgCQkJCQlpZiAoICgg
JGVub3RpZndhdGNobGlzdHBhZ2UgJiYgJHdhdGNoaW5nVXNlci0+Z2V0T3B0aW9uKCdlbm90aWZ3
YXRjaGxpc3RwYWdlcycpICkgfHwKPCAJCQkJCQkoICRlbm90aWZ1c2VydGFsa3BhZ2UgJiYgJHdh
dGNoaW5nVXNlci0+Z2V0T3B0aW9uKCdlbm90aWZ1c2VydGFsa3BhZ2VzJykgKQotLS0KPiAJCQkJ
CSMgc2FzZGpiIDA4RmViMDYgcGF0Y2hlZCBhcyBwZXIgaHR0cDovL2J1Z3ppbGxhLndpa2ltZWRp
YS5vcmcvc2hvd19idWcuY2dpP2lkPTQ5MTgKPiAJCQkJCSMgU2VlIGFsc28gaHR0cDovL2N2cy5i
ZXJsaW9zLmRlL2NnaS1iaW4vdmlld2N2cy5jZ2kvZW5vdGlmd2lraS9lbm90aWZ3aWtpL2luY2x1
ZGVzL1VzZXJNYWlsZXIucGhwP2Fubm90YXRlPTEuMTAKPiAJCQkJCWlmICggKCAoICRlbm90aWZ3
YXRjaGxpc3RwYWdlICYmICR3YXRjaGluZ1VzZXItPmdldE9wdGlvbignZW5vdGlmd2F0Y2hsaXN0
cGFnZXMnKSApIHx8Cj4gCQkJCQkJKCAkZW5vdGlmdXNlcnRhbGtwYWdlICYmICR3YXRjaGluZ1Vz
ZXItPmdldE9wdGlvbignZW5vdGlmdXNlcnRhbGtwYWdlcycpICkgKQo=
--
David J. Biesack SAS Institute Inc.
(919) 531-7771 SAS Campus Drive
http://www.sas.com Cary, NC 27513
Hi
I am trying to create a program to automate the transfer of users from
an existing forum into my wiki.
As far as I can see I could get away with adding the following to the
users table
username
e-mail address
password (the list is password protected)
I ma not a php programmer so I thought ity might be easier to do this
in C++ and gave written the basic elements to do the above.
The problem comes when adding the password. As far as I can see
mediaWiki expects a salted hash of the hash of a password, the salt is
the userID. i.e. if I create a user who has a random password (say
123abc) and a userID of say 357 then I would do the following
Create a random password (123abc)
Hash it
prepend the user ID and a dash(-), so we would have, some thing like
357-abc343acde... etc.
We then hash this string again, giving the final hash
When I do this on a test case I do not get a matching hash - what am I
doing wrong?
Hello,
I've got a little problem with disabling read and new user
registrations in LocalSettings.php - I've got the following settings
from Meta (http://meta.wikimedia.org/wiki/Help:User_rights):
$wgShowIPinHeader = false; # For non-logged in users
$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-",
"MediaWiki:Monobook.css" );
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
What I expected to happen was, that...
- new user registrations shouldn't be possible
- no one except the sysops can read/edit the Wiki (including talk pages)
I'm not sure whether this would also include Google et al not indexing
the pages, but that'd be another thing I'd like to have for now.
Unfortunately the result is, that I can't log in anymore (via
Special:UserLogin).
Any ideas? :)
Thanks in advance,
Thomas Tschoellitsch
OK, so I have this wiki:
http://chez-vrolet.net/octawiki
...but, if I try to direct to this using http://octa.chez-vrolet.net, I
get...well, undesirable results - namely, a 404.
Changing $wgScriptPath to "/" will get the text only version of the
main page, but little else, and the login URL will direct to something
like "http://login.php/morestuffhere".
Since the former URL works just fine, I'm leaving it as is for now, but
if I intend to move this to the latter URL, what do I need to alter to
get it to behave correctly?
Thanks,
-Dennis Carr
Is there any patch or configuration to place uploaded files inside
different directories depending on file extension?
Something like:
all PDF in /wiki/pdf
all DOC in /wiki/DOC
and so on.
Best Regards,
Tafas
Hi,
I just installed the MediaWiki in my website. Everything works fine.
However, I found that the Help:Contents is empty.
Is there a way to easily install all Help Documentation with this mediawiki
installation?
This will be quite useful for the user of my wiki. Because a lot of them can
not access the mediawiki offical website to read the help. (MediaWiki is
blocked in some countries).
Thanks very much.
I have a little wiki set up on a home server that is connected to a
typical consumer ISP account. Lots of smtp servers reject mail that
comes straight from this server, so I usually set things up to mail
through another smtp server I have smtp-auth access to.
I found this page:
http://mail.wikipedia.org/pipermail/mediawiki-cvs/2004-February/000414.html
which explains that I can set up $wgSMTP as an array, like so:
$wgSMTP = array ( "host" => "smtp.wherever.com",
"IDHost" => "mail.wikipedia.org",
"port" => "25",
"auth" => true,
"username" => "mailID",
"password" => "mailPswd");
(example only; I used real values for my setup) and then
UserMailer.php should send via the server that I specify.
Wherever I set $wgSMTP (I tried LocalSettings.php,
DefaultSettings.php, and in the function itself in UserMail.php--I
realize they should all have the same effect and that LocalSettings is
preferred), mail seems to break. For example, when I try to mail
myself my password on the login/create account page, I just get a
blank page (after clicking the "mail me a new password" button) and no
mail ever arrives.
Any thoughts? Where can I look for errors, etc., or how else can I test easily?
Thanks,
Matt
Don't expect too much from a guide for dummies made by a dummy.
For windows.
About the captcha.py generator.
TABLE OF CONTENT
- what it does ?
- where to find it ?
- how it works ?
- The image generator
- "No module named image" error
- "empty range" error
- credits
1) WHAT IT DOES ?
The captcha system written by Brion Vibber and published under GNU
licence (unlike most of the captcha system to be found in php on the net
which are copyrighted) doesn't build the captcha images on the fly.
Instead, you have to produce a bunch of images.
The generator take a word in a wordlist.
Creates an image with the word on it.
It encrypts the word using a key.
Stores the image in a directory, with the encrypted as filename (png image)
2)WHERE TO FIND IT ?
in the ConfirmEdit extension:
http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/ConfirmEdit/
(for the html access)
http://www.mediawiki.org/wiki/Download_from_CVS
(for indications on the cvs access, I intend to create a tutorial on
using CVS with Eclipse)
Download the three files:
ConfirmEdit.php
FancyCaptcha.php
captcha.py
3)HOW IT WORKS ?
(only as much as I understand)
Apart from the explanations provided in the php files itself, you can
find some indications in the post from Brion:
http://article.gmane.org/gmane.org.wikimedia.mediawiki/10179/match=fancycap…
Mainly, you have to fill some of the variables in the fancycaptha.php
file, with :
$wgCaptchaClass = 'SimpleCaptcha'
becomes
$wgCaptchaClass = 'FancyCaptcha';
$wgCaptchaDirectory the directory where the images are stored at your
webhost (NO EXAMPLE yet)
$wgCaptchaSecret by the key used to encrypt the words of your list
ex:
$wgCaptchaSecret='turtle';
4)THE IMAGE GENERATOR
The file captcha.py is a file written in python to produce the images,
encrypt them and store them with the encrypted filename.
As it is written in python, you will need a python interpreter. You
might already have one installed with some Apache-Mysql-php kits. Check
your Apache folder, and your c:\ folder. Search your computer for the
file python.exe
If not found, download and install a brand new one from:
http://www.python.org/download/
You might use this opportunity to get a newer one if yours is too old,
because we will have to add some "plugin" which can't use python
versions prior to 2.1
The command line I used is (can be used as .bat):
c:\python24\python.exe C:\pytest\captcha.py --wordlist C:\pytest\w.txt
--output C:\pytest\ --key turtle --count 10 --fill 2 --font Arial
Where:
c:\python24\python.exe is the newer interpreter I installed (there is an
older one attached to my apache, and if I just call python.exe on
command line, the old one comes up. To check which one you are using,
type: python -v )
C:\pytest\captcha.py is the path to the captcha.py file I downloaded
from the ConfirmEdit extension. As you can notice, to avoid problems
with space in windows paths like "my document", I created a filed called
"pytest" (less than 8 letters) directly at the root of my system.
--wordlist C:\pytest\w.txt is the path to a text file I created with a
list of words. Each word on a line, which means: I type a word, and I
hit Enter. On my first attempt, I created only five of them. This might
be too short. Use a longer list: 10 to 20
--output C:\pytest\ path to the directory I want the images to be
stored. Not sure if the ending \ is necessary. It worked with it.
--key turtle this is the key used to encrypt the words. It has to be
the same as the $wgCaptchaSecret variable in the fancycaptcha.php file,
otherwise it won't be able to decrypt it. Just use a secret word: be
creative.
--count 10 really, I haven't got a clue what it is, and how it must be
set up. I tried 3, it didn't work. Hopefully, someone will tell us if
there is a minimum and a max for this
--fill 2 same as before, no idea what it is for and what the inferior
and superior limits are
--font Arial At first I didn't use this parameter. I tried this, and
maybe it helped this working...
5) NO MODULE NAMED IMAGE error
At first, you might get this error:
Traceback (most recent call last):
File "C:\pytest\captcha.py", line 26, in ?
import Image
ImportError: No module named Image
DIAGNOSIS: you don't have the image module, which can be found in a
library for python.
SOLUTION
Download and install PIL from the middle of this page:
http://www.pythonware.com/products/pil/
Beware, you have to choose the PIL corresponding to your version of python
6) EMPTY RANGE error
After you have installed the PIL, something can again be wrong:
Traceback (most recent call last):
File "C:\pytest\captcha.py", line 145, in ?
word1 = words[random.randint(0,len(words)-1)]
File "c:\python24\lib\random.py", line 216, in randint
return self.randrange(a, b+1)
File "c:\python24\lib\random.py", line 192, in randrange
raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart,
, width)
ValueError: empty range for randrange() (0,0, 0)
As long as I tried, I believe this is due to an error in the --fill or
--count parameters of the command line.
And in the end: IT WORKED FOR ME
image_e920d182_6ea824a00198ed4f.png
image_b18fd5f0_bb1e8e848697c902.png
image_0206469a_889d0b2dab698f4d.png
image_d360bf03_ab8400fd4dfc4b9d.png
image_7ae15d3e_aca3a3ea9d4c36a4.png
image_ccc4294b_e9db09ebf2dd58d7.png
image_b00e56fb_bd1657b6488424dc.png
7) CREDITS
Thank you very much to Brion Vibber for developing extensions for
"advanced dummies" like me, only able of rewarding him by grinning about
having to understand python and finding out by themselves what on earth
the parameters for command line might be. Ingratitude has no depth :-)
Hope this will help. please do tell me what is missing. Hopefully, there
will soon be a page created in mediawiki for this extension (no search
on meta.mediawiki came up with something like fancycaptha). As soon as
the creator puts it on, I might add this participation to it. Be free to
add what I omitted, and correct where I was wrong or unclear.
François
I was looking at our site statistics but I was surprised with the result.
Its says:
---
There are *1,542,401* total pages in the database. This includes "talk"
pages, pages about Wikology, minimal "stub" pages, redirects, and others
that probably don't qualify as content pages. Excluding those, there are *
18,446,744,073,709,551,615* pages that are probably legitimate content
pages.
There have been a total of *26,075* page views, and *592* page edits since
the wiki was setup. That comes to *0.00* average edits per page, and
*44.05*views per edit.
---
The total pages is quite accurate but I wonder where
*18,446,744,073,709,551,615
*came? I tried to look at the codes and google but i cant find any
explanation of such huge number. Can anyone tell me?