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

WordPress Business Themes Forums Version 7 Themes ClassifiedsTheme Filter ONLY asking for listings to be approved if certain keywords are used

Discontinued - The forum content is out of date. For theme support please use our support desk here.

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

January 11, 2016
Nicholas Nicholas
  • Nicholas
    Nicholas
    Newbie 11 points

    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!

    January 11, 2016 at 7:50 am
  • Josh
    Josh
    Super Guru 13,885 points

    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.
    January 11, 2016 at 3:16 pm
  • morne
    morne
    Senior Member 122 points

    thanks this will be very useful Josh and Nickholas

    January 11, 2016 at 3:42 pm
  • Nicholas
    Nicholas
    Newbie 11 points

    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.

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

    Hi Josh

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

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

    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?

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

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

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

    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!

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

    Hi Josh

    I have added code to footer styles but still not working

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

    @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.
    January 11, 2016 at 7:14 pm
  • Nicholas
    Nicholas
    Newbie 11 points

    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?

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

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

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

    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

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

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

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

    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

    January 14, 2016 at 6:02 am
Viewing 15 posts - 1 through 15 (of 16 total)

Didn't find what you were after?

Chat with us now

or contact our support team