Forums / Setup & design / Reutilizing information to create a object

Reutilizing information to create a object

Author Message

Natalia Lillo

Wednesday 23 November 2005 11:18:17 am

Hi!
My questions is this,
in the interface administrator( or other way),How I can to reutilize the information that exists in other object??,as of this to create other using some information, for not to duplicate information, e.g., if to create an user, can I reutilize his information (name, email, and so on) to create a contact person?

I hope you can unaderstand me....

Thanks,
Natalia

Marko Žmak

Wednesday 23 November 2005 2:11:22 pm

You could try with object relation. For example you could have a class "Contact person" that has a related object attribute that connects to a user object.

Or the other way arround, to have a related object attribute in "User" class that connect to an object of "Contact person". This is the first thing that came in my mind. There are of course other ways to do this, but depends on what do you exactly want to do.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Natalia Lillo

Thursday 24 November 2005 4:26:45 am

Hi Marko,

Thanks, I'll do what to told me...

Cheers.

Natalia

Natalia Lillo

Thursday 24 November 2005 6:32:47 am

I made what to told me that way:
First, I added to the class "Person" the attribute "object relations" and I added the class "User" and "User Group" in the TAB set up/classes, then I create an object "Person" and appears the option to add objects relations, then I added the user "Natalia Lillo" like an object related and I had that to complete all information again, in place of that copy the information the object "User" to not to enter again.

I dont know if you unaderstand me, I hope yes

¿Exists a class Directory, with have several "Contact Person"? like an array of contacts?.

Natalia

Nathan Kelly

Friday 25 November 2005 5:05:21 am

Hi Natalia, if I understand you correctly I believe what you are trying to do is create a page (or pages) where users can view other users information?

This tells me you don't want them to be able to see each others passwords, but Name, email, ICQ, MSN etc. should be public.

If this is the case I would suggest you do this with templates and "roles & policies". Basically you can output user information into a template but usualy this information would only be accessible by the owner.

So you would need to create a "role" that would allow users to see "permitted" information (name etc.) but hide "privileged" information (password etc.), likewise you will have to create a template to fetch this information. This would bypass the need to create a second class (the Person class).

Unfortunately I'm not sure how to do this, but I will look into it for you, if you consider this forum for a moment I can see your name, the date you joined and your avatar (if you had one), but not your password or email address.

This means the answers to what you are trying to do may be found in the templates for the eZforums, if they can display this information here it should be possible to do something similar in a contact list.

I will take a look at some templates and see if I can help, in the mean time, I suggest you look at the forum templates to see how they fetch this information.

Also if anyone knows what sort of roles and policies it would take to set this up please let us know, I think it would benefit many people who may come across similar needs.

Cheers!

Pardon me while I burst into flames...

Rubén Valenzuela

Monday 28 November 2005 6:03:31 am

Hi,

I don't offer any answers, but allow me a couple of questions:

1.- Does EZ have a native 'contacts' module - like outlook - where I can load all the company contacts, as the case of an intranet, that would equal the accounts. And on a second level personal contacts, viewable only by the person who adds them

2.- If not, it seems natural to build a contacts extension having all the accounts registerd on a certain domain - e.g. intranet - as its base of information. The primarily reason for this is not having to duplicate information and management of such everytime an account status changes.

Regards

eZ debug

Timing: Jan 31 2025 01:33:31
Script start
Timing: Jan 31 2025 01:33:31
Module start 'content'
Timing: Jan 31 2025 01:33:31
Module end 'content'
Timing: Jan 31 2025 01:33:32
Script end

Main resources:

Total runtime0.3437 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0093 588.0703370.2734
Module start 'content' 0.00930.0227 958.34381,005.5781
Module end 'content' 0.03210.3115 1,963.92193,898.2891
Script end 0.3436  5,862.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00501.4418200.0002
Check MTime0.00140.4116200.0001
Mysql Total
Database connection0.00130.365710.0013
Mysqli_queries0.208160.54811410.0015
Looping result0.00160.47311390.0000
Template Total0.311090.510.3110
Template load0.00120.358210.0012
Template processing0.309890.130010.3098
Override
Cache load0.00080.235410.0008
Sytem overhead
Fetch class attribute can translate value0.00210.615110.0021
XML
Image XML parsing0.00040.114010.0004
General
dbfile0.02396.9411200.0012
String conversion0.00000.002730.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.0002 secs