52 Posts
paulbr
11 years ago
Topic

Hello
I do not understand this.

1. I have a form created admin user.
2. I have a register form as site form created.
3. I have created a user profile for the frontend edit by the user.
4. The bridge is active and there is automatically a Artiel "Joomla User - 2" created.
5. In the frontend after the login and click on the menu link "user profile" is the profile not filled.

Note:
For the Formfield "user_id" is the "SD Live CCK Field" configured to #user_id#.
I changed the Title settings from the Plugin to different fieldnames but not works.

Can someone please help me it is very urgent.

Thanks and best regards
paul

see images

Get a VIP membership
52 Posts
paulbr
11 years ago
0
Level 1

Ok 

I have found a solution.

/plugins/system/ckk/ckk.php
function buildRule

Add after:

if ( $uri->getVar( 'option' ) ..... {
...
}
// user_profil is the form alias for my Seblod SiteForm User-Profil
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' ) );
   }
}
Now I do not need a bridge for the Frontend User-Profil.

But now the following problem occurred:
In the user management is the link to a newly registered user:
"<url>/administrator/index.php?option=com_cck&view=form&return_o=users&return_v=users&type=user&id=4"

After the profile editing in the frontend is the link:
"<url>/administrator/index.php?option=com_cck&view=form&return_o=users&return_v=users&type=user_profil&id=4"
and can not be invoked.

Does anyone know where the problem may be here?

Thanks

52 Posts
paulbr
11 years ago
11
Level 1

Thanks for the help, my problem is solved.

My Members Management:
- Admin User Form
- Frontend Registration Form
- Frontend User Profile
- Generic User search width button to open a modal window for detailed user informations

Now works completely correctly without the bridge.

The topic can be closed

11 years ago
0
Level 2

Hello paulbr,

you can mark your thread as solved yourself. On the right hand side of the first post of your thread there is a button to mark the thread as solved. After clicking that button the grey area with the number on top of your first post will be coloured green.

10 years ago
9
Level 2
Hello

Can you describe your solution please?
thanks

cyril
52 Posts
paulbr
10 years ago
8
Level 3

Hello @pulsarinformatique

I have a manual for all this, but only in german. German Online Manual
Due to the amount of pictures in the manual, I think that you can do something.
If you have problems, ask me.
We have created a forum for German Seblod user. Here you can also ask questions. German Forum


paulbr

10 years ago
7
Level 4
Hello Paul

Thanks, it's working ! thanks
I modified the /plugins/system/cck/cck.php and /components/com_cck/views/form/tpl/edit.php files as mentioned here.
I also checked the user type integration as described here.

However I can't display the user profile as a content view (display, not edit). With your solution when we click on the seblod form menu item, if we are already connected the form is filled by the profile's OWN values. But how can we SEE OTHER PROFILES please ?


What I'm trying to do is to have a full coherent user management in front end as we have with contents.
As I wrote here the Bridge system is almost ok (but not very clean!) since you can now see your user extra fields defined in the content view of the user content type. But When you click on the edit icon it breaks (see my post please).


thanks

cyril

548 Posts
joomleb
10 years ago
3
Level 5
So happy to see the paulbr guide. Unfortunately I tried to translate it with Goolge and is not so comprehensible for me :(
I think that integrate it (in English) into the basic User guide we have here on Seblod would be a very good thing!
I would be too glad if someone can help me on understanding:
  • at the end, Is it better use or not use the bridge ?
  • What is the right way to manage users with Seblod ?
  • Is the User Profile issue still there and/or will be solved in the 3.2 release ?
10 years ago
1
Level 6
Hi
I just tried what Paul wrote. It works but it doesn't give a complete solution for everything. Please see my answer here.
I first believed Seblod extended com_user as it extends com_content but it is not the case.

  1. if I use the bridge. the joomla user profile menu is redirected to the CONTENT view of the user content type, which is great but the edit icon is broken
  2. if I use Paul's suggestion the user content type form is filled by the connected user values but it is a real seblod hack (I don't like hacks) and you have to write the content types names in the php files. Not very flexible.


548 Posts
joomleb
10 years ago
0
Level 7
  1. Can this small guide help you on find a solution ?
  2. I posted here hoping Paulo can help us on this...
52 Posts
paulbr
10 years ago
0
Level 6
The question is not "What is the right way", the question is "for what purpose do we need it"
It is always better not to use hacks, but in my project I had to do it.
52 Posts
paulbr
10 years ago
1
Level 5
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
10 years ago
0
Level 6
Thanks Paul for this explanation
but if I create a classical Joomla user profile menu item the result is still the classical joomla profile with only the standard field. This is what I see in my test. Am I correct ?

If I understand you well what you propose is with a seblod form menu item which works with your explanations.

thanks

cyril

52 Posts
paulbr
10 years ago
0
Level 5
But how can we SEE OTHER PROFILES please ?




Wait a little bit @cyril

Basically, a user can only see and edit their own profile.

But for my project, it is necessary a sitemap generation (for Google & website) for all users (only user who want it) to your profile.
When I finished the project I'm writing this chapter in my manual.

Get a Book for SEBLOD