In order to set the position in the node form I have added the hook_content_extra_fields that allows defining the position for any content type that has twitter feature on.

I added as well compatibility for Vertical Tabs (for D6 is needed the vertical tabs form, for future upgrades to D7 is already included)

Comments

dave reid’s picture

Status: Needs review » Needs work

Note the patch should use a group value of "additional_settings" and not "additional settings"

jcmarco’s picture

Status: Needs work » Needs review
StatusFileSize
new1.21 KB
dave reid’s picture

Status: Needs review » Needs work

If someone is using Twitter without CCK, I think this will cause an error with an undefined function:

$weight = content_extra_field_weight($type, 'twitter');

I don't think you need to grab the weight and put in the fieldset as CCK will do it for you.

jcmarco’s picture

Status: Needs work » Needs review
StatusFileSize
new1023 bytes

Dave, you are right!
Just adding the hook_content_extra_fields you can manage the twitter field in the cck form.
New patch without the #weight (solving possible issues when no using the cck module)

dave reid’s picture

Minor nitpick that I should have caught the first time, the comment on the new hook needs to have a () at the end of the function name:

Wrong:
Implementation of hook_content_extra_fields.

Right:
Implementation of hook_content_extra_fields().

jcmarco’s picture

Thank you for your review

dave reid’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

jcmarco’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
StatusFileSize
new1.12 KB

Re-rolled for 3.x release.
Hopefully this time goes in.

michaek’s picture

It'll be in the next push!

michaek’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Patch applied, pushing soon!