• Resolved 5lions

    (@5lions)


    Users are complaining that email harvesters are immediately picking up their email address after posting an AD and they are getting spammed to death.

    Is there a way to obfuscate their email address from the spammers?

    Using a javascript functions to display the email has worked well for me in the past. Only browsers with javascript will show the email, so it cant be scrapped so easily.

    Or, display the email address as an image. Only the better email harvesters with OCR capability can get by this.

    Anything would be better than plain text email in the open. Its bad.

    https://wordpress.org/plugins/wpadverts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter 5lions

    (@5lions)

    I tried several of the email obfuscating plugins, but most fail because their require a short code, which is flagged as invalid in the email address field when trying to submit and new AD.

    Then I found this plugin, which does not require short codes at all:
    https://wordpress.org/plugins/email-address-encoder/

    However, it doesnt work with WPAdverts.

    Does WPAdverts work with any email obfuscating plugins? My users are unhappy about all the spam.

    Plugin Author Greg Winiarski

    (@gwin)

    I am guessing obfuscating plugins will not work with WPAdverts as they only scan page content to replace email address not the AJAX requests.

    You can use a code like the one below to make the email addresses harder to read

    add_action("init", "obfuscate_contact_email_init", 20);
    function obfuscate_contact_email_init() {
        remove_action('wp_ajax_adverts_show_contact', 'adverts_show_contact');
        add_action('wp_ajax_adverts_show_contact', 'obfuscate_contact_email_ajax');
    }
    
    function obfuscate_contact_email_ajax() {
        $id = adverts_request("id");
        $post = get_post($id);
    
        if( $post === null || $post->post_type != 'advert') {
            echo json_encode( array(
                'result' => 0,
                'error' => __("Post with given ID does not exist.", "adverts")
            ));
            exit;
        } else {
            echo json_encode( array(
                'result' => 1,
                'email' => str_replace("@", " [at] ", get_post_meta( $id, 'adverts_email', true ) ),
                'phone' => get_post_meta( $id, 'adverts_phone', true )
            ));
        }
    
        exit;
    }

    Or you can use the code snippet posted here to replace contact information box with a contact form https://wordpress.org/support/topic/show-contact-information-1?replies=10

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘users getting spammed’ is closed to new replies.