Jump to content
xisto Community
Sign in to follow this  
itssami

Creating Communities/groups In Php ?

Recommended Posts

for example , if on my website, i have made some kind of members area.that the users can join.i want to learn that , they can create the groups...and then others can join their groups... for example , some one creates the group "fun" , and the others existing users can join that ... etc ? can some one give me some idea about it ?? if possible some kind of tutorial/Script/ url link etc ?? thanks..

Share this post


Link to post
Share on other sites

If you have a decent Forum script like phpbb installed, they have this feature for use in the Forum. I am sure there are log-in scripts which will assign members to groups and segregate the pages they are allowed to see and all those things, but, sorry, I don't have any scripts or links. It will involve some pretty heavy changes to your site since every page will require authentication of each user and setting cookies or session variables and a couple of other things. It isn't something for the beginning coder is what I am indicating here. Why not install a Forum and adjust the 'groups' so they can assign themselves and join various groups? It won't require that you adjust your site too much, just to add the Forum into it. Otherwise you are looking for a full Authentication script. And that'll take some Major work.

Share this post


Link to post
Share on other sites

What I would do is to create a new table in the database that stores the names of the groups and a list of members. For example (assuming mySQL for data types):

______________________________________________________| group_name VARCHAR(#) | members BLOB			   ||-----------------------|----------------------------|| cool group			| personA, personB, personC  ||-----------------------|----------------------------|| not as cool =(		| personR, personD, personQ, ||					   | personF, personJ		   ||-----------------------|----------------------------|| etc.				  | etc.					   |ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Then when you need to access the members of the group, you could get the blob and explode it at ", "
You could also have a cell in the members table that keeps track of which groups each member is part in the same fashion.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.