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?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:22:13
Script start
Timing: Jan 18 2025 18:22:13
Module start 'layout'
Timing: Jan 18 2025 18:22:13
Module start 'content'
Timing: Jan 18 2025 18:22:14
Module end 'content'
Timing: Jan 18 2025 18:22:14
Script end

Main resources:

Total runtime0.9727 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 589.0234152.6094
Module start 'layout' 0.00470.0025 741.632839.4141
Module start 'content' 0.00720.9639 781.0469609.0781
Module end 'content' 0.97110.0015 1,390.125016.1875
Script end 0.9726  1,406.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3246160.0002
Check MTime0.00130.1340160.0001
Mysql Total
Database connection0.00080.082710.0008
Mysqli_queries0.905893.1208680.0133
Looping result0.00070.0681660.0000
Template Total0.945097.120.4725
Template load0.00220.230220.0011
Template processing0.942796.918220.4713
Template load and register function0.00040.045410.0004
states
state_id_array0.00110.113510.0011
state_identifier_array0.00070.073420.0004
Override
Cache load0.00200.2012450.0000
Sytem overhead
Fetch class attribute can translate value0.00060.064430.0002
Fetch class attribute name0.00120.125870.0002
XML
Image XML parsing0.00080.081830.0003
class_abstraction
Instantiating content class attribute0.00000.002290.0000
General
dbfile0.00080.0871160.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs