LIMITED OFFER: Save $200 Today! - Get All Themes For $199 -- Learn More

Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

Filter ONLY asking for listings to be approved if certain keywords are used

  • Nicholas
    Nicholas
    Newbie 11 points
    January 11, 2016 at 7:50 am

    I have the “Blue” Classifieds Theme from premiumpress (www.lakomai.com)… here’s my question…

    Does anyone know if there’s a way (plugin or otherwise) to FLAG certain posts that have pre-defined keywords, and ask me to APPROVE them before they’re sent to the live site? The reason I need it to only apply to listings with certain keywords is because I DONT want to have to approve EVERY SINGLE POST (cuz I know that’s an option)…. but I would like it to BLOCK posts that have certain “cuss words” or other keywords that I pre-determine.

    I recently had someone post a ton of inappropriate content on my website, and I’m hoping for an easier way to filter that junk without having to approve every single post that hits my website.

    Thanks!


  • Josh
    Super Guru 13,885 points
    January 11, 2016 at 3:16 pm

    Hello Nicholas,
    There is no option to do this currently.
    But you can try the below code.This checks if a user has entered a inappropriate word in the Keywords input/field and alerts them when they click on the Save Listing button.

    
    <script>
    jQuery(function() {
    jQuery("#MainSaveBtn").on("click",function() {
        var name = jQuery("input:text[name='custom[post_tags]']").val();
            var badwords = ["word1", "word2", "bad word3"];
    
            if(jQuery.inArray(name, badwords) !==-1)
                {
                    alert("Your Listing Contains Bad Words, Please Remove Them Before Proceeding");
                    return false;
                }
    });
    });
    </script>
    
    Attachments:
    You must be logged in to view attached files.
  • morne
    morne
    Senior Member 122 points
    January 11, 2016 at 3:42 pm

    thanks this will be very useful Josh and Nickholas

  • Nicholas
    Nicholas
    Newbie 11 points
    January 11, 2016 at 5:34 pm

    Josh! That is definitely a usable alternative! Thanks SO MUCH for posting that!! Quick question though…

    Is there anyway for that pop up window to indicate exactly what word is triggering the alert? For example, it might say something like this…

    Your Listing Contains Inappropriate Words, Please Remove Them Before Proceeding.
    The words that have triggered this warning are…
    WORD1, WORD 2, WORD 3

    The only reason I might need it to do this is because I’ll be inputting both “english” cuss words and “fijian” (the native language) cuss words… and I want to avoid any confusion about WHAT WORD is causing the error.

  • morne
    morne
    Senior Member 122 points
    January 11, 2016 at 5:55 pm

    Hi Josh

    I tried this code in at 8.8 but it does not seem to work, is there a different code for at

  • Nicholas
    Nicholas
    Newbie 11 points
    January 11, 2016 at 6:01 pm

    Yea, same with me, … it didn’t work when I placed the code in the “Custom CSS” section of my site… should I be placing it somewhere else?


  • Josh
    Super Guru 13,885 points
    January 11, 2016 at 6:46 pm

    Add the code under Theme Options >General Setup >Layout Setup >Custom CSS/JAVASCRIPT >Footer Styles

  • Nicholas
    Nicholas
    Newbie 11 points
    January 11, 2016 at 7:00 pm

    Hey Josh, that’s actually exactly where I’ve place the code. and it still doesn’t seem to be working for me. If you have a second, do you think you could test it on my website to see if you can figure out what might be causing the problem? You can post ads on my website by using the following link…

    Add Listing

    Thanks!

  • morne
    morne
    Senior Member 122 points
    January 11, 2016 at 7:00 pm

    Hi Josh

    I have added code to footer styles but still not working


  • Josh
    Super Guru 13,885 points
    January 11, 2016 at 7:14 pm

    @Nicholas It’s working see attached image.The code is for the Keyword field not the listing title

    Attachments:
    You must be logged in to view attached files.
  • Nicholas
    Nicholas
    Newbie 11 points
    January 11, 2016 at 7:25 pm

    Ohhh… I see what the problem is. It DOES work when you have ONE keyword. But if you put it with multiple keywords, or in a sentence, then it DOESN’T work… For example, it WON’T work if the keywords are…

    “f*** hello goodbye”

    but it WILL work if it is ONLY…

    “f***”

    Is there a way to edit the code where it will create the alert whenever the “bad word” is found ANYWHERE in the keyword field, rather then only when it appears ALONE?

  • Nicholas
    Nicholas
    Newbie 11 points
    January 12, 2016 at 12:05 am

    Josh?? Or anyone else know how to fix the issue I mentioned in my last comment?

  • morne
    morne
    Senior Member 122 points
    January 12, 2016 at 5:56 am

    Hi Josh and Nicholas

    Is it possible to have the alert pop up in title,description and keyword if abad word or multiple bad words are used

  • morne
    morne
    Senior Member 122 points
    January 13, 2016 at 5:59 am

    This could be a really nice feature for 8.9 update especially if it works on multiple bad words in title,description and keyword

  • morne
    morne
    Senior Member 122 points
    January 14, 2016 at 6:02 am

    Hi Josh

    Is there any update on whether it is possible to have the pop up on multiple bad words and in title,description and keyword

Viewing 15 posts - 1 through 15 (of 16 total)