Hi guys an gals.
Anyone know how to build a blocking system or can point me to a tutorial ?
For contextâŚ
Iâm assuming by âblocking systemâ youâre talking about a way to allow Users to block other users from seeing them in your app (or something similar)⌠if youâre talking about something else entirely then youâll need to clarifyâŚ
But assuming Iâve understood the question, itâs a fairly simple thing to achieve.
You just need to have a way to store whoâs blocked who - and then apply whatever logic you need to those relationships between Users.
Thereâs nothing inherently different about doing this than there is with any other kind of User-User relational data, so all the basics of database design and relational data apply (check the bubble manual for a good explanation of linking datatypes (Creating a Data Structure - Bubble Docs).
but, basically there are a few optionsâŚ
-
You can simply have a Block List field on the User datatype
Here you can just store a list of other Users whoâve been blocked the User -
You could create that Block list as a separate datatype (useful if you anticipate a larger number of blocked users and want to keep the User dataype light).
I.e. have a datatype called User_Block_List, which has a field for User (the User doing the blocking), and a field for Blocked Users (a list of blocked Users). You could also link that block list directly to the User datatype in a User_Block_List field to make it easier to access directly from the User datatype. -
You could create a datatype called blocked_user, which simply links two users - the one doing the blocking, and the one being blocked.
Of course, like everything, which option is best for you will depend on many factors, but I would guess in most cases the number of users blocked by any particular user is unlikely to be very high, so the first option is probably the simplest, although option 2 will help keep the User datatype lighter.
In this case option 3 might be over-complicating things for the purposes of what youâre trying to achieve.
Regardless of how you decide to store the blocked User info, once youâve got that list itâs just a case of applying conditions, and maybe privacy rules, to restrict user interactions in whatever way you need to for your app.
Great response, Adam. I tried to provide some context before anyone responded because what you wrote is a much longer (and much better, admittedly) version of my initial response in the other thread, but Iâm sure it will be helpful (or at least it should be).
Sorry, @anon7044910, but Iâm pretty sure you arenât going to find a tutorial on how to build a block feature because the details of such a feature are going to be heavily dependent upon the functionality of your app. If I were you, I would either start with a template or just start building because it really wonât be all that difficult to include a block feature in your app. In other words, donât let the lack of a âcannedâ feature stop you from getting going with Bubble, but thatâs just my two cents.
Hi , I will need to read this several times over to digest the concepts.
Basically I need to build the block feature used on all the dating sites.
As I am trying to build a dating site myself.
The blocking feature also has to have follow on actions.
As after a person has been blocked so many times by different users in the same day for example that then leads to them being deleted/removed/banned. from the site or warned etc .
As I say none of this is in the dating app templates also from what I can see.
Witch I would of thought should been apart of the templates and for all of the social media apps templates.
I wish it was ready made I know that much.
But I will check out your suggested reading and at least now have some terminologies to throw into youtube and took yet another step down the rabbit hole.
All help and information is gratefully appreciated.
Thanks Guys
This topic was automatically closed after 70 days. New replies are no longer allowed.