Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Add External ( Wiki style ) icon to External Links

422422 Developer MVP
edited July 2012 in Vanilla 2.0 - 2.8

Ok this is a fudge, but it works. However you may need to set some rules, for external images etc.. however I am sure from this you can make this work how you want.

You know those wiki links like Vanillaskins image

Where the external link icon is automatically added to a link with http in it ?

Ok so here is the basic code.

Image you can save this one image

Add this to your CSS:

a[href^="http://"] {
    background: url('../img/external.png') center right no-repeat;
    padding-right: 13px;
}

Lets say you dont want it to show on your site links because you use http within your own site link url, you could also use:

a[href^="http://www.mywebsite.com"]  {
    background: none;
    padding-right: 0;
}

This will hide the icon for your own URL links, just change URL above to suit. Theres plenty of other methods and rules, I utilise this and hide for internal images etc. But I am sure you can figure these out on your own.

Enjoy

There was an error rendering this rich post.

Comments

  • Options
    422422 Developer MVP

    Oh and don't forget to set the image path to your image path in your forum.

    Example say your theme has a custom css. Then add the css code above to your custom stylesheet.
    Create a folder called img and plonk external.png in that folder.

    Then change the css to ('img/external.png')

    Ste

    There was an error rendering this rich post.

  • Options
    peregrineperegrine MVP
    edited July 2012

    +1 = 423 likes.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    422422 Developer MVP

    Cheers mate :)

    There was an error rendering this rich post.

  • Options

    @442 and @peregrine like to like each other.

  • Options
    422422 Developer MVP

    Your point is ?

    There was an error rendering this rich post.

  • Options
    peregrineperegrine MVP
    edited July 2012

    I think the point he was making - look at all the posts where someone was has helped someone and spent some time trying to assist the questioner - and there was no thank you or a click for like - but a run for the hills after the questioner received the help :)
    But truth be told having alot of likes does nothing anyway - its all just a game.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    422422 Developer MVP

    Maybe a game for you !

    It's my whole world , lol

    There was an error rendering this rich post.

  • Options
    SheilaSheila ✭✭

    Liked you both!

  • Options
    422422 Developer MVP

    Cheers @Sheila

    There was an error rendering this rich post.

Sign In or Register to comment.