Image Gallery Plugin


(Corey Robertson) #1

I took a stab at creating a plugin that can organize a bunch of images into somewhat of a gallery. See a screenshot of it in action here: Screenshot here:

http://imgur.com/SltBEKN

This doesn’t handle displaying images in lightboxes, instead it wraps the existing Discourse lightboxing that occurs on images.

You can customize the size the images get scaled down to.

Usage is like this:

[image-gallery]
 <img src="whatever" />
 <img src="whatever" />
[/image-gallery]

Repo is here: GitHub - crob611/discourse-image-gallery: Image gallery plugin for Discourse


Thumbnails of images in topics list
Is carousel possible in a post
Image previewer: navigation
DEPRECATED: Discourse masonry gallery theme component
Importing old vb(s) into Discourse
(Michael - DiscourseHosting.com) #2

Nice! Added to the list!


(Loren Baum) #3

@crob611, cool plugin, can you provide a link where I could see it in action?


(Corey Robertson) #4

@Mahamsamatan Unfortunately, I don’t have it running anywhere. Sorry.


(Dan Porter) #5

There is a minor detail that I would like to see fixed - on any forum you cannot quote the tags to give rise to a description, for example:

On my forum, a line containing code quoted [image-gallery][/image-gallery] will process these words/tags wherever they are written, unlike the [spoiler] plugin.


#6

Does this work on the latest version of Discourse? I tried to install it on my development version of Discourse, I can’t get it to work. When the tags are used on a new post, I can’t save it as it gives me “Internal Server Error 500”. I will include the production.log error message as soon as possible as I can get to my devbox.

EDIT: added error message from production.log:

Started POST "/posts" for "IP-ADDRESS" at 2015-01-13 21:06:42 +0000
Processing by PostsController#create as */*
  Parameters: {"raw"=>"[image-gallery]\n<img src=\"/uploads/default/17/02c9eeb0ca7f57e9.png\">\n<img src=\"/uploads/default/10/d2d06cb573f66f29.jpg\">\n<img src=\"/uploads/default/18/6033609447a3dc8c.jpg\">\n[/image-gallery]", "title"=>"testiaaanaskffgbkvb", "is_warning"=>"false", "archetype"=>"regular"}
Completed 500 Internal Server Error in 81ms

PrettyText::JavaScriptError (Object [/image-gallery] has no method 'exec'):
  lib/pretty_text.rb:165:in `block in markdown'
  lib/pretty_text.rb:330:in `block in protect'
  lib/pretty_text.rb:328:in `synchronize'
  lib/pretty_text.rb:328:in `protect'
  lib/pretty_text.rb:146:in `markdown'
  lib/pretty_text.rb:198:in `cook'
  app/models/post_analyzer.rb:12:in `cook'
  app/models/post_analyzer.rb:104:in `cooked_document'
  app/models/post_analyzer.rb:49:in `raw_mentions'
  app/models/post.rb:154:in `block (2 levels) in <class:Post>'
  lib/validators/post_validator.rb:40:in `max_mention_validator'
  lib/validators/post_validator.rb:10:in `validate'
  lib/post_creator.rb:258:in `save_post'
  lib/post_creator.rb:81:in `block in create'
  lib/post_creator.rb:140:in `call'
  lib/post_creator.rb:140:in `block in transaction'
  lib/post_creator.rb:138:in `transaction'
  lib/post_creator.rb:76:in `create'
  app/controllers/posts_controller.rb:80:in `create_post'
  app/controllers/posts_controller.rb:65:in `create'
  lib/middleware/anonymous_cache.rb:119:in `call'
  config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
  config/initializers/silence_logger.rb:26:in `call'
  lib/middleware/unicorn_oobgc.rb:95:in `process_client'

Any working image gallery plugin?
Is carousel possible in a post
(OvermindDL1) #7

Same thing, dead I guess?

Are old no-longer-working plugins going to be trimmed from this section to a ‘old’ section or so?


(Mittineague) #8

I’d too would be interested in this.
Got a github link you can post or M me? :wink:


(Sam Saffron) #9

Reply on any broken plugins, if author has abandoned we will close or move out of plugin category


Install a Plugin
(Fábio Machado De Oliveira) #15

It’s broken for me too, and last commit was feb, 2014


(Sam Saffron) #16

np, moved to broken plugins for now. @crob611 let me know if you fix it.


(Corey Robertson) #17

Sorry all for not keeping this updated. I’ll be glad to get it updated when I get a chance, or merge any pull requests if someone else wants to fix it. Would love to get back into making some other Discourse plugins.


(Chasovoy85) #19

i fix


(Erlend Sogge Heggen) #20

Nice. You should make a pull request to @crob611’s original repo.


(Chasovoy85) #21

I’m a novice in GitHub… but I’ll try


(Erlend Sogge Heggen) #22

Just click here :wink:


(Chasovoy85) #23

Thanks. Done :slight_smile:


(Erlend Sogge Heggen) #24

Great. If you don’t hear from @crob611 in a week or so we can point to your fork instead of the defunct repo and move this out of #plugin:broken-plugin, provided someone else confirm that it’s working!


(Chasovoy85) #25

Cool. Thanks! :grinning:


(Corey Robertson) #26

I can merge it in, but I’m not setup to test to make sure it’s working or anything. I’d also be glad to transfer the repo if someone else would like to maintain it going forward. @chasovoy85?