Page 1 of 1

Custom Profile Field UCP Modules?

Posted: Tue Jul 21, 2009 9:04 am
by MichaelTunnell
I am wondering if it is possible to create UCP modules that allow you to edit specific custom profile fields that you would declare in the module's template file? Essentially kind of like how you can control where certain fields are displayed by calling them in template files outside of the "BEGIN profile_fields" stuff.

I know you can edit custom fields in the UCP -> Profile -> Edit profile section but I want to create a LOT of custom fields for my users to customize and having a huge list there is just impractical.

For example I built a menu system that is displayed on the index page of my site and I would like to give users the option of hiding certain menus if they want to.


I know I could create a duplicate edit profile file and just take out everything but the custom fields part of the template file however that is only a partial solution as I want to create multiple modules for various different types of fields and display thing in an organized fashion rather than on one page.

Here is some code for the module template files based on my idea...of course this code doesn't actually work.

Code: Select all

<!-- INCLUDE ucp_header.html -->

<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>


<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>

	<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
			<dt><label<!-- IF profile_fields_MENU_ONE.FIELD_ID --> for="{profile_fields_MENU_ONE.FIELD_ID}"<!-- ENDIF -->>{profile_fields_MENU_ONE.LANG_NAME}:<!-- IF profile_fields_MENU_ONE.S_REQUIRED --> *<!-- ENDIF --></label>
			<!-- IF profile_fields_MENU_ONE.LANG_EXPLAIN --><br /><span>{profile_fields_MENU_ONE.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
			<!-- IF profile_fields_MENU_ONE.ERROR --><dd class="error">{profile_fields_MENU_ONE.ERROR}</dd><!-- ENDIF -->
			<dt><label<!-- IF profile_fields_MENU_TWO.FIELD_ID --> for="{profile_fields_MENU_TWO.FIELD_ID}"<!-- ENDIF -->>{profile_fields_MENU_TWO.LANG_NAME}:<!-- IF profile_fields_MENU_TWO.S_REQUIRED --> *<!-- ENDIF --></label>
			<!-- IF profile_fields_MENU_TWO.LANG_EXPLAIN --><br /><span>{profile_fields_MENU_TWO.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
			<!-- IF profile_fields_MENU_TWO.ERROR --><dd class="error">{profile_fields_MENU_TWO.ERROR}</dd><!-- ENDIF -->
			<dt><label<!-- IF profile_fields_MENU_THREE.FIELD_ID --> for="{profile_fields_MENU_THREE.FIELD_ID}"<!-- ENDIF -->>{profile_fields_MENU_THREE.LANG_NAME}:<!-- IF profile_fields_MENU_THREE.S_REQUIRED --> *<!-- ENDIF --></label>
			<!-- IF profile_fields_MENU_THREE.LANG_EXPLAIN --><br /><span>{profile_fields_MENU_THREE.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
			<!-- IF profile_fields_MENU_THREE.ERROR --><dd class="error">{profile_fields_MENU_THREE.ERROR}</dd><!-- ENDIF -->

	<span class="corners-bottom"><span></span></span></div>

<fieldset class="submit-buttons">
	{S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp; 
	<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />

<!-- INCLUDE ucp_footer.html -->
I would assume doing something like this would require multiple module files for the info and includes for each template file which I am fine with however if it was like how the viewtopic, viewprofile, etc is setup where the template files controls what is display that would be superb.

I'm not really requesting someone build this but mainly let me know if it is possible currently and if not to provide some guidance on how I could build it.

Re: Custom Profile Field UCP Modules?

Posted: Thu Jul 23, 2009 8:29 pm
by MichaelTunnell
so is this a sign that it is impossible?

Re: Custom Profile Field UCP Modules?

Posted: Sat Aug 01, 2009 6:02 am
by MichaelTunnell
just bumping the topic...I think a week wait is plenty for bumping. :)

Re: Custom Profile Field UCP Modules?

Posted: Wed Aug 05, 2009 7:44 pm
by MichaelTunnell
Come on...not a even a single attempt to reply?

How about I change the question...How can I submit custom profile fields individually so I could at least reorder them in the edit profile section?

They can be reordered everywhere else so I would assume why not there.