I want the drop-down menu to be limited to one item the logged in user, so that way whoever is logged in can post their content without problems.
Other than that I tried to set up a place to show every users content that way they can like their posts and view them too.
Any suggestions on how I would achieve this?
Everything always depends on how you structured your databse.
In your database you would have for example the following DB-FIELDS…
- USER-ID
- OWNER-ID
- “likes” ----> (NUMBER-COUNTER)
- “comments” ----> (ARRAY of STRINGS)
So you have your dropdown. How should your dropdown work now?
It’s not completely clear what you are trying to achieve?
Why the dropdown must be limited to 1-item?
Other than that I tried to set up a place to show every users content that way they can like their posts and view them too.
To show DATABASE-CONTENT the best practise would be to use a REPEATER.
You can show content based on USER-ID (OWNER-ID).
But the flow of your project is not completely clear.
Maybe you can describe step by step all the single steps the user would do ?
- User logs in on your site… (continue)…
- USER-IDENTIFICATION RUNNING… —> you get the USER/OWNER-ID
- User logs in on my site.
- User then goes into lightbox to create a post similar to this.
- User then posts their status update on the site using the dropdown menu.
- Dropdown menu only shows the one profile that’s logged in to prevent hacking into another profile.
- User then selects their profile and only theirs and then is able to post their status.
Still not clear to me, how is that more ‘secure’?
Because you will only be able to choose your account verses being able to choose everyone’s account.
Then why bother with choosing your account, just make the function fetch the data of the current logged in member, that’s even more
Right, could you give me an example of how to do this?
Yepp! Like already mentioned in my previous post at checkpoint-2…
- User logs in on your site… (continue)…
2) USER-IDENTIFICATION RUNNING… —> you get the USER/OWNER-ID —> (get the current logged-in user and all his data)
https://www.wix.com/velo/reference/wix-members/currentmember/getmember
All you have to do is to filter the right data, related to the current user.
This would make sure, that only the data of the logged-in-user would be available/shown.
What if I’m using this to make a public page for everyone to post on, how would I show their profile picture automatically without having to insert a name/picture field for people to post their statuses?
Which is similar to how I can see your comments and mine at the same time.