How to robustly filter contact details globally?

Any wordpress plugin to robustly detect and prevent the sharing of contact details (email address and phone number) in user-generated content globally?

For a wordpress website like Fiverr.com

Sadly, the answer is: NO!

So, how are we suppose to monetize our site when users will just find a way to bypass it without a sweat? We need to make it harder for them like Fiverr.

We need this addon please Hivepress team.

Thank you

Hi,

There are two options for this:

  1. Do not specify the display area for the attribute, then it will be available only from the backend or in the user’s personal account, you can check these docs: How to add listing attributes - HivePress Help Center, How to add vendor profile fields - HivePress Help Center

  2. Use the Memberships extension to hide these details, you can check these docs: Memberships - HivePress Help Center

​I hope this is helpful to you.

You don’t seem to understand me.

Our site is like Fiverr - there’s nothing like phone number there. However, users must communicate with vendors via the massage extension and vendor can communicate back. Vendor can also communicate to users through their profile and listings.

Here’s the problem, everything about our site from registration to listing is FREE - just like on Fiverr. The only way we raise revenue is through commission, which means, users/vendor MUST not take communication and payment outside.

Because of the nature of human, we cannot trust that they will not try to violate or policy - many have been trying it on Fiverr but, Fiverr and Airbnb have made it greatly difficult for the regular Joe to violate their policies of do not take communication/payment outside, using robust Abuse Filter algorithm extension like the MediaWiki Extension:Abuse Filter on Wikipedia.

So, how does a Hivepress websiteblike Fiverr prevents a gig from telling the client via the message addon “Come to WhatsApp +234123456789” or “Email me at janedoe@example.io” or “Hit me at zero eight zero three two five six nine one six eight” or “t.me @gemini” or “my acct no. is 20 forty one 37 thirty six 99 UBA”

Some users will also attempt to put their contact detail in uncommon places like their vendor bio, listing description, and other descriptive area of a hivepress website that is visible to users. We know that it is possible to moderate listing edits but, we seek an automated solution to supplement manual work like it is on Fiverr. Moreover, massages are hard to manually moderate.

Keep in mind that the website admin cannot read all user messages/contents before letting them go - it’s not practical. And even if the admin were to discover later and banned the parties involved, it is still not efficient enough as intercepting it as it happend or making it difficult for it to happen.

Let me know…

The ‘Block Keywords’ under messages in hivepress > settings should accept regular expressions too. Like:

add_filter('content_save_pre', 'abuse_filter');

function abuse_filter($content) {
    // Define the patterns to search for contact details
    $patterns = array(
        '/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/', // Email pattern
        '/\b\d{10,}\b/' // Phone number pattern
    );

    // Loop through the patterns and check for matches in the content
    foreach ($patterns as $pattern) {
        preg_match_all($pattern, $content, $matches);

        // If matches are found, remove them entirely
        if (!empty($matches[0])) {
            foreach ($matches[0] as $match) {
                $content = str_replace($match, '', $content);
            }
        }
    }

    // Check for phone numbers in the description field using HivePress filter
    add_filter('hivepress/v1/forms/listing_update', function($errors, $form) use ($content) {
        $description = $form->get_value('description');

        // If description field is not empty and contains a phone number, add error message
        if ($description && preg_match('/\b\d{10,}\b/', $description)) {
            $errors[] = 'Phone numbers are not allowed in the text';
        }

        return $errors;
    }, 1000, 2);

    return $content;
}

Hi,

Please remember that you’re using an open-source solution. You can help by suggesting new features and reporting bugs, or even contribute by translating them or proposing code changes on GitHub. The people supporting you are basically volunteers. If you are not satisfied with HivePress, you can use another plugin.

I hope you’ll find a better solution for your website.

@ihor @yevhen and @serhii please comment on this topic issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.