Jump to content

Extension talk:ImportFreeImages

Add topic
From mediawiki.org
Latest comment: 14 years ago by Dullmau in topic fatal error: Class UploadFromURL

favorite extensions ever[edit]

Travis, this is one of my favorite extensions ever. Thank you so much. I hope I can find time to help streamline the selection process; it would be great to be able to use this extension with a gallery, whereby you

  • Have a gallery of images on a wiki, each of which has a categorized description page
  • Pass over the gallery looking for substitutes or similar images for each of those sets of categories/tags on flickr, giving the newly-uploaded file a name like "image2" where "image" was the name of the one being substituted

Use case: I could use this to populate, say, the Logos Children's Dictionary, which has great words but poor clipart images, with better images : scriptably upload each of the images, tagged by the word it is supposed to represent. Generate a gallery of these images, from the list of words. Run this extension over the gallery, creating a second gallery, titled "word2" for each word in the list. View the original and final galleries side by side, to make sure the selections were right, then replace the former with the latter.

Sj 22:44, 8 December 2006 (UTC)Reply

+1! A very neat extension.
And just a note for the curious ones who want to follow the thread on the mailing list later:

(Wikitech-l) ImportFreeImages Extension; Travis Derouin; Fri Dec 8 20:57:43 UTC 2006 --:Bdk: 00:59, 9 December 2006 (UTC)Reply

Corrected mailing list link. Dammit, why couldn't they put redirects! 22:59, 9 February 2007 (UTC)Reply

MediaWiki 1.12[edit]

In MediaWiki 1.12 UploadForm class has changed.

Quick fix to your extension:

In file "ImportFreeImages.php" change:

$u = new UploadForm($wgRequest);
$u->mUploadTempName = $name;
$u->mUploadSize = $size;
$u->mUploadDescription = $caption;
$u->mRemoveTempFile = true;
$u->mIgnoreWarning = true;
$u->mOname = $filename;
$t = Title::newFromText($filename, NS_IMAGE);


$u = new UploadForm($wgRequest);
$u->mTempPath = $name;
$u->mFileSize = $size;
$u->mComment = $caption;
$u->mSrcName = $filename;
$u->mRemoveTempFile = true;
$u->mIgnoreWarning = true;
$t = Title::newFromText($filename, NS_IMAGE);

Marooned (at) wikia.com -- 12:54, 4 December 2007 (UTC)Reply

I just committed a new version to SVN that fixes this issue (and a lot of other issues, among them some security problems). So anyone using MW 1.11+ should check out the new version (Note: I only tested the new extension code with the current MediaWiki SVN, so if it fails with 1.11, please report it here). --Tbleher 13:39, 17 February 2008 (UTC)Reply

Help! Every file get a name like this: Null-xxx.jpg[edit]


I'm the webmaster (not professional) of a new french educational project... a kind of wikipedia for pupils of the primary school.

I installed this NICE and very useful extension on my wiki and it works well... I set up the $wgIFI_PromptForFilename to true because images stored in our wiki need to have explicit names. The problem is that the Javascript prompt window never appears (actually just a few milliseconds) and every file get a name like this: Null-xxx.jpg

It would be very kind if someone could help. (Sorry for my poor english). -- 10:10, 16 April 2008 (UTC)Reply

The problem occurs on IE7 with default (!) security settings... this is really anoying! -- 22:29, 25 May 2008 (UTC)


Is there somewhere an example where we can test this extension? That would be very helpful in order to find out if it solves our current problem. My best, --Gollum 16:00, 18 May 2008 (UTC)Reply

Wikia is using this extension. --Dullmau 18:23, 9 June 2010 (UTC)Reply

Import does not work[edit]

When I try to import a picture I get teh maessage that the picture is empty.

"Die hochgeladene Datei ist leer. Der Grund kann ein Tippfehler im Dateinamen sein. Bitte kontrolliere, ob du die Datei wirklich hochladen willst."

"The uploaded file is empty. This might be due to a typing error in the file name. Please check whether you upload the file really want."


Set $wgIFI_FlickrAPIKey in LocalSettings.php?[edit]

It would be better to configure $wgIFI_FlickrAPIKey in LocalSettings.php, no? -Jlerner 12:31, 13 June 2008 (UTC)Reply

ImportFreeImages does not work properly with IE7[edit]

PromptForFilename option does not work with IE7 because of the following issue: http://www.hunlock.com/blogs/Working_around_IE7s_prompt_bug,_er_feature --> Files are renamed to "Null-xxxx.jpg".


This Extension works also with phpFlickr (http://phpflickr.com/2008/12/18/phpflickr-2301/) --DaSch 18:50, 21 February 2009 (UTC)Reply

fatal error: Class UploadFromURL[edit]

Hi this extension is so great that i don't want to miss it. After installation, I got an error like this. "Fatal error: Class 'UploadFromUrl' not found in UploadFreeImage.php on line 5 " Do anyone have any ideas? Thanks! --Dullmau 19:02, 9 June 2010 (UTC)Reply

problem solved. Wrong version downloaded. :P --Dullmau 19:02, 9 June 2010 (UTC)Reply