As mentioned in the READEME.txt under missing features from d6, there is no settings page. Would be nice to have at least the options set in galleria.load.js to be configurable.

CommentFileSizeAuthor
#1 galeria-settings-form-1105296-1.patch11.01 KBosopolar
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

osopolar’s picture

I added the settings form. I created a new on (not ported from the d6 Version). The texts for the descriptions I took from the galleria website.

I also use the patch found in #8 on #1082882: Public/private paths and using the image styles, but it is not included in this patch, and not required. The patch will apply anyway (just with an small offset).

The patch affects the following files.
galleria.admin.inc, galleria.info, galleria.install, galleria.module, js/galleria.load.js

Apply: patch -p1 < galeria-settings-form-1105296-1.patch

gopherspidey’s picture

Do we want this to be a site global? Or would this be better at the field display level?

osopolar’s picture

I guess it would be better at the field display level ... or the best would be to set a default and be able to overwrite it on the node/views field display level.

I think this would be the first step and later we may add the rest, if there is a request for it.

gopherspidey’s picture

Status: Active » Needs work

Sounds like a plan to me. Here is a review of the patch.

1. There is reference to colorbox.admin.inc in the patch. It should be changed to galleria.admin.inc

diff -Naur -x'*.DS_Store' -x'*.patch' galleria-orig/galleria.info galleria-new/galleria.info
--- galleria-orig/galleria.info	2011-03-25 13:50:45.000000000 +0100
+++ galleria-new/galleria.info	2011-03-24 22:27:10.000000000 +0100
@@ -2,9 +2,12 @@
 description = Turns image fields of nodes into Galleria galleries with this javascript (JQ) image gallery.
 core = 7.x
 package = "JQuery"
+configure = admin/config/media/galleria
 
 dependencies[] = image
+
 files[] = galleria.module
+files[] = colorbox.admin.inc

2. There seems to be some minor spacing/alignment issues in the drupal_add_js. See http://drupal.org/coding-standards

Things I think we should add
1. Let's add height to the settings, then we can remove the container.css file. The main reason for that file was to set the height.
2. Let's also add an entry for changing the theme. I have the start of the code for the theme in #1132370: Javascript aggregation breaks. It fixes the ag issue, but it also uses a javascript setting.

osopolar’s picture

Title: No settings page » Add galleria settings page

Changed title to find the issue later in the posts track.

s_leu’s picture

Thanks for the patch osopolar, I applied it on my local repository. Looks good so far, besides the colorbox.admin.inc bug as gopherspidey mentioned above.

I took gopherspidey's "should adds list" in account as well. The height and width are now configurable on the admin configuration page. The container.css file cannot be removed though, since the galleria JS isn't able to render properly without it (JS Error which I didn't track down so far).

The possibility to change the theme is also implemented, but it's not on the global settings page. It can be configured at the display formatter settings form.

s_leu’s picture

committed the changes. by the way if you want to override the global settings for height and width for the galleria-content div just add a css rule like "body .galleria-content {}" to your theme css.

s_leu’s picture

Status: Needs work » Fixed

fixed

juves’s picture

Status: Fixed » Needs work

Please, do not add .galleria-content{width:0px;height:0px;margin:0px auto;} to the page, if height/width fields are left empty.

I want to use relative width und style the container via galleria theme css - it allows me to have nice looking galleria, even if JS is disabled. Otherwise I can't have different styles for js enabled/disabled.

miro_dietiker’s picture

Already fixed locally for width and height. Pushing soon.

However i'm unsure for the margin settings... What do you think?

juves’s picture

I think you shouldn't remove all default classes from field container, users usually have margins und ect for it and they can override it (global or per field), if needed.

miro_dietiker’s picture

could you provide a patch with the suggestions?

juves’s picture

I am not a develorer, I don't have any experience, sorry, I can't help

But this isn't an important thing, don't spend time on it if you don't have the time to spend :)

miro_dietiker’s picture

Since developers never really have time, they wouldn't do a thing then... ;-)

You always need to urge them to have time to make something happen.

gopherspidey’s picture

We either need to add the theme to the global configuration page or come up with a way that we can prevent 2 galleries with different theme from showing up on the same page.

Two cases in with this can happen.

1. User adds two image entities to the same node and choose different themes
2. User have two different nodes with different themes, but puts the galleria in the Teaser and then promotes both nodes to the front page.

http://getsatisfaction.com/galleria/topics/multiple_themes_on_one_page#r...

Also it would be nice to have an "Advanced" collapsed fieldset that has a text box the you can enter options that are not part of the form or a theme specific. Such as "_toggleInfo: true" for the classic theme.

jackhutton’s picture

it'd be nice to select different themes - easier.. ;)

miro_dietiker’s picture

gopherspidey,
Are you telling me that galleria (jQuery) itself does NOT support two different galleries on a single page?

Or are you telling us that we should add support for per-galleria settings?

What exactly is the limitation?
Sure we have the feature request open to add more per-gallery / per-imagefield settings.

juves’s picture

(deleted)

miro_dietiker’s picture

Status: Needs work » Closed (fixed)

If you want that, please provide a patch to support override settings per gallery / imagefield / referencefield / view.
However i strongly vote that those settings should be optional (enable / disable overrides)
#1173594: settings per image formatter, nodereference formatter and views display

Please open new issues. This issue was about adding a single settings page. More options is a further feature request.