For my current project, an for Bio in general, I think it would be great if it was possible to remove the "Biography" menu tab and display the node edit form in the user edit form.

I have already an idea how this could be accomplished via FAPI's #tree property, will follow-up later on.

Comments

Status:Active» Needs review
StatusFileSize
new4.44 KB

Here we go. Realized by leveraging the Subform Element module.

Also includes some performance-related fixes, for example statically caching the result in bio_for_user().

EDIT: Fixed my wrong statement above.

StatusFileSize
new4.53 KB

Ahem, last patch still contained some debug code. This one also removes bio node form submit buttons now.

great just what I was looking for :D

StatusFileSize
new5.09 KB

Attached patch additionally removes the bio node menu tab if editing of bio node in the user account form is enabled.

Status:Needs review» Needs work

Beware this patch breaks any ops in bio_user() except 'view' which requires the bio node's $nid, because that won't be available anymore. The statically cached $nid in bio_for_user() should respect $uid.

Version:5.x-1.x-dev» 5.x-1.2
StatusFileSize
new18.32 KB

I tried to apply the patch #4 against version 1.2 but I've got Hunk #3 and #4 failed. Because I really needed this I started to copy the patch code into the latest version of the module... I'm uploading the complete bio.module file with the code attached. I tested it and it is working for me, I even use Imagecache Profiles and Register with Picture and everything is working.

The only problem I can report is the wsod I got after enabled the option "Show fields on user account edit form", but still, it worked.

If you use this file rename it to bio.module and backup your original bio.module file before doing anything.

Luis

Make sure you don't enable this option before every user on the site has created a bio node because you'll get:

Fatal error: Call to undefined function bio_user_register_form() in bio.module on line 269

when trying to view the user's profile page

StatusFileSize
new35.59 KB

The module in #6 helped me get remove the duplicate editing place but I don't like that the form is joined with the account settings page and the fact that it's way below in the form. It is possible to give it its own secondary tab under the edit tab? I currently have other tabs under that merchant profile and statitics. Please take a look at the attached image.

Thanks.

I think there's a patch somewhere to to this. I must say you must be really careful when using the module in #6. One problem you'll have is that users won't be able to change their user picture.

Anyway, I don't think there's a future with this module, everybody is moving to drupal 6.x