Not working…ugggg!
-
Currently I’m using foo gallery but updating/sorting/etc is a pain! Looks nice but doesn’t doesn’t have several of the features above and finding it VERY slow. I have read through the forums and doc’s but I am pretty sure I am missing something. The test gallery is here:
https://leftboot.com/home/test-gallery
My needs:
1. Masonry Type of grid (responsive would be nice.)
2. No captions anywhere
3. Filterable*
4. Auto Updating…but might be dreaming!
5. “Main” gallery that displays a bit from every category but limits at say 50/100 images.
6. Most galleries would be random except events & weddings.
7. I am using Attachment categories and sub categories.
8. A lightbox (without captions) is needed.*Filterable example:
Family (Main) ~ Babies ~ Grads ~ Couples
Weddings (Main) ~ Person A ~ Person B ~ Person C
Comercial (Main) ~ Published ~ Assignments ~ FashionMy code thus far:
[mla_term_list taxonomy=attachment_category mla_option_value=”{+taxonomy+}.{+slug+}” mla_output=flat]
[mla_gallery attachment_category=family link=”large” mla_style=mobile orderby=”rand”]
I added the mobile “style” as per a post a couple days ago. And doesn’t apear to work….
Thanks for all the help in advance!
-
Thanks for the details of your needs, the link to your test gallery and the source text of your shortcodes so far. I am on the road with limited Internet access but I can give you some preliminary guidance.
MLA is designed to be as WordPress-like as possible, and the
[mla_gallery]
shortcode closely follows the display format of the WordPress[gallery]
shortcode. As you have discovered, there are many other WordPress plugins with more sophisticated formats, e.g., Masonry layouts, responsive designs and lightbox capabilities. MLA can support many of these with its “Support for Other Gallery-generating Shortcodes”. In particular, you can use MLA to filter the Media Library and get the items you want, then hand off control to another plugin to generate the gallery/lightbox display. You can find more information in that section of the Settings/Media Library Assistant Documentation tab. You can also find some ideas in these earlier topics and the other topics they link to:How to add popup of full image from gallery page?
Show description in FooBox lightbox
If you can spend a modest amount on your application, MLA works very well with the excellent Justified Image Grid plugin.
I’m not sure what you mean by “Auto Updating…but might be dreaming!” Can you give me more details?
For your “Main” gallery you can adapt the solution in this earlier topic:
The MLA Hooks Example plugin referenced in that topic is part of the current MLA version so you don’t need a Development Version.
Your “code thus far” has two shortcodes; one for a term list and one for a gallery display. In the version you posted there is nothing that links the two shortcodes together. You can study the example in the “MLA Term List Examples” section of the Documentation to find one simple solution. Combining
[mla_term_list]
and [mla_tag_cloud]with
[mla_gallery]` is a popular support subject and there are several earlier topics with variations on solutions. Here are two interesting examples:Is it possible to combine att tags dropdown + checkboxes?
I hope that gets you started on finding solutions for your needs. I will leave this topic unresolved for now in case you have problems or further questions regarding the above suggestions. Thanks for you interest in the plugin.
Thanks for responding…sorry it has taken so long to return to this.
1. Auto Updating. Lets say I upload a new image and place it in attachment category “family”. My dream is that it would automatically populate the gallery “family” so I do not have to upload than manually place it in a gallery.
2. Random…worry about that when I get the gallery working!
3. Gallery Code (update). I will confess I am lost and have no clue. I edit one thing and it works sorta and at one time I could code like a mofo however my attempt to fix breaks it all. This code is for my “Family” page which should include; “Family, Seniors, Weddings, Couples, All”. Currently it is showing the main categories where Family, Commercial, Archives etc live.
https://leftboot.com/test-gallery
<form id=”attachment-category-form” method=”post” action=”.”>
<div>
[mla_term_list taxonomy=attachment_category parent=”Family” mla_item_parameter=current_attachment_category mla_output=flat option_all_text=All option_all_value=all hierarchical=true use_filters=true mla_option_value=”{+slug+}”]
</div>
</form>[mla_gallery numberposts=100 add_filters_to=any mla_output=”medium” link=file option_all_value=all]
[mla_gallery numberposts=100 add_filters_to=any link=file post_parent=all post_mime_type=all option_all_value=all]Thanks for your updates and for taking the time to study and adapt the material from the earlier topics I suggested. Thanks as well for posting the link to your test gallery and the source text of your shortcodes.
Regarding your new items:
“1. Auto Updating” – This is exactly what taxonomy-based galleries provide. If you code
[mla_gallery attachment_category=family]
it will automatically display all of the items assigned to the “family” term in the Att. Categories taxonomy.“2. Random” – We’ll get back to that.
“3. Gallery Code” – I regret the “parameter overload” you are experiencing trying to adapt all of the examples and solutions outlined in the earlier topics. There are a lot of parameters in the shortcodes themselves and some of the earlier topics use example plugins such as the “MLA UI Elements Example” plugin that add more paremeters to the mix.
Here is a simple combination of shortcodes that you can start with:
<div> [mla_term_list taxonomy=attachment_category parent=34 mla_output=flat mla_link_href='{+page_url+}?current_item={+slug+}'] </div> <p> </p> [mla_gallery numberposts=100 size=medium link=file attachment_category="{+template:{+request:current_item+}|family+}"]
Here are the changes I made to your
[mla_term_list]
shortcode:- Removed the form tags, which are only useful for checklist and dropdown controls. For flat and list formats each term is a self-contained hyperlink that refreshes the page when clicked.
- Changed the
parent=
value from a term name to theterm_id
of the parent term. You will have to substitute theterm_id
value for your “Family” term (see below). - Removed the
mla_item_parameter
because the name is explicitly coded in themla_link_href
parameter. - Removed the
option_all_text
andoption_all_value
parameters, which are not used in the flat format. - Removed the
hierarchical=true
parameter, which is not used in the flat format. - Removed the
use_filters
parameter, which is only used with the “MLA UI Elements Example” plugin. - Rmoved the
mla_option_value
parameter, which is not used in the flat format. - Added the
mla_link_href
parameter to specify the use of the term slug in the hyperlinks.
Here are the changes I made to your
[mla_gallery]
shortcode:- Removed the
add_filters_to
parameter, which is only used with the “MLA UI Elements Example” plugin. - Removed the
post_parent
parameter, which is implied when you use theattachment_category
parameter. - Removed the
option_all_value
parameter, which is not used in the[mla_gallery]
shortcode. - Added the
attachment_category
parameter to specify the term slug used to filter the gallery.
The
attachment_category
parameter uses a content template to select one of two term slugs that filter the gallery. If thecurrent_item
query argument is present in the hyperlink, the{+request:current_item+}
value will be used to filter the gallery. Ifcurrent_item
is not present, e.g., when the page is first displayed, thefamily
slug displays all of the items under the parent category.To find the
term_id
value for your “Family” term, go to the Media/Att. Category admin screen. Hover over the “Family” term name and look for thetag_ID
query parameter in the term edit hyperlink or click the link and look for the parameter in the link at the top of the browser window. The number aftertag_ID=
is the term_id.I hope the above example gets you started and clears up some of the confusion. If you want to represent the terms in something other than a flat list format, let me know. There are many variations on this basic example I can help you with. Thanks for your patience in awaiting my response.
Wow! More like chocolate milk than plain ol’ mud. ?? You explanations rock.
So when it didn’t work the first go around I checked my Att Categories and sure enough there was a few images missplaced. I did a big ol resort then added a second line of text for another category and it works:
[mla_term_list taxonomy=attachment_category parent=6 mla_output=flat mla_link_href='{+page_url+}?current_item={+slug+}’]
[mla_term_list taxonomy=attachment_category parent=8 mla_output=flat mla_link_href='{+page_url+}?current_item={+slug+}’][mla_gallery numberposts=100 orderby=”rand” size=full columns=”6″ link=file attachment_category=”{+template:{+request:current_item+}|everything+}”]
“Family” tag changed to the resort.
Random works!
Now just to “pretty it up”. How do I kill all captions? Is there another way I can display this? (Masonry is preferred but want to keep it to your code/clean as possible.) Lastly is there any way other then editing the Att Categories to make the text a bit more readable on the top? Last thing…is there a way to have a “reset” in the gallery so it appears as it first loads?
Thanks so much again…90% there and a million percent happy!
Thanks for the good words and the update on your progress. Regarding your remaining questions:
You asked “How do I kill all captions?” The simplest solution would be to add an
mla_caption=" "
parameter to your[mla_gallery]
shortcode. You also asked “Is there another way I can display this?” You can use MLA’s custom style and markup templates to replace the CSS styles, HTML markup and content of your gallery display. A custom markup template, for example, gives you another way to kill the captions. You can find more information and examples in the Settings/Media Library Assistant Documentation tab.Custom templates are quite flexible but they also require more work and knowledge on your part. More advanced display techniques like masonry layout and lightbox effects are more easily achieved by using one of the many, many WordPess plugins dedicated to these features.
Regarding the masonry layout, the best solution would be to use a more powerful plugin to format the gallery display. You can read through the “Support for Other Gallery-generating Shortcodes” section of the Settings/Media Library Assistant Documentation tab to see how that works. Basically, you can use MLA for data selection and then hand off control to another shortcode for formatting the gallery. The other shortcode must have a parameter such as
ids=
orinclude=
that accepts a list of the item ID values for the gallery items.I have had good results with many slideshow/lightbox/tiled gallery plugins including Tiled Gallery Carousel Without Jetpack (TGCWJ), Photoswipe Masonry, Fullscreen Galleria and others. When you can afford a premium solution, Justified Image Grid is an excellent choice as well. Any plugin that uses the WordPress
[gallery]
shortcode or provides its own shortcode that implements something likeids=
can be made to work. These earlier topics have other examples and plugin suggestions:Fixed height and Auto width on images displayed via mla_gallery
You asked “is there any way other then editing the Att Categories to make the text a bit more readable on the top?” You can use custom style and markup templates with
[mla_term_list]
to get what you want. Here is an example:- Navigate to the Settings/Media Library Assistant Shortcodes tab
- Click “Add New Template”
- Select template type “Markup”
- Select template shortcode “Term List”
- Enter something like “term-list-block” in the Name section
- Enter a Description if you like, e.g., “Inline block display for flat-like term list.”
- Enter
block_width='10' taxonomy=attachment_category mla_link_href='{+page_url+}?current_item={+slug+}'
in the Arguments section. This gives defaults for any shortcode that uses the template. You can split the values over multiple lines if you want. - Enter
<div>
in the “Open” section - Enter
<div style="display: inline-block; background-color: powderblue; text-align:center; width: [+query:block_width+]%; min-width: [+query:block_width+]%; padding: 0px 10px">[+thelink+]</div>
in the “Item” section - Enter
</div>
in the “Close” section - Scroll to the bottom of tha page and click “Update” to save the template
Once that’s done you can change your shortcodes to something like:
[mla_term_list parent=6 mla_output=ulist mla_markup=term-list-block] [mla_term_list parent=8 mla_output=ulist mla_markup=term-list-block block_width=5]
There are endless variations on this approach. The
block_width
parameter shows how you can add custom parameters of your own and give them default values. Themla_output=ulist
must be present for the current MLA version (it’s a small MLA bug). I will fix this in the next version so you can omit it.You asked “is there a way to have a “reset” in the gallery so it appears as it first loads?” The easiest way to do this is to add a link to the page that simply refreshes it:
<p><a title="Reset the display" href="https://leftboot.com/test-gallery/">RESET</a></p>
You can style the above link to make it look like a button. Here’s another “trick” solution you can use:
<div> <form action="." method="get"> [mla_term_list taxonomy=attachment_category parent=6 mla_output=flat mla_link_href='{+page_url+}?current_item={+slug+}’] [mla_term_list taxonomy=attachment_category parent=8 mla_output=flat mla_link_href='{+page_url+}?current_item={+slug+}’] <input name="reset" type="submit" value="RESET" /> </form> </div>
It’s a trick because there are no input elements in the form, just a button that acts like the simpler hyperlink solution.
I hope that answers your remaining questions. I am marking this topic resolved, but please update it if you have any problems or further questions. Thanks for working through these detailed responses.
This has been sooooo helpful, thank-you.
If you don’t mind one last question. I presume that any of the third party solutions integrate so I still have the “automatic” add I wanted right? It is just to “pretty up” the gallery??
Thanks a bunch again david!
ryan
Thanks for the good words. The “automatic” add (displaying items assigned to a particular taxonomy term) is part of the database query performed by
[mla_gallery]
. If you use the “Support for Other Gallery-generating Shortcodes” to use another gallery display shortcode the “automatic” add will still work.Good luck with the rest of your application.
I am this close! I just need to find the “other shortcode” to make the images smaller and the exif go away! I am using tiled galleries without jetpack.
And if it helps anyone:
<div style=”text-align: center;”>
RESET<p>
<h5>
[mla_term_list parent=6 mla_output=ulist mla_markup=term-list-block]
~ Weddings ~
<br>
[mla_term_list parent=8 mla_output=ulist mla_markup=term-list-block block_width=10]</h5><p style=”text-align: center;”>[mla_gallery numberposts=100 mla_caption=” ” orderby=”rand” size=small link=file attachment_category=”{+template:{+request:current_item+}|everything+}” mla_alt_shortcode=gallery]</p>
</div>Thanks for your update and for sharing the text of your solution so far.
When you use the
mla_alt_shortcode=gallery
, all of the gallery formatting is done by the alternate shortcode, e.g., by “Tiled Galleries without Jetpack”. That means themla_caption
is ignored and thesize
, andlink
parameters are simply passed on to the[gallery]
shortcode. It’s up to the alternate shortcode to process those parameters.You can also add any other parameters used by the alternate shortcode and they are passed on as well.
Let me know if you need any further help with this topic.
- The topic ‘Not working…ugggg!’ is closed to new replies.