Hello Everyone,
I want to create a PHP function that acts like the Facebook like button. But I do not want to use the Facebook like button. I want it to be on my pages only. I am not sure on how to do this? Does anyone have any idea or point me to a place that can show me how to do it.
Thank you everyone for your help.
Help in creating a like button
Page 1 of 13 Replies - 1182 Views - Last Post: 28 January 2012 - 07:59 AM
Replies To: Help in creating a like button
#2
Re: Help in creating a like button
Posted 27 January 2012 - 09:23 PM
If you want to change the icon that's an html question. If you want different behavior, then you need to define the behavior before you can code it.
#3
Re: Help in creating a like button
Posted 28 January 2012 - 07:33 AM
Hi,
If I were doing this the first step I would take is designing the database structure necessary to achieve this. This would largely depend on your current schema and how you are intending on implementing the like system.
If I were doing this and was implementing the ability to "like" multiple types of entities in my site I would have at least the following fields in the table:
You would no doubt want to add more fields but with those you would be able to identify what was liked and only allow one person to like each thing.
After I had the database fleshed out I would start building classes to implement the logic for this system. Again this would largely depend on how your site currently works.
If I were doing this the first step I would take is designing the database structure necessary to achieve this. This would largely depend on your current schema and how you are intending on implementing the like system.
If I were doing this and was implementing the ability to "like" multiple types of entities in my site I would have at least the following fields in the table:
- field to identify type of entity
- identity of who liked it - user id if the system uses a login or ip address
- primary key of entity that was liked
You would no doubt want to add more fields but with those you would be able to identify what was liked and only allow one person to like each thing.
After I had the database fleshed out I would start building classes to implement the logic for this system. Again this would largely depend on how your site currently works.
#4
Re: Help in creating a like button
Posted 28 January 2012 - 07:59 AM
mdmartiny, on 28 January 2012 - 04:54 AM, said:
I want to create a PHP function that acts like the Facebook like button. But I do not want to use the Facebook like button.
since I’m not on Facebook and I see this type of question quite often, what the heck is that "FB like"? (I have a guess, though)
Jstall, on 28 January 2012 - 03:33 PM, said:
You would no doubt want to add more fields but with those you would be able to identify what was liked and only allow one person to like each thing.
I recommend a Composite Key for that. any attempt to "like a thing" more than once leads to a unique constraint violation in SQL which can be handled easily.
This post has been edited by Dormilich: 28 January 2012 - 07:59 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|