Forums / General / User/Members - Editable Profile Pages

User/Members - Editable Profile Pages

Author Message

James Hyatt

Monday 06 October 2008 5:19:12 am

Hi Everyone

I have spent the last few hours looking over the forums for an answer to this and there has been various information posted, however, none of it has given a conclusive/best practice answer.

I am developing a site which would allow users to have their own simple member profile page. Here they can create event calenders, blog posts, message each other etc.

What would be the best way to go about it? I would like if possible the pages to be accessed via

/profiles/[membername]

Is it viable to create a new 'profile' class in the profiles folder each time a user creates an account? How many users could this handle? I have read concerns over how many objects the content tree can handle?

Does anyone have experience of creating a similar system? I would assume it's an often requested feature?

Many thanks,

James Hyatt

André R.

Monday 06 October 2008 5:44:26 am

Could you post some more details?
How many users are we talking about, and whats the time line for this project?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

James Hyatt

Monday 06 October 2008 8:01:00 am

Number of users, ideally will be in the thousands. Would be interesting to know how eZ will scale in this area?

The site itself is an online video network split into channels with video's in each channel. So far there are around 300 or so video's.

At the moment I am using eZFlow for the home page with restricted access to each channel. The users must create an account to view video's in each of the channels. The video's tend to revolve around nightlife/events in Australia and in the future we would like to be able to provide each user with their own profile area. Somewhere to interact with each other and maintain event calenders/blogs etc.

Timeline. The initial launch of the site will be a.s.a.p with the member features following later if required, I am more interested in the best way to achieve the result we are looking for.

Many thanks

James

Gaetano Giunta

Monday 06 October 2008 11:23:04 am

Users in the thousands is not a problem, really.

You could easily create a new "homepage" object for every user and put them in a "profiles" folder, but having too many objects in a single folder usually degrades performance a little bit - you would have to be wary of using fetch(content/list) and of rules for automatic cache invalidation.
Maybe splitting the homepages in /profiles/a/..., /profiles/b/... is a viable solution?

Principal Consultant International Business
Member of the Community Project Board

André R.

Monday 06 October 2008 12:34:05 pm

As for timeline, I only asked since 4.1(november/december) includes possibility to limit content create right on parent container owner or owner group, like you currently can with read and edit rights.

Example: You have a script to create a user folder with calendar and blog, and set the user as owner of those three objects, then you can more easily restrict access to it, aka:
content, create, ParentClass(calendar),UserLimit(owner), Class(event)
content, create, ParentClass(blog),UserLimit(owner), Class(blog_post)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Carlos Revillo

Monday 06 October 2008 1:52:55 pm

Correct me if i'm wrong, but i think you'll probably need some more things to get those /profiles/membername url.

By default, when a user is added to database, you could read his data (obviously if you have right permissions) in url like http://www.yoursite.com/users/guest-accounts/somebodyname-somebodysurname.

That's because there's a setting in your site.ini file who tells the system to store this new user under the folder with node id 12.

You could also change the way the url for the user accounts is generated. by default, the url is built using the first name and the surname of the user. but you could probably change it so this url will be only the useraccount of the new user.

After this, you can create a folder under the root content node called "profiles", and then change that site.ini setting to tell eZ that new users will be allocated under that folder.

This way you could easily have urls like /profiles/nick.

My doubt here is how to deal with roles for these users... it seems i cannot assign roles to folders (only to groups or user groups) but, on the other side, it seems i cannot create usergroups in the content section (at least by default...).

so, other option could be to change the literal for the root of the user section from "users" to maybe "profiles" and put all the users under this node...

Last option, but it will require some coding on your part, could be a custom extension. one view of this extension will receive the username as parameter. then, usign ez api you could get the data for this user...

André R.

Monday 06 October 2008 2:37:27 pm

Well there are two ways to avoid that, either fix the issue as you describe it ( if there is a issue please use the h in html/http* ;) ), or decouple the data using user class and user group only for user stuff, and create separate classes for the content stuff, aka user / group profile.
Last one is more work, but better separation, and you can avoid creating profiles attributes for the ones that don't want one.

* the not being able to set more classes as user group is most interesting, the other isn't a issue as in it is only a matter of class group if I remember correctly..

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

James Hyatt

Tuesday 07 October 2008 3:27:38 am

Hi Everyone

Many thanks for all the replies.

@André R:

If version 4.1 will help achieve what I want then it's not a problem to wait for it.

<i>Example: You have a script to create a user folder with calendar and blog, and set the user as owner of those three objects, then you can more easily restrict access to it..</i>

Could you please elaborate on how/what script I would use to automate the creation of a user folder when a new user is registered? Is it better to do it this way rather than work with the user object? How can I link the folder to the user so their folders are editable/viewable but other users are only viewable?

I do apologise to everyone if I don't make sense or miss any valid points you are making. I have used eZ on and off for the past 4 years but only ever to build more basic company websites. This is the first time I have attempted to work with user interaction and I am still trying to understand how eZ works in this regard.

I think I understand much of what Carlos has said but I am a little lost at:

<i>My doubt here is how to deal with roles for these users... it seems i cannot assign roles to folders (only to groups or user groups) but, on the other side, it seems i cannot create usergroups in the content section (at least by default...).</i>

the reply from André is even more confusing :)

I am interested in the idea of creating a custom module to handle the profiles but I am again confused as to how that would link to the content tree? How would a member create a new blog or calender item if I am using a custom module?

I guess my question now is thus:

Which of the techniques discussed would be easiest to implement without being too restrictive in the future and any practical pointers in getting started would be most appreciated.

Many thanks once again,

James Hyatt