Need some design tips on hidden and public user attributes.

Author Message

Tore Skobba

Friday 12 December 2003 5:11:08 am

Hi all

I have a site where users register themself, furthermore, some data about the users are to be available for all visitors to the site (such as name, picture). I aave a list all students link (where students are the registered users). While other data is to be hidden, such as phone number etc. as this data is only for the administrators of the site. However, the user should himself update this data. As such I have an user class where some attributtes are to be showed to all, while others are not. In addition I would like a dynamic template to show all public student attributes, i.e. using an section going through all attributes and printing them. Hence I need a way of seperating the attributes between hidden and not hidden. Currently I am evaluating several solutions, but these might not be good so I am searching for some more tips:

1: All attributes have an "checkbox" indicating if the attribut is available, then the display section loop does an check on the checkbox so see if it is checked, if yes print the attribute (next in the array)

2: The name of the attribute indicates whereever it is hidden or not, i.e. Name_PUBLIC, Phone_HIDDEN, then I can do a check on the name in my display section loop.

3: All users have a related content object with all the hidden attributes, when editing they are also required to edit the related content object. However, this is not shown when displayed on the main page.

Hope someone has some tips, am I thinking very wrong?

PS: This is not going to be sensitive data, as such whereever some user might be able to view it by playing with the url is okay (as solution 1 and 2 would allow).

Cheers
Tore

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 19 2025 04:38:10
Script start
Timing: Jan 19 2025 04:38:10
Module start 'layout'
Timing: Jan 19 2025 04:38:10
Module start 'content'
Timing: Jan 19 2025 04:38:11
Module end 'content'
Timing: Jan 19 2025 04:38:11
Script end

Main resources:

Total runtime0.9042 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.4141152.6563
Module start 'layout' 0.00650.0043 742.070339.5078
Module start 'content' 0.01080.8919 781.5781406.7109
Module end 'content' 0.90280.0014 1,188.28918.0938
Script end 0.9042  1,196.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3663160.0002
Check MTime0.00130.1448160.0001
Mysql Total
Database connection0.00070.082210.0007
Mysqli_queries0.864695.6184460.0188
Looping result0.00050.0600440.0000
Template Total0.868796.120.4344
Template load0.00200.220520.0010
Template processing0.866795.851220.4334
Template load and register function0.00030.035810.0003
states
state_id_array0.00080.090710.0008
state_identifier_array0.00100.111920.0005
Override
Cache load0.00160.1775120.0001
Sytem overhead
Fetch class attribute can translate value0.00100.114710.0010
Fetch class attribute name0.00090.101910.0009
XML
Image XML parsing0.00010.013410.0001
class_abstraction
Instantiating content class attribute0.00000.000610.0000
General
dbfile0.00090.0983100.0001
String conversion0.00000.001140.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs