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

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 31 2025 01:19:39
Script start
Timing: Jan 31 2025 01:19:39
Module start 'layout'
Timing: Jan 31 2025 01:19:39
Module start 'content'
Timing: Jan 31 2025 01:19:39
Module end 'content'
Timing: Jan 31 2025 01:19:39
Script end

Main resources:

Total runtime0.0231 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.2656151.2266
Module start 'layout' 0.00460.0035 739.4922220.7188
Module start 'content' 0.00810.0137 960.21091,005.8359
Module end 'content' 0.02180.0013 1,966.046937.9922
Script end 0.0231  2,004.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002711.5372140.0002
Check MTime0.00114.7787140.0001
Mysql Total
Database connection0.00073.128410.0007
Mysqli_queries0.00198.126530.0006
Looping result0.00000.120510.0000
Template Total0.00094.010.0009
Template load0.00083.249010.0008
Template processing0.00020.700510.0002
Override
Cache load0.00052.246710.0005
General
dbfile0.00208.782780.0003
String conversion0.00000.036140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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