Forums / Setup & design / HowTo profile page?

HowTo profile page?

Author Message

Vathanan Kumarathurai

Friday 01 December 2006 6:29:21 pm

I am developing a website where every registered user will have a profile page, something like profile pages at livejournal.com, eg. http://burr86.livejournal.com/profile

The URL should be more like: /member/<username>/
URL to the list of articles by the user: /member/<username>/articles/
URL to the list of blogs by the user: /member/<username>/blogs/

And maybe even the actual content should be placed under the profile page, like
/member/<username>/articles/<articleName>
/member/<username>/blogs/<blogName>

How do I implement something like this? Do I have to implement a member extension? Or can this be solved by making proper content structure? Or is there some other way?

Please help :)

/vathanan

"Ninety percent of everything is crap"
~Sturgeon's law

Claudia Kosny

Saturday 02 December 2006 3:18:00 am

Hi

No need for writing an extension.

I would create a main folder members, and in there a personal folder for each user (check Lukasz's custom edit handler). Create the appropiate subfolders and give your user permissions to create articles in the folder articles in their subtree, same for blogs. That should be it.

Claudia

Vathanan Kumarathurai

Saturday 02 December 2006 4:33:52 am

Claudia, thank you for your input.

My plan was to

1. Create a new class 'member' as a container
<i>I think I also need to make custom classes for user articles, user blogs, etc. These classes will make it easy to override the templates.</i>

2. Create a instance of 'member' class for every user created, with the user's login as the name of the object, and create the sub folders articles, blogs, etc using the appropriate custom classes. The owner of the containers are set to the user created. The creation of containers are done using custom edit handler
<i>This will give me /member/<login>/, /member/<login>/articles, /member/<login>/blogs, etc</i>

3. Create template overrides using class matching

4. Customize the look of the templates using class name and owner id of the node
<i>This makes it possible to personalize the look of the profile page and the sub folders with content specific attributes and profile information</i>

Is it the way to do it? My concern is the high number of containers that will have to be created. If you have 1000 users and six different content types, you will have 7000 containers/folders.

Am I on the right track? Or should I consider an other approach?

/vathanan

"Ninety percent of everything is crap"
~Sturgeon's law

Claudia Kosny

Saturday 02 December 2006 10:50:23 am

Hi

this sounds good to me. I would not know right now how to do the customizing of the templates for each user, although on second thought maybe one could use the user preferences to set display certain items (or not) and to set a certain theme. If you come up with an interesting solution maybe you could post it here or on http://ezpedia.org/

There is not much you can do about the number of objects. You need at least one for each user, each article and (I think) each blog entry. Having an additional folder for each content type does not add much to these numbers but gives you a much better structure on the website. Having these folders should actually help a bit as EZ creates a cache file for each object so if you have lots of objects in the same folder, listing these objects will cause a (admittedly only slight) slowdown.

Claudia

Vathanan Kumarathurai

Tuesday 05 December 2006 3:10:44 am

Claudia,

Sure. I will make the solution available to the ez community.

/vathanan

"Ninety percent of everything is crap"
~Sturgeon's law

Bjarte Lunde

Saturday 05 January 2008 12:57:02 pm

Any luck with this?