Extension talk:User Image Gallery

From mediawiki.org
Latest comment: 8 years ago by Filyg in topic Show latest pictures

README[edit]

If I try to get to the README, it gives this page:

Not Found The requested URL /svnroot/mediawiki/trunk/extensions/UserImages/UserImages was not found on this server.

seems like some broken link. Also I can't find any other documentation about this extension.

There isn't a a readme file in Subversion, which is something I'll correct when I get round to it (no SSH access at the moment). I've removed the misleading link and beefed up the installation and general usage instructions on the page itself. robchurch | talk 16:27, 22 April 2007 (UTC)Reply

Great Extension! But image is colorless.[edit]

I copied and pasted each .php files into my code editor (I use Adobe GoLive CS2) and saved them into my wiki's extension directory.
I added the codes given in the article to my confirguration file.
I added the <userimages user="my_user_name" /> to my page.
It works great!
However, the images are in gray scale. Is there any way I can change back to its original color?


Thanks for your help in advance. --Kohyin 06:24, 30 January 2007 (UTC)Reply

To be honest, I don't know why this would be happening up front. Do other image galleries, e.g. Special:Newimages on your wiki produce grayscale images? It sounds very much like the thumbnailer is producing bad output. robchurch | talk 16:27, 22 April 2007 (UTC)Reply

Fatal error[edit]

When I try to use the extension I get the following

Fatal error: Call to undefined method Title::getName() in /w/includes/ImageGallery.php on line 94


Using Russian UserNames =>

Fatal error: Call to undefined method Title::getName() in /includes/ImageGallery.php on line 135

MW ver.1.10.0

w:ru:User:Вячеслав 17:13, 10 July 2007 (UTC)

Image limit[edit]

I'd like to see the number of images unlimted rather than capped at 50. This would be very useful for my wiki. 74.233.86.196 05:10, 14 October 2007 (UTC)Reply

Fatal Error[edit]

Same as above - ENGLISH Usernames...can you help?

[16-Oct-2007 21:39:38] PHP Fatal error:  Call to undefined method Title::getName() in /Volumes/MerlinRAID/htdocs/includes/ImageGallery.php on line 135
[16-Oct-2007 21:39:55] PHP Notice:  Undefined index:  SelectCategoryList in /Volumes/MerlinRAID/htdocs/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
[16-Oct-2007 21:39:55] PHP Warning:  Invalid argument supplied for foreach() in /Volumes/MerlinRAID/htdocs/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
[16-Oct-2007 22:36:15] PHP Notice:  Undefined index:  SelectCategoryList in /Volumes/MerlinRAID/htdocs/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
[16-Oct-2007 22:36:15] PHP Warning:  Invalid argument supplied for foreach() in /Volumes/MerlinRAID/htdocs/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
[16-Oct-2007 22:36:51] PHP Notice:  Undefined index:  SelectCategoryList in /Volumes/MerlinRAID/htdocs/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
[16-Oct-2007 22:36:51] PHP Warning:  Invalid argument supplied for foreach() in /Volumes/MerlinRAID/htdocs/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
[16-Oct-2007 22:37:32] PHP Notice:  Undefined index:  SelectCategoryList in /Volumes/MerlinRAID/htdocs/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
[16-Oct-2007 22:37:32] PHP Warning:  Invalid argument supplied for foreach() in /Volumes/MerlinRAID/htdocs/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
[16-Oct-2007 22:47:13] PHP Fatal error:  Call to undefined method Title::getName() in /Volumes/MerlinRAID/htdocs/includes/ImageGallery.php on line 135
[16-Oct-2007 22:48:45] PHP Fatal error:  Call to undefined method Title::getName() in /Volumes/MerlinRAID/htdocs/includes/ImageGallery.php on line 135
[16-Oct-2007 22:50:45] PHP Fatal error:  Call to undefined method Title::getName() in /Volumes/MerlinRAID/htdocs/includes/ImageGallery.php on line 135

Order by DESC[edit]

To order by DESC, (the latest images on top) you have to modify a line in private function getImages()

$res = $dbr->select( 'image', '*', array( 'img_user' => $this->user->getId() ), __METHOD__, array( 'ORDER BY' => 'img_timestamp DESC' , 'LIMIT' => $this->limit ) );

introduce DESC after 'img_timestamp'

CURRENTUSER[edit]

I would really like to be able to do something like this:

<userimages user="{{CURRENTUSER}}" />

So logged-in users could all go to one page to see their uploaded photos, (without having to know the markup).

Hi my answer to this problem is to use this extension like so:

{{#tag:userimages ||user={{PAGENAME}} }}

The #tag function let's you use the extension with variables, and magic words therefore making it possible to use in a template. See Help:Magic words.

However there is no magic word {{CURRENTUSER}}. You can add via it from the extension: Extension:MyVariables or you could define it via Extension:Variables within a page. Additionally Semantic Forms has the ability to allow one to add current user in a field in the form (see Extension:Semantic Forms)

Christharp (talk) 18:50, 16 June 2013 (UTC)Reply

Show latest pictures[edit]

Why it doesn't show up the latest pictures but the first pictures uploaded? I can only see for my uploaded pictures the first ones I uploaded months ago, I would like to see the latest ones.

The anwser is on the top of the page Order by DESC --Filyg (talk) 15:52, 15 April 2015 (UTC)Reply

Fix for MediaWiki 1.19.0[edit]

I get this warning and the gallery doesn't display

PHP Warning:  Parameter 3 to efUserImagesRender() expected to be a reference, value given in */includes/parser/Parser.php on line 3736

My fix: Replace the efUserImagesRender function in the file UserImages.php (line 55 - 61) with

function efUserImagesRender( $text, $argv, $parser ) {
	global $wgUserImagesNoCache;
	if( $wgUserImagesNoCache )
		$parser->disableCache();
	$uig = new UserImagesGallery( $argv, $parser );
	return $uig->render();
}

and replace class construct in UserImages.class.php (line 39-43)

public function __construct( $argv, $parser ) {
		$this->parser = $parser;
		$this->loadOptions( $argv );
		$this->setUser( $argv );
}

Freggern (talk) 19:08, 3 May 2012 (UTC)Reply