• Resolved antonstepichev

    (@antonstepichev)


    Hello David!
    Thank you for the great plugin once again!

    Here is the code i use:

    [mla_tag_cloud]
    taxonomy=attachment_category 
    mla_link_href="[+page_url+]?current_id={+term_id+}"
    number=0 limit=500 smallest=10 largest=10 separator=' / '
    [/mla_tag_cloud]
    
    [mla_gallery]
    post_mime_type=all
    tax_query= "array ( 0 => array ( 'taxonomy' => 'attachment_category', 'field' => 'id', 'terms' => array( {+request:current_id+} ), 'include_children' => false ) )"
    mla_caption="{+terms:attachment_category+}" 
    columns=3 posts_per_page=50 size=large link=file
    [/mla_gallery]

    Working example of tag cloud page:
    https://www.backtomusic.ru/photo/tag-cloud?current_id=84

    Question:
    Is it possible to make all tags(categories) displayed as text under each picture clickable, so that these links duplicate corresponding links in the tag cloud?

    With kind regards,
    Anton Stepichev.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thank you for your question and for posting the complete text of your shortcodes; very helpful. Thanks as well for the link to your tag cloud page that shows your current application results.

    You asked “Is it possible to make all tags(categories) displayed as text under each picture clickable?” It took me a few days to consider the question and develop an answer; thanks for your patience in awaiting my response.

    I decided to enhance one of the MLA example plugins developed for an earlier topic. The “MLA Term Links Example” plugin adds a custom substitution parameter prefix similar to the terms: prefix that returns a list of hyperlinks instead of plain text. Once you install and activate the plugin you can change your mla_caption parameter to:

    mla_caption="{+term_links:attachment_category,cloud+}"
    

    where term_links: is the custom prefix, attachment_category is the taxonomy you are filtering on and the ,cloud format/option suffix tells the plugin what kind of links to create.

    To install the example plugin, navigate to the Settings/Media Library Assistant Documentation tab and click the “Example Plugins” button. Enter “links” in the text box and click “Search Plugins”. You should see the example plugin.

    The “MLA Term Links Example” plugin is the one you want. You can hover over the plugin name and click the “Install” rollover action to add it to your site. Then, go to the Plugins/Installed Plugins admin submenu, find the plugin and activate it as you would any other plugin.

    I have uploaded a new MLA Development Version dated 20170626 contains the updated example plugin code. You can find more information about downloading and installing the Development Version in this earlier topic:

    Fatal Error after upgrading to version 2.53

    I will be releasing the update in my next MLA version, but you can use the Development Version if you need an immediate result. I will post an update here when the next MLA version goes out. Thanks for an interesting question, your understanding and your interest in the plugin.

    Thread Starter antonstepichev

    (@antonstepichev)

    Hello David!

    I followed all your instructions – downloaded and installed MLA Term Links Example and MLA 20170626, activated them and replaced the code mla_caption = "{+ terms: attachment_category +}" with code mla_caption = "{+ term_links: attachment_category, cloud +}" on my Tag Cloud page.
    I suspect that I did something wrong, because instead of links mla_caption shows the code [++ term_links: attachment_category, cloud ++].
    See https://www.backtomusic.ru/photo/tag-cloud?current_id=84

    David, I did not think to take so much time from you, just waited for a ready answer. Hope this task is really interesting to you and worth time that you spent on it.

    Thank you and best regards,
    Anton Stepichev

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and for taking the time to install and test the example plugin. I think this is an interesting example that other MLA users may find useful and I always learn something from the work.

    I suspect you have a small formatting problem in your shortcode text. The parameter must be exactly as shown:

    mla_caption="{+term_links:attachment_category,cloud+}"
    

    In particular, just one plus sign at each end and no spaces anywhere in the parameter. It looks like you have some added spaces around each part of the parameter.

    If you correct the shortcode parameter format and still don’t see the result you need, the next thing to check is that you have the proper version of the example plugin installed and active. Go to your Plugins/Installed Plugins screen and find the “MLA Term Links Example” plugin. Make sure it is version 1.01 and is active.

    Let me know if those suggestions help you get a working result.

    Thread Starter antonstepichev

    (@antonstepichev)

    Yes, David, I made both mistakes that you mentioned, now everything works!

    The only thing, mla_caption now displays each link and comma with a new line, can it be done so that they are displayed in one line, as before?

    Thank you!
    Anton Stepichev

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the good news. I went back to your gallery page and had a look at the markup and styles. Your theme includes a style-photo.css file that is causing the problem. Around line 1768 you can see:

    /* Galleries */
    
    /*.gallery,
    #content .tiled-gallery {
    	margin: 0 -2px 1.375em; !!!!!this shit put caption picture to the left (text asis) }*/
    
    .gallery-item {
    	float: left;
    	overflow: hidden;
    	margin: 0 0 0.5em 0;
    	padding-bottom: 0;
    	/*border: 2px solid transparent;*/
    }
    
    .gallery-item img,
    .gallery-item a {
    	display: block;
    /*	margin-bottom: -15px;*/
    	padding: 0px;
    }
    /*.gallery-item img {
    	border: 1px solid black;
    }*/
    /*my for thumb gallery top captiontext gap
    .gallery-size-thumbnail .gallery-item a,
    .gallery-size-medium .gallery-item a {
    	margin-bottom: -20px;
    }*/
    .gallery-caption {
    	overflow: hidden;
    /*Му	height: 1.5em;
    	margin: 0.75em 0 2em;
    	white-space: nowrap;
    	border: 3px;
    	text-overflow: ellipsis;*/
    	display: block;	
    	height: auto !important;
    	margin-bottom: 0px;
    	padding-top: 2px;
    	white-space: wrap;
    }
    

    The .gallery-item a and .gallery-caption styles include display:block, which is putting each link on a separate line. Changing this to display: inline restores the original formatting.

    You can correct the problem by modifying your theme’s file, creating a custom mla_style template or adding inline styles to your page. Let me know if you need more specific help with that.

    Thread Starter antonstepichev

    (@antonstepichev)

    David, you were right, as always. I fixed CSS and got desired inline formatting back.
    You are not only a professional, but an excellent teacher also, thank you very much!

    With best regards!
    Anton Stepichev.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA v2.60, which contains the updated example plugin developed for this topic.

    I am marking the topic resolved, but please update it if you have any problems or further questions. Thanks for the kind words and your interest in the plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Tag cloud – clickable tags in mla_caption area?’ is closed to new replies.