Extension talk:BrowseImages

Error using groups with MW 1.12
I tried this extension with MW 1.12 with $wgBrowseImagesGroupMode = true, and I get errors on the first and last pages of the group, and 2 errors if the group only has 1 picture in it. The errors are on lines 47 and 49 of the browseimages.class.php, and the error is always "Undefined offset: 1". It looks like it is having trouble determining when to disable the 'previous' and 'next' tabs. Any ideas would be much appreciated. DdDave 17:20, 20 April 2009 (UTC)
 * I did some fixes to the code for the group mode. Please check if you still get errors now. Roberthaenel 07:18, 21 April 2009 (UTC)
 * The errors are gone. Thanks.  The only small bug is that the previous and next tabs are not being disabled.  By clicking the 'previous' tab on the first image or the 'next' tab on the last image the link goes back to the root wiki path without any page specified so it takes you back to the main page.  This extension is exactly what I was looking for, thanks for creating it. DdDave 13:16, 21 April 2009 (UTC)


 * I modified the code slightly to disable the correct tabs at the beginning and end of the group, and it seems to work on my MW1.12 installation. It's probably not the best or most efficient way, but it did the trick for me.  Here's a code snippet of the new contentActionsHook function from the BrowseImages.class.php file.  I added a new if statement.

DdDave 15:22, 22 April 2009 (UTC)
 * Great that it works for you now! You could also evaluate the 'class' attribute of the link via CSS to hide the next/prev links. As you can see in the code (2 lines before your if statement) the list element containing the link gets the class 'inactive' when it's not defined (=there is no previous or next image). I use something like this in my stylesheet for example:

display: none; } Roberthaenel 19:50, 25 April 2009 (UTC)
 * 1) ca-previmg.inactive, #ca-nextimg.inactive {