I understood you found a way to display AND edit the user type in front end without the bridge trick. Is that it ?
Yes
But then, how can we display and edit the profiles in frontend. the
classical Joomla user profile menu still displays the standard fields
only.
No, all my fields are displayed.
Create an SiteForm User-Profil for the frontend. (All permissions are public)
Create a Link (Seblod Form) for the User-Profile in the Joomla Menu.
Make the changes in the Sourcefile:
File:
/plugins/system/cck/cck.php
// buildRule
public function buildRule( &$router, &$uri )
...
// --- Add to the End of this function ---
if
( $uri->getVar( 'option' ) == 'com_cck' && $uri->getVar(
'view' ) == 'form' &&
$uri->getVar( 'layout' ) == 'edit'
&& $uri->getVar( 'type' ) == 'user_profil' ) {
$user = JFactory::getUser();
if ( $user->get( 'id' ) > 0 && @$user->guest != 1 ) {
$uri->setVar( 'id', $user->get( 'id' ) );
}
}
What doing this modification: Our user profile needs the User-ID, for this the function buildRule must be supplemented.
We will check the URL if our user profile (form name = user_profil) is present. Is it then add the user id to the url.
When opens the form Seblod generate hidden fields.
e.g. <input type="hidden" name="config[type]" value="user_profil" /> for our User-Profil
In
the first moment that seems to have no effect, but after modifying the
user profile results in a Strange change in the admin user management.
User-Management - Normal Link to user width ID=7:
administrator/index.php?option=com_cck&view=form&return_o=users&return_v=users&type=
user&id=7
After the edit in the frontend user profile is the same Link:
administrator/index.php?option=com_cck&view=form&return_o=users&return_v=users&type=
user_profil&id=7
Result: the administrator can no longer edit at once the user.
Edit for the solution:
File: /components/com_cck/views/form/tpl/edit.php
// change this
OLD
<input type="hidden" name="config[type]" value="<?php echo $this->type->name; ?>" />
// to
NEW
<input type="hidden" name="config[type]" value="<?php if(
$this->type->name == 'user_profil' ) echo 'user'; else echo
$this->type->name; ?>" />
regards
paul