WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] image of my email adress to prevent spamming (10 posts)

  1. twenty10
    Member
    Posted 1 year ago #

    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?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Why not use a contact form plugin instead?

  3. twenty10
    Member
    Posted 1 year ago #

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

  4. pdxchambers
    Member
    Posted 1 year ago #

    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.

  5. Sage Brownell
    Member
    Posted 1 year ago #

    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!

  6. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    See:
    http://codex.wordpress.org/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.

  7. twenty10
    Member
    Posted 1 year ago #

    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).

  8. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    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.

  9. twenty10
    Member
    Posted 1 year ago #

    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.

  10. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic