Lightbox Gallery Resource

Re: Lightbox Gallery Resource

by Paul Holden -
Number of replies: 7
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
I've updated the plugin following on from some of the discussions in this thread.

Version 1.1 allows you to paginate your galleries (for those with huge galleries to display), and users are now able to post comments to galleries. Both of these settings are configurable on a 'per-gallery' basis.

Lightbox gallery pagination and commenting

You can download from the following locations:
If you're upgrading from the previous version, please follow the upgrade instructions in the download.

Thanks to everyone for their comments and suggestions!
In reply to Paul Holden

Re: Lightbox Gallery Resource

by Phil Nichols -
This is good stuff.

However, having problems with comments. I enable it for a gallery, see no where to add a comment, and when I go back to the options for a gallery the comments option has been set back to no!

Any ideas?
In reply to Paul Holden

Re: Lightbox Gallery Resource

by Christoffer Aronsson -
Very very nice gallery. I just love the lightbox. However, nor the comments or pagination works for me. Just as the next poster said. Any ideas?
In reply to Christoffer Aronsson

Re: Lightbox Gallery Resource

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Phil & Christoffer,

Did you follow the upgrade instructions - i.e. copy over the new files and visit your admin/notification page? It sounds like your DB may not have been upgraded yet, can you check that the table prefix_lightboxgallery_comments exists?

You could check role permissions and make sure that your account type has been granted mod/lightboxgallery:addcomment and mod/lightboxgallery:viewcomments capabilities, but the first thing I'd check is that you've upgraded the module fully smile
In reply to Paul Holden

Re: Lightbox Gallery Resource

by Christoffer Aronsson -
Hey,

Thanks for the quick reply. Actually this is my first install - using the new version of the mod, and yes, the table is present in the db.

I'm running as site-admin so permissions should not be an issue - I've also dubblechecked that the different roles have the correct permissions.

Switching on PHP-debugging in Moodle I'm getting the following messages:

Just before the first pictures:
Notice: Undefined property: perpage in /var/www/moodle/mod/lightboxgallery/view.php on line 71

After all the pictures:
Notice: Undefined property: comments in /var/www/moodle/mod/lightboxgallery/view.php on line 94

Notice: Undefined property: comments in /var/www/moodle/mod/lightboxgallery/view.php on line 100

So, perhaps the problem resides in how my PHP has been setup. This is my first moodle-install on this server and Apache/PHP haven't been optimized for running moodle at all.

I could try setting up the gallery on our primary and development servers to see if it works on these.

(edit)
I just set up lightbox on our primary development server without any luck - same issues there. Let me know if you'd like to know what version, settings, php-modules etc. we're running. If that helps you in some way.
In reply to Christoffer Aronsson

Re: Lightbox Gallery Resource

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Christoffer, thanks for the debug info! - The problem is with missing fields in the install.xml file mixed

I've fixed this file and re-uploaded it (here), you'd have to uninstall the previous version and then install this one to get the database fix.

Alternatively, if you're comfortable working with your database directly you'll see the new fields in the install.xml file (perpage, comments - hence your 'Undefined properties') and can manually add them to the prefix_lightboxgallery table. They are defined in the xml schema as:
  • perpage: smallint(3)
  • comments: tinyint(1)
Both are UNSIGNED, NOT NULL and DEFAULT 0.
In reply to Paul Holden

Re: Lightbox Gallery Resource

by Anil Sharma -
Paul

This module is brilliant. Couple of feature requests :

1. Instead of just allowing the image thumbnails to be displayed inside a resource page, it should be possible to place them as a label in the main course area ...that would be simply great, the gallery module could then be used on the frontpage topic section also.

2. Teachers sometimes upload images of different sizes. If some of them are larger than the scree size, the close button gets hidden in the right bottom corner. Maybe there could be a cross on the left top corner too

3. If there could be a way of restricting the maximum size of image display, to say 1024 px , that would be even better.



In reply to Paul Holden

Re: Lightbox Gallery Resource

by Christoffer Aronsson -
Genious Paul, pure genious. I'll get to it right away.

Update: Works like a charm (now if I could only comment on each picture separately...hehe)

Spelndid work. I'm very much looking forward to seeing where this mod will go in the future.