OK, between rev 3225 (http://trac.habariproject.org/habari/changeset/
3225) and the code below, I seem to have gotten this working. Thanks
all.
<code>
public function action_form_user( $form, $edit_user )
{
$twitter_name = ( isset( $edit_user->info->twitter_name ) ) ?
$edit_user->info->twitter_name : '';
$twitter_pass = ( isset( $edit_user->info->twitter_pass ) ) ?
$edit_user->info->twitter_pass : '';
$twitter = $form->insert('page_controls', 'wrapper', 'twitter',
_t
( 'Twitter' ) );
$twitter->class = 'container settings';
$twitter->append( 'static', 'twitter', '<h2>' . htmlentities( _t
('Twitter'), ENT_COMPAT, 'UTF-8' ) . '</h2>' );
$form->move_after( $twitter, $form->change_password );
$twitter_name = $form->twitter->append( 'text','twitter_name',
'null:null', _t( 'Twitter Username'), 'optionscontrol_text' );
$twitter_name->class[] = 'item clear';
$twitter_name->value = $edit_user->info->twitter_name;
$twitter_pass = $form->twitter->append( 'text','twitter_pass',
'null:null', _t( 'Twitter Password'), 'optionscontrol_text' );
$twitter_pass->class[] = 'item clear';
$twitter_pass->type = 'password';
$twitter_pass->value = $edit_user->info->twitter_pass;
}
public function filter_adminhandler_post_user_fields( $fields )
{
$fields['twitter_name'] = 'twitter_name';
$fields['twitter_pass'] = 'twitter_pass';
return $fields;
}
</code>
On Feb 17, 12:07 pm, mikelietz <[email protected]> wrote:
> I'm trying to resurrect the twitter username and password on the user
> page (/admin/user), under the assumption that's the first user
> autoposting would use, but I can't seem to get anything to appear.
>
> action_theme_admin_user( $user ) doesn't seem to do anything at all
> anymore, nor was I able to insert new fields using FormUI. Am I
> missing something or is this broken?
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---