Problems with userfields modification
#1
Hello,

I work on a modification. I want add additional categorys for the userfields.

In the moment I'm testing some ideas. But it doesent work.

In the template usercp_profile_profilefields is responsible for the userfields

Original Version:
<br />
<fieldset class="trow2">
<legend><strong>{$lang->additional_information}</strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
{$customfields}
</table>
</fieldset>

First I doubled the code (for testing):
<br />
<fieldset class="trow2">
<legend><strong>{$lang->additional_information}</strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
{$customfields}
</table>
</fieldset>

<br />
<fieldset class="trow2">
<legend><strong>Test</strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
{$customfields}
</table>
</fieldset>

Now the userfields shown twice. Than I changed the second {$customfields} in {$test}.

Than I edit the user.php. I doubled this:
	// Custom profile fields baby!
	$altbg = "trow1";
	$requiredfields = '';
	$customfields = '';
	$query = $db->simple_select(TABLE_PREFIX."profilefields", "*", "editable='yes'", array('order_by' => 'disporder'));
	while($profilefield = $db->fetch_array($query))
	{
		
[...]

	if($customfields)
	{
		eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";");
	}

and changed alle $customfield to $test in the area wich was copied.

Now I thought, the userfields have to shown twice again, but the second box, is empty...

Excuse my bad english, in the attachments: my usercp.php


Attached Files
.php   usercp.php (Size: 72.68 KB / Downloads: 119)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)