Pastoid

The page you are looking at now is at this URL: http://pastoid.com/aod

This paste was last updated on February 17, 2009 at 9:46 pm.

Pasted Coderaw

	/**
	 * Create fields on user page
	 *
	 **/
	public function action_form_user($form, $user)
	{
		// Remove the image field
		$form->imageurl->remove();
 
		$fieldset = $form->append( 'wrapper', 'contributr', _t('Contributor Settings') );
		$fieldset->class = 'container settings';
		$fieldset->append( 'static', 'contributr', '<h2>' . htmlentities( _t('Contributor Settings'), ENT_COMPAT, 'UTF-8' ) . '</h2>' );
		$form->move_after($fieldset, $form->user_info);
 
		$bio = $fieldset->append('text', 'bio', 'null:null',  _t('Biography'), 'optionscontrol_textarea');
		$bio->class[] = 'item clear';
		$bio->value = $user->info->bio;
		$bio->charlimit= 350;
		$bio->add_validator(array($this, 'validate_length'));
 
	}
 
	/**
	 * Create fields on edit page
	 *
	 **/
	public function filter_form_user_update($update, $form, $user)
	{
		if(isset($form->bio) && ($user->info->bio != $form->bio->value)) {
			$user->info->bio = $form->bio->value;
			$update = true;
		}
 
		return $update;
	}

Toggle wordwrap

Referring DomainHits
Unknown Referer 127
pastoid.com 6
search.live.com 4
mibbit.com 1
drunkenmonkey.org 1
Is this paste spam?
<Hide