Having a similar issue.
Have you resolved?
L
No, not yet. I first thought it might interfere with another plugin. But after deactivating every other plugin, the problem was still there.
Plugin Author
Aesqe
(@aesqe)
@charger15, @lukehm:
1.) those “default” File Gallery options on the Media Settings page are used to set defaults for File Gallery metabox on post editing screen only.
They do not have any impact on visual display of your galleries. Anything you set there as “default” value will be shown as the default value for an option in the File Gallery metabox.
In RC12, I’ve finally added a notice to the Media Settings page, because this issue has already confused way too many people π
2.) Regarding custom templates:
I can’t tell you exactly when I’ve changed this, but any custom template placed in the plugin folder will be ignored. Please place your custom templates in your theme’s directory, in a subdirectory called “file-gallery-templates” (you can filter this location using two filters: “file_gallery_templates_folder_url” and “file_gallery_templates_folder_abspath”).
Also, I’ve been ‘moving things around’ in the code, and I’ve forgot to add a value to one of the constant-turned-variable’s (so no custom template worked in RC11), but I’ve fixed it in RC12 and will release it shortly.
Thank you for your patience and your bug reports! π
Thanks for that.
Will wait for RC12
I like the idea of the templates being in the theme folder. Much easier for updates.
One other question. In a template I wanted to add the attachmentID to a class/id does one of the varibles contain the id?
Thanks in Advance
Plugin Author
Aesqe
(@aesqe)
@lukehm: you can use the variable $attachment
in your templates, it’s an post object that contains current attachment’s data.
So, to get the ID, just use $attachment->ID
.
Plugin Author
Aesqe
(@aesqe)
RC12 is out, please test your custom templates against it. Thanks! π
You can download File Gallery 1.7-RC12 from here: http://downloads.wordpress.org/plugin/file-gallery.1.7-RC12.zip.
php file being picked up in theme folder great thanks you
no stylesheets appear to load not even columns.css
I’m using file_gallery_shortcode in the template if thats important
L
Plugin Author
Aesqe
(@aesqe)
Yes, if you’re calling file_gallery_shortcode() from within your templates, then you must enqueue CSS files manually.
[gallery] shortcode is parsed before WordPress gets to your theme, so CSS files can be enqueued automatically and show up in document header.
But when you use file_gallery_shortcode(), document header is already processed, and CSS files cannot be linked from within document body.
Makes sense
Will enqueue or add relvant styles to my style.css
Many thanks again
L
Last question I think
If I select the featured image using FG is it possible to exclude this from the gallery.
Maybe tag it and exclude that tag.
I suppoose I could get the featured image id in the FG template and add a variable. Would that be $exclude?
Best
L
Still working on the custom templates
This time using the [gallery] shortcode in a post
If I use one of your templates, both gallery.css and columns.css are enqueued
If still using the gallery shortcode I use a custom template, only the custom gallery.css is enqueued not the standard columns.css.
Do I need to add this file to my file-gallery-templates folder?
On another issue exclude does not appear to be functioning, either using [gallery] in a post or file_gallery_shortcode. It does work however if I disable FG handling of [gallery] shortcode.
I hope this is helpful. I love the plugin
Best
L
Plugin Author
Aesqe
(@aesqe)
That’s by design – “columns.css” is included only if you’re using one of the default templates.
As it’s a small file, best if you just copy its contents into your template’s CSS.
Regarding exclude: thanks for catching that – I recently switched all attachment queries to use WP_Query class directly, as opposed via get_posts(), and forgot to change ‘exclude’ parameter to ‘post__not_in’.
I’ll release RC13 tomorrow, thanks again π
Thank YOU (:i
Slightly off piste
What does a cevapcici and a beer cost these days in Zagreb – or do you prefer coffee?
Plugin Author
Aesqe
(@aesqe)
@lukehm: shouldn’t be more than 5-6 euros π
And I actually do prefer coffee these days π