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?

eZ debug

Timing: Jan 18 2025 14:57:12
Script start
Timing: Jan 18 2025 14:57:12
Module start 'content'
Timing: Jan 18 2025 14:57:12
Module end 'content'
Timing: Jan 18 2025 14:57:12
Script end

Main resources:

Total runtime0.2071 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 587.6094180.8438
Module start 'content' 0.00680.0050 768.4531101.8359
Module end 'content' 0.01180.1952 870.2891527.0000
Script end 0.2071  1,397.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00381.8568200.0002
Check MTime0.00150.7139200.0001
Mysql Total
Database connection0.00080.377110.0008
Mysqli_queries0.152973.82801410.0011
Looping result0.00150.73271390.0000
Template Total0.194994.110.1949
Template load0.00090.439810.0009
Template processing0.194093.645310.1940
Override
Cache load0.00060.304710.0006
Sytem overhead
Fetch class attribute can translate value0.00150.718410.0015
XML
Image XML parsing0.00030.151110.0003
General
dbfile0.00512.4726200.0003
String conversion0.00000.004030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs