Profile Version 1.0.1

Coming Soon

Profile allows you to use a dedicated channel for member profiles. By doing so, you now have all the flexibility of the Channel module: custom fields, statuses, relationships, categories, etc. With profile:edit you can create front-end forms where users can manage a rich, custom member profile, using the power of SafeCracker (the free module for easily building stand-alone entry forms).

Requirements

Installation

Tags

View Profile

View the profile of the current logged in user, or the specified member_id.

This tag is shortcut to a channel entries tag, and is the equivalent of doing {exp:channel:entries channel="your_profile_channel" author_id="CURRENT_USER" limit="1"}. For more on the {exp:channel:entries} tag and its parameters and tags, refer to the ExpressionEngine User Guide.

Parameters

All {exp:channel:entries} tag parameters, see ExpressionEngine User Guide, plus...

Variables

All {exp:channel:entries} tag variables, see ExpressionEngine User Guide

Examples

{exp:profile:view}
	<h3>{title}</h3>
	{body}
	<div class="date">Posted on {entry_date format="%M %d, %Y - %h:%i %A"}</div>
{/exp:profile:view}
{exp:profile:view member_id="{segment_3}" disable="custom_fields"}
	<h3>{title}</h3>
	<div class="date">Posted on {entry_date format="%M %d, %Y - %h:%i %A"}</div>
{/exp:profile:view}

Edit Profile

Edit the profile of the current logged in user.

This tag is shortcut to a SafeCracker entry_form tag, and inherits all of its parameters and tags. Please refer to the SafeCracker User Guide.

Edit Profile loads up the current logged in user's associated entry in your Profile channel. If the user does not currently have an entry in the Profile channel, it will create a new one. You DO NOT have to specify an entry_id, Edit Profile will know which entry to edit.

Within Edit Profile, you can also edit member email, username, screen name, and password. You DO NOT need to show title and url_title. These are automatically filled out with the screen name and username respectively.

Parameters

All {exp:safecracker} tag parameters, see SafeCracker User Guide

Variables

All {exp:safecracker} tag variables, see SafeCracker User Guide

Form Inputs

All {exp:safecracker} tag form inputs, see SafeCracker User Guide, plus...

<input type="text" name="username" value="{username}" />
<input type="text" name="screen_name" value="{screen_name}" />
<input type="text" name="email" value="{email}" />
<label>New Password</label>
<input type="password" name="password" value="" />
<label>Confirm New Password</label>
<input type="password" name="password_confirm" value="" />
{!-- superadmins don't have to submit existing password --}
{if logged_in_group_id != 1}
	<label>Your Existing Password (You must submit the current password to update this page)</label>
	<input type="password" name="current_password" value="" />
{/if}

Example

{if logged_out}{redirect='404'}{/if}
<html>
<head>
<link href="{path=css/_ee_saef_css}" type="text/css" rel="stylesheet" media="screen" />
</head>
<body>

{exp:profile:edit return="profile/edit"}
	<fieldset>
		<label>Username</label>
		<input type="text" name="username" value="{username}" />
		<label>Screen Name</label>
		<input type="text" name="screen_name" value="{screen_name}" />
	</fieldset>
	<p>Password Change Form (Leave blank if you do not wish to change it)</p>
	<fieldset>
		<label>New Password</label>
		<input type="password" name="password" value="" />
		<label>Confirm New Password</label>
		<input type="password" name="password_confirm" value="" />
	{!-- superadmins don't have to submit existing password --}
	{if logged_in_group_id != 1}
		<label>Your Existing Password (You must submit the current password to update this page)</label>
		<input type="password" name="current_password" value="" />
	{/if}
	</fieldset>
	<fieldset>
		{custom_fields}
			<label for="{field_name}">{if required}* {/if}{field_label}</label>

			{field_instructions}

			{formatting_buttons}

			{if textarea}
				<textarea id="{field_name}" name="{field_name}" dir="{text_direction}" rows="{rows}">{field_data}</textarea>
			{/if}

			{if text}
				<input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50" />
			{/if}

			{if select}
				<select id="{field_name}" name="{field_name}">
				{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
				</select>
			{/if}

			{if date}
				<input type="text" id="{field_name}" name="{field_name}" value="{field_data}" size="50" />
			{/if}

			{if checkbox}
				{options}<label class="checkbox">{option_value} <input type="checkbox" id="{field_name}" name="{field_name}[]" value="{option_value}"{checked} /></label>{/options}
			{/if}

			{if radio}
				{options}<label class="checkbox">{option_value}<label class="checkbox"> <input type="radio" id="{field_name}" name="{field_name}" value="{option_value}"{checked} /></label>{/options}
			{/if}

			{if file}
				{display_field}
			{/if}

			{if relationship}
				<select id="{field_name}" name="{field_name}">
				{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
				</select>
			{/if}

			{if multiselect}
				<select id="{field_name}" name="{field_name}[]" multiple="multiple">
				{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
				</select>
			{/if}

		{/custom_fields}
	</fieldset>
	<fieldset>
		{status_menu}
			<label for="status">Status</label>
			<select name="status" id="status">
			{select_options}
			</select>
		{/status_menu}
	</fieldset>
	<fieldset>
		{category_menu}
			<label for="categories">Categories</label>
			<select name="category[]" id="categories" size="4" multiple="multiple">
			{select_options}
			</select>
		{/category_menu}
	</fieldset>
	<fieldset>
		<input type="submit" name="submit" value="Submit" />
	</fieldset>
{/exp:profile:edit}
</body>
</html>

Register

Register a new member while simultaneously creating an entry in the Profile channel.

This tag is shortcut to a SafeCracker entry_form tag, and inherits all of its parameters and tags. Please refer to the SafeCracker User Guide.

This will register a new user and create a new Profile entry for that user. It's a combination of a SafeCracker publish form and a registration form.

Within Register Profile, you must also input email, email_confirm, username, screen name (optional), password, and password_confirm. You DO NOT need to show title and url_title. These are automatically filled out with the screen name and username respectively.

Parameters

All {exp:safecracker} tag parameters, see SafeCracker User Guide

Variables

All {exp:safecracker} tag variables, see SafeCracker User Guide

Form Inputs

All {exp:safecracker} tag form inputs, see SafeCracker User Guide, plus...

<input type="text" name="username" value="" />
<input type="text" name="screen_name" value="" />
<input type="text" name="email" value="" /> <input type="text" name="email_confirm" value="" />
<label>Password</label>
<input type="password" name="password" value="" />
<label>Confirm Password</label>
<input type="password" name="password_confirm" value="" />

Example

{if logged_in}{redirect='profile/edit'}{/if}
<html>
<head>
<link href="{path=css/_ee_saef_css}" type="text/css" rel="stylesheet" media="screen" />
</head>
<body>

{exp:profile:register return="profile/edit"}

	<fieldset>
		<label>Username</label>
		<input type="text" name="username" value="" />
		<label>Screen Name</label>
		<input type="text" name="screen_name" value="" />
	</fieldset>
	<fieldset>
		<label>Password</label>
		<input type="password" name="password" value="" />
		<label>Confirm Password</label>
		<input type="password" name="password_confirm" value="" />
	</fieldset>
	<fieldset>
		<label>Email</label>
		<input type="text" name="email" value="" />
		<label>Confirm Email</label>
		<input type="text" name="email_confirm" value="" />
	</fieldset>
	<fieldset>
		{custom_fields}
			<label for="{field_name}">{if required}* {/if}{field_label}</label>

			{field_instructions}

			{formatting_buttons}

			{if textarea}
				<textarea id="{field_name}" name="{field_name}" dir="{text_direction}" rows="{rows}">{field_data}My bio.</textarea>
			{/if}

			{if text}
				<input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50" />
			{/if}

			{if select}
				<select id="{field_name}" name="{field_name}">
				{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
				</select>
			{/if}

			{if date}
				<input type="text" id="{field_name}" name="{field_name}" value="{field_data}" size="50" />
			{/if}

			{if checkbox}
				{options}<label class="checkbox">{option_value} <input type="checkbox" id="{field_name}" name="{field_name}[]" value="{option_value}"{checked} /></label>{/options}
			{/if}

			{if radio}
				{options}<label class="checkbox">{option_value}<label class="checkbox"> <input type="radio" id="{field_name}" name="{field_name}" value="{option_value}"{checked} /></label>{/options}
			{/if}

			{if file}
				{display_field}
			{/if}

			{if relationship}
				<select id="{field_name}" name="{field_name}">
				{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
				</select>
			{/if}

			{if multiselect}
				<select id="{field_name}" name="{field_name}[]" multiple="multiple">
				{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
				</select>
			{/if}

		{/custom_fields}
	</fieldset>
	<fieldset>
		{status_menu}
			<label for="status">Status</label>
			<select name="status" id="status">
			{select_options}
			</select>
		{/status_menu}
	</fieldset>
	<fieldset>
		{category_menu}
			<label for="categories">Categories</label>
			<select name="category[]" id="categories" size="4" multiple="multiple">
			{select_options}
			</select>
		{/category_menu}
	</fieldset>
	<fieldset>
		<input type="submit" name="submit" value="Submit" />
	</fieldset>
{/exp:profile:register}
</body>
</html>

Top of Page