Fabricio Guerrero
|
Thursday 24 March 2005 3:39:25 am
Hi, Im pretty new to eZPublish but have being programming for years and have a new project to abroad. Currently we're migrating a clients site to ezPublish. This clients current site counts with a user registration form and user area. Due to that this user registration consists with over 50fields we woluld like to divide the registration proccess. Upon signup the user would only be prompted to fill out about 10 fields. Later upon succesfully register and logon the user should be able to fill out other fields divided by categories(folders). My question is this doable by creating classes with in the user class or must i create classes with in the content class and some how relate them with an user? I've being trying to do it by creating various small classes within user class but does not seem to work. Any clue??
Regards, Fabricio Guerrero
http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...
|
Lex 007
|
Thursday 24 March 2005 3:47:42 am
Hi, The quick and dirty solution I found was to override the user registration template with the following :
{set
aValid = array('first_name','last_name','user_account','user_birthdate','user_tel','user_fax','user_company','user_address','user_zip','user_city','user_subtype')
}
<form enctype="multipart/form-data" action={"/user/register/"|ezurl} method="post" name="Register">
<div class="maincontentheader">
<h1>{"Register user"|i18n("design/standard/user")}</h1>
</div>
{section show=$validation.processed}
{section name=UnvalidatedAttributes loop=$validation.attributes show=$validation.attributes}
<div class="warning">
<h2>{"Input did not validate"|i18n("design/standard/user")}</h2>
<ul>
<li>{$UnvalidatedAttributes:item.name}: {$UnvalidatedAttributes:item.description}</li>
</ul>
</div>
{section-else}
<div class="feedback">
<h2>{"Input was stored successfully"|i18n("design/standard/user")}</h2>
</div>
{/section}
{/section}
{section name=ContentObjectAttribute loop=$content_attributes sequence=array(bglight,bgdark)}
{section show=$aValid|contains($ContentObjectAttribute:item.contentclass_attribute.identifier)}
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$ContentObjectAttribute:item.id}" />
<div class="block">
<label>{$ContentObjectAttribute:item.contentclass_attribute.name}</label><div class="labelbreak"></div>
{attribute_edit_gui attribute=$ContentObjectAttribute:item}
</div>
{/section}
{/section}
<div class="buttonblock">
<input class="button" type="submit" name="PublishButton" value="{'Register'|i18n('design/standard/user')}" />
<input class="button" type="submit" name="CancelButton" value="{'Discard'|i18n('design/standard/user')}" />
</div>
</form>
aValid is the array of the attributes you want to show on registration ;) Lex
|
Fabricio Guerrero
|
Thursday 24 March 2005 4:13:49 am
ok.. but sorry i did not explain my self correctly... the registration part ive got it done... i just update the original user class and made it have about 10 fields. but now i would like the user fill out the rest of the fields once he logs on... my first idea was to create new classes with in the user class.. but 4 some reason they're just not showing up... if i create them as content classes they show. but i assume i must create user classes so ezPublish can associate an User and all the little classes(additional info) i want to store for them... or is there a way to associate an registered user(user class) with data collected by content classes?
Fabricio pd: thanks for ur help anyway... it's sort of useful.. i can just create one HUGE class and show info according to my needs... as u say it's a dirty way but i'm sure ezPublush must have a cleaner way.... i hope.. ;)
http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...
|