I’ve been browsing the forums and trying to find a solid answer on how to limit NSFW language and images in an app.
I will be using a reporting system (as API’s cannot handle all cases) but I’m trying to limit users from putting offensive language in their biography and user profiles upon registration.
My only solution so far for text:
Creating a language list as a data-type and have it store a list of ‘bad words’ .
When the user submits their profile, do a search to see if their profile has any words contained in the list
If yes, disable the registration button.
But the list of language is long and I’m not sure how this affects the app usage and/or if it will slow down the user experience.
Does anyone have any good solutions or APIs/Plugins they would recommend as an addition?
Also I found someone created a node.js module, Aeods, that will detect foul language and return data that can be used determine whether or not to allow the words. If you create a Plugin and use a server side action you can use node.js and probably pass the text to the plugin and wait for the response before allowing the user to register.
I couldn’t find anything already built out though so sounds like some work to be done.
Condition: Do a Search for [Bad Language], if [Bad Language] Contains Input’s value.
If Search count is greater than 0, Input is Invalid.
For my database - I created a [Bad Language] data type with a single record. That record was a list that contained all the “bad” words; found thanks to @williamtisdale link.
Help? This breaks as soon as there is a space between wording.
My current workflow is to search an input field for any offensive language based on a list of blacklisted words. If the the search returns a count greater than 0 - it sets a Y/N custom state [No if a match is found].
This works if there is only one word in the input field
When you do ‘This MultilineInput’s value:split by (" ")’, you need to probably save the count as a custom state or have a repeating group with Type of Content ‘text’ and set the data source to ‘This MultilineInput’s value:split by (" ")’. That way you can have an element in each cell that checks that one specific word and if any of them are bad then it will let you know. Long story made short is you can’t say contains and then pass a list. You have to say contains for each single word.
A last question on database setup for the offensive language:
Does the offensive language data have to be setup as a database of individual records for each offensive word (Word Single) or can it be setup as a single record with a list of words (Offensive Words List)?
In all seriousness: If you have a Thing that is unique and that Thing (“Offensive Words List”) is just a list of however many text items, that’s just 1 single Thing in the database.
Don’t get spun by Bubble’s dumb pricing proposal from earlier in the month. That won’t stand. (If they do implement that, certain people will delete everything helpful they’ve ever done for Bubble and fudge the whole thing up. So, just proceed.)
Doing stuff this way is very efficient. If there is only 1 item of a certain Thing type (let’s call it “Offensive Words List”) in your database, doing a Search for “All Offensive Word’s Lists: first item” to get at that list is almost as efficient as having that list already in memory.
However, my joke stands: Why on earth would one filter naughty words? Naughty words make the world go around. Wasting CPU cycles on such things is like throwing aluminum cans on the ground. But that’s just MY opinion, [expletive deleted]. See what I did there?
I’m going to give this a try tonight. I wasn’t able to compare two lists against each other as the input fields for users contain multiple words.
I am able to store the user inputs into a group but cannot do “Offensive Word List” contains “User Input”.
Although; first item might be the expression I’ve been missing all along. I suppose it would always catch the first expletive no matter how many words/user inputs are added.
I’m not sure I’m fully understanding this.
Current setup:
In my database I have a unique thing “Offensive Language Store” that stores individual expletive’s.
On the front end users have multiple input fields they must fill in prior to registration. I have an RG (hidden) that stores every input as a single line. If that RG list contains a word that exists in the “Offensive Language Store” it unchecks a hidden element I have called the “Language Validator”. If the validator is unchecked they cannot submit.
I need help with translating this to a list.
If I have an RG that is holding every single input (which can have multiple words), how do I do a comparison of this list to the list of “Offensive Language” I have stored in the database.
I’ve attempted the “Search For Language Store: first item” but bubble returns an error.