• Resolved Harm10

    (@harm10)


    Sorry to bother you again with perhaps an obvious question but I cannot find the answer to my question.

    I am still experimenting with your great plug-in. Now I am trying to set something fixed for the mla gallery. I know I could use a custom field on the media file but what about a situation that you use the same file in different galleries? Then you would want to set your meta data on the gallery itself in stead of the media file.

    I have experimented with this:
    [mla_gallery ids="1015,1165,1074" mla_caption="array('test1','test2','test3')"]
    The idea being that the first image gets caption test1 and so on.

    Now I just get the text (including the array bit) as the caption for every image.

    How can I accomplish what I want (I also want to set something alike for the href)?

    BTW The link in your documentation “Support for Alternative Gallery Output, e.g., Pagination” does not work. It is there more than once.

    https://www.ads-software.com/plugins/media-library-assistant/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter Harm10

    (@harm10)

    This is very weird. I took a look at the whole source and the unescaped characters are there like you say (both in Firefox that I normally use as in IE 11). But if you select “check element” (also in both browsers) the characters change.
    So I guess this is a bug in the checking of the element by the browser.

    By looking at the generated code I noticed something else.
    If someone codes this as part of the mla_gallery
    mla_image_attributes="alt='{+mla_fixed_alt+}'"
    the end result is that the img tag contains 2 alt parms.
    I would expect the presence of the alt parm in mla_image_attributes to suppress the regular one. Or not?

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the clarification. You’re right – the “DOM Explorer” view in the Internet Explorer F12 Developer Tools does indeed show the converted characters in the title attribute, not the original source.

    You are also right that the mla_image_attributes parameter will add a second alt= attribute to the tag. That is why [mla_gallery] provides the mla_image_alt parameter to replace the content of the existing tag. The mla_link_attributes and mla_image_attributes parameters are best used for adding, not replacing, attributes. If you use them to replace existing attributes their value will override the existing value because it comes first in the tag. This is not behavior you should rely on, however.

    Thread Starter Harm10

    (@harm10)

    Sometimes the option is already there and you just do not see it.
    Of course mla_image_alt is the solution!

    Perhaps you should put it on some to-do list that whenever someone uses such parms in the general mla_link_attributes or mla_image_attributes you replace their setting otherwise you will end up with a lot of different parms. Just an idea!

    So at the end of this series of posts I ended up with all requested in the first post!
    Thanks for all the time you put in!

    Plugin Author David Lingren

    (@dglingren)

    I have just updated the Development Version, with several updates inspired by this topic:

    1. The FAQ now refers to “MLA Internationalization Guide.pdf”
    2. The “Creating a new Translation” instructions have been expanded to clarify the Translation Language Dialog Box step and provide an alternative if the box does not appear. If this still gives you trouble, let me know what Poedit version you are using (I am on v1.6.2).
    3. The “Source Code Character Set” is now filled in for you (UTF-8).
    4. The default Plurals setting should be fine. The Guide now has a link to more information on this setting.
    5. The examples in the mla-fixed-values-example.php.txt file have been improved.
    6. A small bug in the handling of invalid fixed values arrays has been fixed in mla-fixed-values-example.php.txt.
    7. As you suggested, duplicate alt= and/or class= attributes are now removed from the “img” tag when the mla_image_attributes parameter contains new values. The mla_link_attributes processing is somewhat different and does not have the same issue, so it is unaltered.

    If you have a chance to try the new Development Version, let me know if it gives you any trouble. Thanks for your contributions!

    Thread Starter Harm10

    (@harm10)

    I have sent you a mail through the contact form to discuss the translation. I had poedit 1.5.4 (2012) and the dialog in there is definitely different. I now use 1.7.4 and that is much more like what is described in the pdf.

    Pointing to the translation pdf in the documentation itself could perhaps give you more response?

    Point 7 works OK. So that is another improvement.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Fixed href link or caption text per id?’ is closed to new replies.