hi,
I already managed to post into mediawiki with your help. Now I've got the problem, that I also should upload images this way.
Is there a possibility to do this? The MediaWiki manual says that you have to be logged in to be able to upload images. Is there a way to do this with a bot who isn't logged in?
Thanks for your information.
-Johannes
On 04/09/07, Johannes Perl johannes.perl@gmail.com wrote:
hi,
I already managed to post into mediawiki with your help. Now I've got the problem, that I also should upload images this way.
Is there a possibility to do this? The MediaWiki manual says that you have to be logged in to be able to upload images. Is there a way to do this with a bot who isn't logged in?
No.
The reason we require a logged-in user to perform uploads is historical; it was done as a measure to prevent drive-by mass-uploading of crap, copyright-infringing images to the various Wikipedias.
I don't see any reason any other site would want this restriction removed, to be honest. If you're using a bot to upload images, make sure it uses a properly-flagged bot account, and grant bots the right to upload.
Rob Church
Johannes Perl wrote:
hi,
I already managed to post into mediawiki with your help. Now I've got the problem, that I also should upload images this way.
Is there a possibility to do this? The MediaWiki manual says that you have to be logged in to be able to upload images. Is there a way to do this with a bot who isn't logged in?
Thanks for your information.
-Johannes
a) Make the bot to log in. b) Alllow everybody to upload images anonymous. $wgGroupPermissions['*' ]['upload'] = true;
On 04/09/07, Platonides Platonides@gmail.com wrote:
b) Alllow everybody to upload images anonymous. $wgGroupPermissions['*' ]['upload'] = true;
This won't work; the upload form is hard-coded to require a logged-in user.
Rob Church
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Rob Church wrote:
On 04/09/07, Platonides Platonides@gmail.com wrote:
b) Alllow everybody to upload images anonymous. $wgGroupPermissions['*' ]['upload'] = true;
This won't work; the upload form is hard-coded to require a logged-in user.
How do you figure?
if( !$wgUser->isAllowed( 'upload' ) ) { if( !$wgUser->isLoggedIn() ) { $wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' ); } else { $wgOut->permissionRequired( 'upload' ); } return; }
are the relevant lines. It would appear that if the user has the upload right it will never check if the user is logged in or not. Is there something I'm missing?
- -- Daniel Cannon (AmiDaniel)
http://amidaniel.com cannon.danielc@gmail.com
On 04/09/07, Daniel Cannon cannon.danielc@gmail.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Rob Church wrote:
On 04/09/07, Platonides Platonides@gmail.com wrote:
b) Alllow everybody to upload images anonymous. $wgGroupPermissions['*' ]['upload'] = true;
This won't work; the upload form is hard-coded to require a logged-in user.
How do you figure?
if( !$wgUser->isAllowed( 'upload' ) ) { if( !$wgUser->isLoggedIn() ) { $wgOut->showErrorPage( 'uploadnologin',
'uploadnologintext' ); } else { $wgOut->permissionRequired( 'upload' ); } return; }
are the relevant lines. It would appear that if the user has the upload right it will never check if the user is logged in or not. Is there something I'm missing?
That must have been changed somewhat recently, then.
Incidentally, if a user who isn't logged in does have upload rights, there may be issues with the upload log, since the logging table doesn't have a log_user_text counterpart to store the IP address.
Rob Church
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Rob Church wrote:
That must have been changed somewhat recently, then.
Incidentally, if a user who isn't logged in does have upload rights, there may be issues with the upload log, since the logging table doesn't have a log_user_text counterpart to store the IP address.
Indeed :) I had some fun with that a while ago -- it may be a good idea to add a "log_user_text" field, as many extensions (and, in fact, some configurations such as allowing anons to upload) could benefit from the ability to log anonymous actions. It is rather inconsistent to have that field in recentchanges but not in logging -- the result is that the logging entry will appear with an IP addy at Special:Recentchanges but not at Special:Log.
- -- Daniel Cannon (AmiDaniel)
http://amidaniel.com cannon.danielc@gmail.com
mediawiki-l@lists.wikimedia.org