WordPress.org

Ready to get started?Download WordPress

Forums

MimeTypes Link Icons
[resolved] Possible incompatibility with Links Shortcode plugin? Not sure which is causing (11 posts)

  1. MGmirkin
    Member
    Posted 1 year ago #

    I'm not sure which plugin is causing the problem, but you can see it here:

    http://www.eubootcamp.info/links/

    The link to the Electric Comet seems wonky, with the PDF icon hidden partly behind the link.

    But the Mime Type Icons display properly on other pages than the Links page.

    For instance here:

    http://www.eubootcamp.info/sourcebook/archives/

    Where all mime type images display correctly AFTER the link.

    The only difference between the pages, that I can think of, is that the Links page output is governed by the Links Shortcode plugin and maybe it outputs things in some non-standard way?

    Don't know...

    Any thoughts on what might be causing the incompatibility issues?

    Love both plugins. Would hate to lose either one. But need them to play nice together. ^_^

    Have a thread over there to, just so they're aware of it, too.

    http://www.wordpress.org/support/topic/possibly-incompatibility-with-mime-type-link-images-plugin

    Thx in advance,
    ~MG

    http://wordpress.org/extend/plugins/mimetypes-link-icons/

  2. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

    Hi MG,

    The Links Shortcode plugin is overriding the css provided by the MimeTypes Link Icons plugin.

    Could you test the following for me ? Please let me know whether that solves your problem.

    File /css/style.php

    Find line 8:

    echo ".mtli_attachment {  display:inline-block;  height:".$mtli_height."px;  background-position: top ".$mtli_leftorright."; background-attachment: scroll; background-repeat: no-repeat; padding-".$mtli_leftorright.": ".($mtli_height*1.2)."px; }";

    Replace with:

    echo ".mtli_attachment {  display:inline-block;  height:".$mtli_height."px;  background-position: top ".$mtli_leftorright."; background-attachment: scroll; background-repeat: no-repeat; padding-".$mtli_leftorright.": ".($mtli_height*1.2)."px !important; }";
  3. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

    And for consistancy, you may want to also replace the following line:

    File mime-type-image.php

    Find line 429:

    $mtli_css = "<style type='text/css'> .mtli_attachment {  display:inline-block;  height:".mtli_get_option('image_size')."px;  background-position: top ".mtli_get_option('leftorright')."; background-attachment: scroll; background-repeat: no-repeat; padding-".mtli_get_option('leftorright').": ".(mtli_get_option('image_size')*1.2)."px; }";

    Replace with:

    $mtli_css = "<style type='text/css'> .mtli_attachment {  display:inline-block;  height:".mtli_get_option('image_size')."px;  background-position: top ".mtli_get_option('leftorright')."; background-attachment: scroll; background-repeat: no-repeat; padding-".mtli_get_option('leftorright').": ".(mtli_get_option('image_size')*1.2)."px !important; }";
  4. MGmirkin
    Member
    Posted 1 year ago #

    Before I go poking around in CSS, do you mean YOUR CSS or THEIRS?

    Ohh wait, never mind, they don't have a CSS 'directory', so I assume you mean YOUR CSS. Okay, I'll see what I can do...

  5. MGmirkin
    Member
    Posted 1 year ago #

    Okay, while I'm not a programmer and don't quite understand what the changes did, it does seem to have corrected the issue on the Links page:

    http://www.eubootcamp.info/links/

    The icon now shows up after the link rather than behind the end of it.

    And links on the Archives page still function as normal.

    http://www.eubootcamp.info/sourcebook/archives/

    So, is that it then, or do I need to do or communicate anything over at Links Shortcode support?

    Will this change be included in a future build (would hate to have the fix overwritten or something)? & hopefully this fix won't end up breaking anything else? ;)

    Best,
    ~MG

  6. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

    MG,

    All I did was add !important at the end of the CSS for the margin. Whether they have a css directory or not is irrelevant, the Links Shortcode plugin is sending css to the browser and is doing so after the MimeTypes Link Icons plugin. The result was that the latter overrode the previously send css. The !important directive I now added basically tells the browser to ignore the override and respect the original css from MimeTypes Link Icons.

    Another way to do this would be to change the loading priority of the plugins - which would then load the MTLI css after the LS css -, though that might in rare events cause conflicts with other plugins.
    So yes, you could ask the LS plugin authors to lower the priority for their plugin.

    You could also try the 'Asynchronous Replacement' option (last one on the MTLI options page), I haven't tested it, but that might just solve the issue without any code changes.

    Would you let me know whether the Asynchronous Replacement option worked for you ? If so, no change will be made to the code in general.

    If it doesn't, I'll post a link to this thread in the bug report thread I opened yesterday which hopefully will get picked up before a new release is send out.

    Smile,
    Juliette

  7. MGmirkin
    Member
    Posted 1 year ago #

    Nope, uninstalled & reinstalled. Verified the icon was again "broken" (slightly hidden).

    Tried the "Asynchronous Replacement" option, but nothing changed on the links page. Icon still mis-aligned behind part of the link.

    So, reinstated the changes to the PHP files & it's back to looking right again.

    Best,
    ~MG

  8. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

    Ok, thanks for testing. I've added a link to this thread to the bugfix thread now.

    I'll keep an eye out for the change to make it into the code for a next version.

  9. MGmirkin
    Member
    Posted 1 year ago #

    Cool. Thx!

  10. Maarten Swemmer
    Member
    Posted 1 year ago #

  11. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

    @MGmirkin v3 contains the fix, so you should be fine for upgrading ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic