Forums / Developer / linking to a template

linking to a template

Author Message

ez man

Thursday 03 May 2007 2:35:37 am

To be clear:
I created new attribute as follows:
"Usertype [Text line] (id:220)" and added column 'Usertype' in 'ezurl' table.

How can I add 'Usertype' value while registering a new user so that I can display something like :

"User ID: 1 Username: xyz Email: [email protected] Account status:enabled usertype:eventregistration"

Currently I am able to display only

"User ID: 1 Username: xyz Email: [email protected] Account status:enabled"

Felix Woldt

Thursday 03 May 2007 3:17:40 am

hello,

you want to extend the datatype ezuser!
Then you have to change the ez kernel or create a new datatype!

Maybe you can do it with a new contentclass attribute in the user contentclass, where you can store your 'usertype' information.

Then you have access to this information over the contentobject_id of the user_object.

best regards
Felix

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter

ez man

Thursday 03 May 2007 3:19:21 am

I saw the following code:
$user->setPassword( $Password );
$user->setEmail( $Email );
$user->setFirstName( $FirstName );
$user->setLastName( $LastName );
$user->setSignature( $Signature );

in the url http://svn.ezcommunity.net/src/ezpublish2/trunk/projects/php/ezuser/admin/useredit.php

but the file useredit.php is not present in my ezpublish installation version of either 3.8.4 or 3.9.1
Any suggestions?

Felix Woldt

Thursday 03 May 2007 3:55:55 am

Hello,

i think you look in the sources of the ezpublish version 2. This is completely different to ez 3.x.
You will find all stuff for the 'user' module from ez 3.x under

ezroot/ kernel/ user/

Greetings Felix

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter

ez man

Thursday 03 May 2007 4:09:57 am

I have added new content class attribute 'usertype'
Now where should i change in kernel/user to add 'usertype' attribute to display
usertype:blahblah along with
User ID: 2825 Username: xyz Email: [email protected] Account status: enabled

i am able to see
$ViewList['forgotpassword'] = array(
'functions' => array( 'password' ),
'script' => 'forgotpassword.php',
'params' => array( ),
'ui_context' => 'administration',
'single_post_actions' => array( 'GenerateButton' => 'Generate' ),
'post_action_parameters' => array( 'Generate' => array( 'Login' => 'UserLogin',
'Email' => 'UserEmail' ) ),
'params' => array( 'HashKey' ) );

for forgot password only..
Please let me know in which file i can add usertype?

Pascal von Büren

Thursday 03 May 2007 4:16:16 am

Why don't you have a look at the Concepts and Basics Section here on ez.no:
http://ez.no/doc/ez_publish/technical_manual/3_8/concepts_and_basics

There is even a (sadly outdated) step-by-step tutorial here:
http://ez.no/ezpublish/documentation/building_an_ez_publish_site

After having completed this tutorial, you'd be able to answer the questions by yourself.

Don't get me wrong: I'm happy to answer your questions, and so do the other members here, but it seems like you're currently misunderstandig the basic idea behind eZ publish...

Felix Woldt

Thursday 03 May 2007 4:30:27 am

hi ez man,

another thing is, i have seen that you ask the same questions in different forum tasks.

http://ez.no/community/forum/developer/useredit_php#msg126324
http://ez.no/community/forum/developer/adding_column_in_database#msg126319

I think this i not so good.
But this is my opinion.

Greetings
Felix

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter

ez man

Thursday 03 May 2007 4:45:25 am

Sorry for double posting..

ez man

Thursday 03 May 2007 6:01:58 am

Getting nearer..
I was able to edit kernel/ezusertype.php to add following code in the function fetchObjectAttributeHTTPInput

 $usertype = $http->postVariable( $base . "_data_user_usertype_" . $contentObjectAttribute->attribute( "id" ) );

now i need to reflect one more texbox(Usertype) along with
Username Password Confirm Password Email in design..
Any suggestions?

Pascal von Büren

Thursday 03 May 2007 6:44:23 am

Please, have a look at
http://ez.no/doc/ez_publish/technical_manual/3_8/concepts_and_basics/content_management/the_content_class

You're really missing out some of eZ's most brilliant features.

ez man

Thursday 03 May 2007 7:57:34 am

I want to extend the datatype ezuser with one more field.
Is it enough to change files in kernel/classes/datatypes/ezuser?

Pascal von Büren

Thursday 03 May 2007 8:02:51 am

It would even be enough to extend your user content class with one simle ezstring-attribute.

But if you want to hack your kernel for a textline, be my guest...

ez man

Thursday 03 May 2007 8:26:12 am

if it is simply adding attribute i can add by clicking 'edit button' and add 'textline'
but i want to add one more field say 'userinfo' along with existing 'useraccount' datatype
This user_account datatype has 4 fields (Username,Password,Confirm password,Email)

Since i want to add 'userinfo' as 5th field i was wondering if anybody can suggest the files i need to change for this