Dodgy Business Listings (Places) and BP members

This topic contains 3 replies, has 2 voices, and was last updated by  Paolo 8 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #58135

    Johnny Mestizo
    Free User
    Post count: 68

    Looks like my site has been listed as a phishing site, thanks to the dodgy links that are being put in buddypress member profiles and business listings.

    This is using the whoop theme.

    Is there any way to stop this programmatically? Auditing users for human qualities will be too labour intensive.

    Any ideas?

    Cheers,

    Johnny

    #58180

    Paolo
    Site Admin
    Post count: 31206

    HI,

    for buddypress profiles I have no idea, for listings you could try this in your functions.php :

    
    
    function remove_links_from_post($post){
        $post_content = stripslashes($post["post_content"]);
    
        if(!preg_match_all("/(<a.*>)(.*)(</a>)/ismU",$post_content,$outbound_links,PREG_SET_ORDER)){
            return $post;
        }
    
        foreach($outbound_links as $key => $value){
            preg_match("/hrefs*=s*['|"]s*(.*)s*['|"]/i",$value[1],$href);
    
            if((substr($href[1],0,7)!="http://" && substr($href[1],0,8)!="https://") || substr($href[1],0,strlen(get_bloginfo("url")))==get_bloginfo("url")){
                unset($outbound_links[$key]);
            }else{
                $post_content = str_replace($outbound_links[$key][0],$outbound_links[$key][2],$post_content);
            }
        }
    
        $post["post_content"] = addslashes($post_content);
    
        return $post;
    }
    
    add_filter("wp_insert_post_data", "remove_links_from_post");

    Haven’t tested it, so I can’t guarantee that it’ll work. If it does work, it will not remove links from old posts.

    There is no way to do that. Please let us know how this worked for you.

    Thanks

    p.s. this will remove links from blog posts too… just FYI

    #58992

    Johnny Mestizo
    Free User
    Post count: 68

    Unfortunately, this is killing my site.

    Internet spammers, list multiple business listings.

    The dodgy links they put in are then recognised by Google Safe Browsing as suspicious.

    Then the site gets black listed.

    #59009

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    what abuot moderating your listings and delete spammy entries?

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket