Lovely module, thank you this is exactly what I was looking for.

Just to add to the module it would be very handy to have a config screen in the drupal backend to set things like no full screen option to false. I'm aware these can be set manually on http://www.juicebox.net/support/config_options/ but adding a select few options in the backend to do this would be a nice little addition.

Comments

rjacobs’s picture

Hi kingfisher64

Thanks for the suggestion. I had actually thought about doing something like this initially but was not really sure which Juicebox options would warrant a "promotion" to clickable status within the admin options. There are of course an abundance of options, and matters are further complicated by the fact that many options are only available to "Pro" users. Depending on which options would be exposed there could also be some validation rules at play (for anything that's not just a check-box style switch).

Which options do you think would be most useful to expose directly in the module conf options? Just the "Lite" options like "showOpenButton", "showExpandButton" and "showThumbsButton", or a more extensive selection?

kingfisher64’s picture

As I was writing that I was thinking what buttons would be put in first.

How about the three that show up in the top right hand side of the main image to start off? They would be the 3 you suggested in say a tab style dropdown for "lite configuration options".

For the pro, goodness me there's an abundance of options that could do in there. I suppose over time the pro options could be done category by category as they are shown on the website. So that would be "general, color, main image" etc etc.

rjacobs’s picture

The addition of point-and-click options for some of the "Lite" configuration settings could certainly be a nice added convenience for some users of this module. However, I'm thinking it might be best to exclude any "Pro" options if doing this. I say this as:

  1. I'm not sure just how many users have a Pro license, but my guess is they are a minority. So seeing heaps pro options available could be distracting for the average module user.
  2. There are soooo many Pro options, and I'm worried they could even change with various versions of the Juicebox library. Keeping track of this within a 3rd party module like this one could be pretty tricky.
  3. Any pro option can still be set manually by specifying the setting in optionName = "optionValue" format within the advanced module settings. Certainly not point-and-click, but still doable.

On a related note, it looks like there is a Wordpress plugin out there that integrates with Juicebox, and, just as we are discussing here, offers some point-and-click "Lite" settings directly in its interface. However it also does not offer any point-and-click Pro settings. Instead it allows manual configuration of "Pro" settings in generic optionName = "optionValue" format, as we do. See http://juicebox.net/blog/wp-content/uploads/2012/07/wp-juicebox.gif for an image of the options.

Given that I think the Wordpress plugin was developed directly by the same people that make the Juicebox javescript library itself, this may be a good guide to follow.

kingfisher64’s picture

Sounds like a solid path to take. Good stuff. It's almost overwhelming the amount of pro options. Like you said if these chop and change...

Thanks for considering the lite config idea.

rjacobs’s picture

Title: Add backend controls » Add backend GUI controls for some Juicebox library config options

Hummm, so if adding some additional GUI controls I think it would also make sense to re-organize some of the fieldsets on the admin forms. For example it would be nice to have a separate fieldset just for the specific Juicebox library options - in order keep them separate from all the other options (both logically and visually). Without doing this I think the admin screens would get a bit too daunting (they are already pretty full).

The trick is that changing fieldset structures will probably also require an update method (called by update.php) to ensure that existing users' gallery settings don't get lost. This is required as the display settings are stored in the DB in the same hierarchical structure as they are presented in the form. So changing the form structure also requires changing the ways some existing values are stored in the database. This update method might be a little complex to put together, and will need to be pretty well tested.

I just mention this as it probably means that all this is a bit trickier than meets the eye. Either way, I still think it's a decent idea.

rjacobs’s picture

I haven't forgotten about this, I'm just needing to find the time to address all the moving parts required to do this the right way. Please stay tuned as I'll very much appreciate having at least one tester/commenter once a patch is ready.

rjacobs’s picture

Status: Active » Needs review
StatusFileSize
new33.13 KB

Ok, a patch is attached that adds some additional GUI config options and also re-factors some of the module's display settings handling. Please note that I'll feel much more comfortable committing this if there's at least one willing tester out there (kingfisher64?).

To test:

  1. Before installing the patch make sure you have some Juicebox galleries in place and that they have some custom configuration options applied to them (custom width/height, custom manual Juicebox config options, etc). Ideally you would have both a field formatter and view setup, but I understand if that's not possible.
  2. Apply the patch. It should apply fine against anything later than 7.x-1.x-beta2. You should not have to clear any caches, but I suppose doing so would not hurt.
  3. Navigate to your galleries and make sure they render correctly.
  4. Navigate to your gallery settings interfaces (in the admin pages) and make sure that all of your custom settings are in place in the right fields, etc. This is also where you can make some comments on the revised admin form and new conf options, and test them out as well.
  5. Do something real nice for yourself for being so helpful, seriously.

The task of adding some conf options to the admin GUI was nothing all that major, but once I stared to dig into it I realized that there were 2 rather significant tangent issues that needed to be addressed, specifically:

  1. I needed a way to ensure that any structural changes to the storage of display settings would be backwards compatible with older versions of this module (i.e. make sure galleries setup with versions <= 7.x-1.x-beta2 would still work alright). This actually led to an interesting discussion with merlinofchaos, who is the lead on the views and ctools modules.
  2. I noticed that there was lots of room for consolidation and cleanup regarding the way display settings were managed/stored by this module. This cleanup should make things easier to manage in the future if additional changes like this become a priority.

The end results is a pretty big patch, but hopefully some solid improvements "under the hood" (in addition to some since admin GUI additions).

All comments very much appreciated going forward!

rjacobs’s picture

Status: Needs review » Fixed

I did some more testing on this from my end and went ahead with a commit:

http://drupalcode.org/project/juicebox.git/commit/528d956

This change touches quite a functions/methods so it's going to be a lot easier to tackle future issues with this commit out of the way. I'm still going to do some additional testing on this before the next release though, and if anyone else is still willing to test please just try-out the most recent dev version.

kingfisher64’s picture

Sorry rjacobs i've not had the time to test things the last couple of weeks. Hopefully will do from late next week onwards. My apologies, I'd very much like to help test the module.

rjacobs’s picture

Thanks for the note kingfisher. There are a number of useful fixes and features captured in recent commits (including this one) that I'm hoping to push into a release quite soon, perhaps as early as the end of this week. If you are able to take a look by then, any comments are hugely appreciated. To test you should be able to just "drop-in" the most recent dev version. Even if that's not possible, any ongoing thoughts about the module config options will always be valuable.

Cheers

rjacobs’s picture

Also note that anyone interested in this issue will also be interested in: #1978270: Add configuration options for Juicebox library v1.3.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.