Allow plugin loading after forms - a patch

17 years 11 months ago #14098 by mikko
Currently it is possible to call plugin functions after user profile has been displayed, but not after edit or registration form. This makes it quite hard to dynamically modify the forms using javascript.

Here is a patch that I wrote:

<code>
[joomla/components/com_comprofiler]$ diff comprofiler.html.php comprofiler.html.php.bak
236,243d235
<
< /*Modification to allow javascript loading at the end of edit starts*/
<
< global $_PLUGINS;
< $_PLUGINS->trigger( 'onAfterUserProfileEditDisplay', array($user,true));
<
< /*Modification to allow javascript loading at the end of edit ends*/
<
1202,1210c1194
< <?php
<
< /*Modification to allow javascript loading at the end of registration starts*/
<
< global $_PLUGINS;
< $_PLUGINS->trigger( 'onAfterRegisterUserDisplay', null);
<
< /*Modification to allow javascript loading at the end of registration ends*/
<
---
> <?php
[joomla/components/com_comprofiler]$
</code>

Post edited by: mikko, at: 2006/05/28 14:34
Attachments:

Please Log in to join the conversation.

17 years 11 months ago #14103 by mikko
Here is the patch as an attachment.

mikko

Attachment comprofiler_patch.txt not found

Attachments:

Please Log in to join the conversation.

17 years 11 months ago #14130 by beat
Actually, don't think this hack is needed.

The normal existing plugin methods "getEditTab" and "getDisplayRegistration" already allow to output html (incl. JS) after the normal fields.

Only admin-setup-constraint would be to set the order of the tab after the tabs containing fields.

Or am I missing something ?

Sorry, wasn't aware of (or overlooked?) this request for CB 1.0 stable.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

17 years 11 months ago #14139 by mikko
I though that I made a bug report on this one, but apparently I did not.

Having the tab which loads JS at the end of other tabs is quite inconvenient, especially if there are multiple such tabs. Because of this, I think that being able to load code after all tabs would be a good thing. Especially since the code is always loaded before the fields of the last tab.

-mikko

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.239 seconds

Facebook Twitter LinkedIn