Support » Plugin: MimeTypes Link Icons » Possible incompatibility with Links Shortcode plugin? Not sure which is causing

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor jrf

    (@jrf)

    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; }";

    Plugin Contributor jrf

    (@jrf)

    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; }";

    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…

    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

    Plugin Contributor jrf

    (@jrf)

    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

    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

    Plugin Contributor jrf

    (@jrf)

    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.

    Cool. Thx!

    Plugin Contributor jrf

    (@jrf)

    @mgmirkin v3 contains the fix, so you should be fine for upgrading 😉

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Possible incompatibility with Links Shortcode plugin? Not sure which is causing’ is closed to new replies.