Jump to content

can i add a facebook like profile for my members?


bobeye
 Share

Recommended Posts

hey folks, i was just curious, would anyone know if its even possible for me to add some sort of facebook like profile for my members? my account profile is a bit boring and id like to give users an extra reason to join up, be able to a level of participation within the site, any ideas?thanks again to everyone here, im only here a week and iv learned alot from just browsing through!

  • Like 3
Link to comment
Share on other sites

although a bit daunting for newbies, your first step in adding FB content should be heading over the the Facebook developers site. They have simple copy/paste code examples (plugins) you can use for like buttons and commenting, and if you are up for the challenge, full FB API integration.http://developers.fa...m/docs/plugins/http://developers.facebook.com/ edit: or are you just asking how to implement this kind of functionality on your own site?

Edited by thescientist
Link to comment
Share on other sites

cheers for the reply, yeah it was more so just that type of functionality that i was looking for, my site member profiles are to say the least, boring so i figured, if i coule give the members something more, ie. being able to add avatars, status, add friends, that sort of thing, i use livesite.any advice would be greatly appreciated!

Link to comment
Share on other sites

That is broad. you need to be specific what you want to do. which features you want to work on.

Link to comment
Share on other sites

Avatars would be pretty simple, I think. All you need is another field in the database to store the image information. With this you have two options (that I know of):- Create a text field in the database to store the image file name. The image would be uploaded and saved in a specific directory on your server. Anytime you want to display the users avatar, you retrieve the file name from the db and use it to find the file in your image directory.- Create a blob data type field in the database to store the image itself. When displaying the avatar, you would just retrieve the image right from the db. I'm not sure which is better but I'm sure other more experienced members can help you there. As for the friends list, you'll need to create another table in the db as a "link" table in a many to many relationship. I can't remember the exact structure the table needs to have, but you should be able to Google it. I think it only requires two fields: memberID and friendID. Both fields will need to comprise the primary key.

Link to comment
Share on other sites

I think the preferred implementation is saving a path to the image in the database, rather than the image itself. Certainly would cut down on the size of the table sotring text vs. blob. At least that is what I do for such things.

Link to comment
Share on other sites

I think the preferred implementation is saving a path to the image in the database, rather than the image itself. Certainly would cut down on the size of the table sotring text vs. blob.
That's what I thought, but I wasn't sure so I left it open. ^_^
Link to comment
Share on other sites

cheers for the relpy folks, thescientist, ShadowMage,would you know if my site already has a database? i have livesite so im not sure if i need to set one up myself.i have set up a database with MySQL via Hostmonster, but i dont know how to link it to my site??on my site the member profile and account came as a template so coud i edit within them or will i need to set new ones up?i really appreciate the help!

Link to comment
Share on other sites

Another reason for saving path is, if you use blob in database table for image storing, it needs to call that seprately to show it. you cant display it with other fetched column in same page which means another call to database which might be a overhead. It can be done also without storing any path to database. You can make a directory for avatar and can place avatar files of users where the filename will be some unique id or name (eg userid or nick from your user table in database which is primary key or unique constraint). after that you can fetch that id or name and format a string to display that file in <img> tag. If any particular file does not exist in directory you can fall bak to your default avatar image. You also need to make sure when user upload a image it should be same extension. for that you can use image manupulation API from php to convert it when saving. you can use any format you wish. This method works assuming one user can have one avtar. you can also make thumbnails. do it same but make it a thumbnail directory inside. and at the time of uploading make a thumbnail image of uploaded image on the fly.

Link to comment
Share on other sites

would you know if my site already has a database?
As it is using user information an others which means it obviously storing information in somewhere. that is the database
i have livesite so im not sure if i need to set one up myself.
I did not use or visit livesite so i dont know they let it do or not. you can ask them.but i dont think thi type of sites let you permit tohandle the database directly. they probably encapsulate the script from their members.and for accessing remote database you have to be a permit for remote access from another server.
on my site the member profile and account came as a template so coud i edit within them or will i need to set new ones up?
Do you have access to the php files? if yes then you can probably edit it. otherwise you need to build it
Link to comment
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
 Share

×
×
  • Create New...