• Resolved twenty10

    (@twenty10)


    Hi!

    I used an image of my email adress to prevent spamming.

    But now I have three problems with that solution
    1) people can click on it (because they think it’s a hyperlink) and then it opens – I would like to prevent the file from opening
    2) there is a small frame around it (which is not originally in the jpeg file I have uploaded)
    3) the email address does not perfectly align with the text as there is some empty space on the image (even after cropping)

    Any solution for that?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Why not use a contact form plugin instead?

    Thread Starter twenty10

    (@twenty10)

    That’s a good idea for some places, but elsewhere I would like to show my email address.

    I believe by default when you insert an image it gets linked to itself. The border you’re seeing is likely because the browser views the image as a hyperlink. When you insert the image you have the option of setting where the hyperlink points, sounds like you just need to point it to “none”. Although to be honest a lot of people could be frustrated by something that appears to be a link that isn’t… not the best choice from a UX perspective.

    Go into your html editor and place in the following code:

    <img src="yourimageurlhere.jpg" />

    Your image will then show up without a link. Another way would be to click the image while in the visual editor and set the link to none (my way should stop the extra things from showing up, however).

    As for why the image would have a border, it might be due to your theme’s css…do borders appear around the other images on your website?

    To get the image properly lined up with the text, you’ll have dabble with the css. I could write the code here, but I’m not sure if it would work with your theme or not, and it depends on a lot of different factors (like how far apart your text is, etc.)

    Hope that helps!

    See:
    https://codex.www.ads-software.com/Protection_From_Harvesters
    Which uses antispambot. Combine with a custom image of your choice:

    <a href="mailto:<?php echo antispambot("email_address_here"); ?>?subject=Email%20Request"><img alt="Email Us" height="px_here" src="<?php echo get_bloginfo( stylesheet_directory ); ?>/yourfile.jpg" width="px_here" /></a>

    The image is uploaded to the theme folder and this code is used in a theme template file, such as page.php, single.php, footer.php, etc.
    I have working examples, but not going to post as people may start emailing my customers.

    Thread Starter twenty10

    (@twenty10)

    Thanks a lot for your suggestions! I have installed a plugin (and though Firebug still shows me the normal html formatting, I hope that harvesters can’t see it that way).

    Yes, they can see it that way (as can any web user)- in fact they don’t harvest your site as displayed they harvest the HTML source code.

    Thread Starter twenty10

    (@twenty10)

    Right, but I think that’s what Firebug is showing: the HTML code. So at least if the Harvester has the same technology as Firebug, it should still succeed.

    OK – clearness now – source code is delivered then rendered in a browser – review that

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘image of my email adress to prevent spamming’ is closed to new replies.