Are you looking for Google plus style drag and drop adding friends in groups or circle. Google plus circle implementation so cool, same way I have tried similar user groups adding application with drag and drop effect using jquery and php. I hope it’s useful for your social media web projects.
Sample database contains three tables and relationship between Members and Groups.
Members
Table contains members(users) data such as member_id, member_image and etc.
CREATE TABLE IF NOT EXISTS `members` ( `member_id` int(9) NOT NULL AUTO_INCREMENT, `member_name` varchar(220) NOT NULL, `member_image` text NOT NULL, `dated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`member_id`) ); |
Groups
Contains groups information.
Contains groups information.
CREATE TABLE IF NOT EXISTS `groups` ( `group_id` int(9) AUTO_INCREMENT, `group_name` varchar(220), `sort` int(9), `date` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`group_id`), KEY `sort` (`sort`) ); |
User_group
Members and Groups table relationship table contains user_id(same as memeber_id),group_id, member_id() and sort(ordering)
Members and Groups table relationship table contains user_id(same as memeber_id),group_id, member_id() and sort(ordering)
CREATE TABLE IF NOT EXISTS `user_group` ( `id` int(9) NOT NULL AUTO_INCREMENT, `user_id` int(9) NOT NULL, `group_id` int(9) NOT NULL, `member_id` int(9) NOT NULL, `sort` int(9) NOT NULL, PRIMARY KEY (`id`) ); |
Javascript
Here draggable applying for two classes .members and .group
Here draggable applying for two classes .members and .group
|
groups.php
|
multipleDiv.inc.php
Download this and modify database connection credentials.
Download this and modify database connection credentials.
|
0 comments:
Post a Comment