The user profile currently consists of basically two parts:
- The basic user information like mailadress, name, skype contact,
hobbys, etc., which show up in a public profile. They are grouped into
different fieldsets.
- Userparameters like "show mailadress", "receive massmailings", "block
user", which don't show up in a public profile, but only for the actual
user. These should be in an accordeon with seperate slides for each
subgroup of parameters. These all have the same form-array in HTML, so
that they are automatically saved in the params field of #__users
Currently we don't have an accordeon slide for the user parameters,
because we are missing the second level of grouping to say which slides
to create in the accordeon. The actual use case in the core would be to
have the additional user parameters, like the configuration for
com_massmail, in the general user edit screen in both front- and
backend. Of course we currently can extend this with a plugin, similar
to the profile plugin currently in the trunk, but to me this is pretty
"complicated" for a quite simple task like adding to the params array of
the form. My idea would be, for these simple cases where the data does
not have to be processed by a plugin before and after, that you can
simply drop a file in a special folder (like
/administrator/assets/user/) and com_user reads all files from there,
adding the new fields to the form automatically visually from this into
the accordeon and programmaticaly into the correct HTML form-array. This
way we could spare us all the extra code for the quadrillion different
user-config-screens in all those different components. Think about a
forum being able to just use com_user in the frontend for the user
parameters and user profile view. All this would be especially
interesting, since for the frontend profile view, you would just have to
drop the accordeon and the result would basically be your user profile. :-)
I've worked with Louis on this already a little bit, but I think I
didn't communicate my idea really well, so his changes were not enough
to implement this. I myself am a bit hesitant to just take a go at it,
since its your work and you have a deeper knowledge about it and the
intentions behind this than I. (My problems also were around the pretty
early validation of data against the form, which meant that values were
dropped, because not all form elements were loaded in the JForm object
at that time.)
Now this is not only for the user parameters, but also for the
parameters in all other extensions. Why not extend the forms the same
way for content, weblinks, etc.? Instead of creating a form plugin that
adds in the one single parameter ("Show comments", "Show social
community badges for this article", "Show author profile for this
article") for a third-party extension, just drop in the XML file and it
automatically appears in the form and can later be accessed by the
frontend plugin as a simple parameter.
I think this has a lot of potential and would make JForm a bit more
flexible. :-) Do you see a possibility to implement something like this
in JForm? I'd help you with making the code changes in all core
extensions once JForm has been modified. ;-)
Hannes
Andrew Eddie schrieb:
> Actually Christophe, I've changed my mind. Let's add the
> category.xml. We'd have to change the controllers and models a bit
> for the params similar to why I've done in com_modules or com_plugins
> (only because JForm can't support nested forms yet - that's something
> we need to solve actually).
>
> Regards,
> Andrew Eddie
> http://www.theartofjoomla.com - the art of becoming a Joomla developer
>
>
>
>
> 2009/12/15 Christophe Demko <chd...@gmail.com>:
>
>> Ok, I understand what you mean (listen to the onPrepareForm) but there
>> remain some issues. I will provide a patch for correcting them.
>>
>> Christophe
>>
>>> plus de d�tails �
Ch.D
> >http://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> > 2009/12/15 Christophe Demko <chde...@gmail.com>:
>
> >> Ok, I understand what you mean (listen to the onPrepareForm) but there
> >> remain some issues. I will provide a patch for correcting them.
>
> >> Christophe
>
> >> On 14 d c, 16:52, Andrew Eddie <mambob...@gmail.com> wrote:
>
> >>> Hi Christophe.
>
> >>> I think you will be able to do what you suggest in 1.6 with a plugin
> >>> similar to the user profile plugin. All you need to do is listen for
> >>> the category JForm and inject a new panel into it.
>
> >>> Regards,
> >>> Andrew Eddiehttp://www.theartofjoomla.com-the art of becoming a Joomla developer
>
> >>> 2009/12/14 Christophe Demko <chde...@gmail.com>:
>
> >>>> Hi Andrew,
>
> >>>> I think I did not well understand your thoughts:
>
> >>>> 1. Do you think they are important features but actually, we cannot
> >>>> adress them? (I don't think so, I have proposed to submit a patch)
> >>>> 2. Do you think they are important features but they will be released
> >>>> in a 1.7 or 1.8 version?
> >>>> 3. Do you think they are not important features?
>
> >>>> Christophe
>
> >>>> On 13 d c, 20:09, Andrew Eddie <mambob...@gmail.com> wrote:
>
> >>>>> Hi Christophe
>
> >>>>> I think if we get a good tutorial for how to hijack JForm, we'll be
> >>>>> able to address those issues. For more complex extensions, I would
> >>>>> actually recommend doing you own category view, if not use your own
> >>>>> categories table for the extension.
>
> >>>>> Regards,
> >>>>> Andrew Eddiehttp://www.theartofjoomla.com-theart of becoming a Joomla developer
> ...
>
> plus de détails »
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/26 Christophe Demko <chd...@gmail.com>:
Hannes
Am 26.12.2009 10:49, schrieb Christophe Demko:
> Just a bump to remember that the new functionalities are ready to test
> on the
> http://joomlacode.org/svn/joomla/development/branches/chdemko svn
> branch as explained in http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=19018
>
> Ch.D
>
It's now corrected in the code:
> This
> would bring almost every site to a grinding stop in terms of
> performance. I think we should revisit this idea again for 1.7. For 1.6
> I'd like to keep it the way it is, except for being able to extend the
> category parameters with the category.xml that you described, but saving
> that in the JSON encoded params array. Everything else can already be
> done in 1.6 with the plugins Andrew described earlier.
Yes, but currently, params are stored in an json encoded string and
cannot be used for a sql query. In my branch, you can do that
>
> Hannes
>
> Am 26.12.2009 10:49, schrieb Christophe Demko:
>
> > Just a bump to remember that the new functionalities are ready to test
> > on the
> >http://joomlacode.org/svn/joomla/development/branches/chdemkosvn
> > branch as explained inhttp://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEd...
> >>>http://www.theartofjoomla.com-the art of becoming a Joomla developer
>
> >>> 2009/12/15 Christophe Demko <chde...@gmail.com>:
>
> >>>> Ok, I understand what you mean (listen to the onPrepareForm) but there
> >>>> remain some issues. I will provide a patch for correcting them.
>
> >>>> Christophe
>
> >>>> On 14 d c, 16:52, Andrew Eddie <mambob...@gmail.com> wrote:
>
> >>>>> Hi Christophe.
>
> >>>>> I think you will be able to do what you suggest in 1.6 with a plugin
> >>>>> similar to the user profile plugin. All you need to do is listen for
> >>>>> the category JForm and inject a new panel into it.
>
> >>>>> Regards,
> >>>>> Andrew Eddiehttp://www.theartofjoomla.com-theart of becoming a Joomla developer
>
> >>>>> 2009/12/14 Christophe Demko <chde...@gmail.com>:
>
> >>>>>> Hi Andrew,
>
> >>>>>> I think I did not well understand your thoughts:
>
> >>>>>> 1. Do you think they are important features but actually, we cannot
> >>>>>> adress them? (I don't think so, I have proposed to submit a patch)
> >>>>>> 2. Do you think they are important features but they will be released
> >>>>>> in a 1.7 or 1.8 version?
> >>>>>> 3. Do you think they are not important features?
>
> >>>>>> Christophe
>
> >>>>>> On 13 d c, 20:09, Andrew Eddie <mambob...@gmail.com> wrote:
>
> >>>>>>> Hi Christophe
>
> >>>>>>> I think if we get a good tutorial for how to hijack JForm, we'll be
> >>>>>>> able to address those issues. For more complex extensions, I would
> >>>>>>> actually recommend doing you own category view, if not use your own
> >>>>>>> categories table for the extension.
>
> >>>>>>> Regards,
> >>>>>>> Andrew Eddiehttp://www.theartofjoomla.com-theartof becoming a Joomla developer
> ...
>
> plus de détails »