Custom Profile Field UCP Modules?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Suggested Hosts
Locked
User avatar
MichaelTunnell
Registered User
Posts: 211
Joined: Fri Apr 29, 2005 9:46 pm
Location: don't rush me
Name: Michael Tunnell
Contact:

Custom Profile Field UCP Modules?

Post by MichaelTunnell » Tue Jul 21, 2009 9:04 am

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.

Image

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}>

<h2>{L_TITLE}</h2>

<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>
	<p>{L_CUSTOM_NOTICE}</p>

	<fieldset>
	<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
		<dl>
			<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 -->
			<dd>{profile_fields_MENU_ONE.FIELD}</dd>
		</dl>
		<dl>
			<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 -->
			<dd>{profile_fields_MENU_TWO.FIELD}</dd>
		</dl>
		<dl>
			<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 -->
			<dd>{profile_fields_MENU_THREE.FIELD}</dd>
		</dl>
	</fieldset>

	<span class="corners-bottom"><span></span></span></div>
</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" />
	{S_FORM_TOKEN}
</fieldset>
</form>

<!-- 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.

User avatar
MichaelTunnell
Registered User
Posts: 211
Joined: Fri Apr 29, 2005 9:46 pm
Location: don't rush me
Name: Michael Tunnell
Contact:

Re: Custom Profile Field UCP Modules?

Post by MichaelTunnell » Thu Jul 23, 2009 8:29 pm

so is this a sign that it is impossible?

User avatar
MichaelTunnell
Registered User
Posts: 211
Joined: Fri Apr 29, 2005 9:46 pm
Location: don't rush me
Name: Michael Tunnell
Contact:

Re: Custom Profile Field UCP Modules?

Post by MichaelTunnell » Sat Aug 01, 2009 6:02 am

just bumping the topic...I think a week wait is plenty for bumping. :)

User avatar
MichaelTunnell
Registered User
Posts: 211
Joined: Fri Apr 29, 2005 9:46 pm
Location: don't rush me
Name: Michael Tunnell
Contact:

Re: Custom Profile Field UCP Modules?

Post by MichaelTunnell » Wed Aug 05, 2009 7:44 pm

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.

Locked

Return to “[3.0.x] MOD Requests”