Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "like" features for blog posts #25

Open
chaitak-gorai opened this issue Oct 3, 2021 · 4 comments
Open

Add "like" features for blog posts #25

chaitak-gorai opened this issue Oct 3, 2021 · 4 comments
Labels
enhancement New feature or request Hacktoberfest

Comments

@chaitak-gorai
Copy link
Owner

It will be a great enhancement if we add a like post feature to the site.

It will be better if we do asynchronous with javascript.

To store the likes count in the database we will add "post_likes_count" to the 'posts' table. Make a query according to that.

For more queries feel free to ask,
Thank you! Keep Contributing.

@chaitak-gorai chaitak-gorai added enhancement New feature or request Hacktoberfest labels Oct 3, 2021
@kristonela
Copy link
Contributor

Hello, can i work on this ?

@chaitak-gorai
Copy link
Owner Author

Yes go ahead @kristonela

@kristonela
Copy link
Contributor

kristonela commented Oct 11, 2021

I have a few questions ... who should be able to like posts ? Only the registered users ? If so, how can i register and try it ... this functionality doesnt work ... i think that it will be necessary to create another table, which will be storing all the information about who liked which post and than link it with posts table. I can see how to check, if the user hasnt already liked the post just with added column 'post_likes_count' into posts table.

@chaitak-gorai
Copy link
Owner Author

Yes, this is a matter of concern. We use register only to access the admin section. No registration system for readers (normal public).
So we can't practically associate each like to the user.
But one thing we can do. We can use the local storage of the browser to check if the user has liked it or not. In that way only creating a single row post_likes_count in the table will work.

Drop your suggestions too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants