public function getConfigForm($populate = false)
 {
     $form = new Stuffpress_Form();
     // Add the username element
     $element = $form->createElement('text', 'username', array('label' => 'Username', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $form->addElement($element);
     // Add the feed element
     $element = $form->createElement('text', 'url', array('label' => 'RSS Feed URL', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $element->setDescription('<div class="help">Your RSS Feed URL from <a href="http://foursquare.com/feeds" target="_blank">http://foursquare.com/feeds</a>.');
     $form->addElement($element);
     // Populate
     if ($populate) {
         $values = $this->getProperties();
         $form->populate($values);
     }
     return $form;
 }
 public function getConfigForm($populate = false)
 {
     $form = new Stuffpress_Form();
     // Add the username element
     $element = $form->createElement('text', 'userid', array('label' => 'User ID', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $element->setDescription('<div class="help">You Google+ id is a very long number that appears at the end of your profile link. If you are logged into +, you can just look <a href="http://www.google.com/profiles/me">here</a>.');
     $form->addElement($element);
     // Populate
     if ($populate) {
         $values = $this->getProperties();
         $form->populate($values);
     }
     return $form;
 }
Exemple #3
0
 public function getConfigForm($populate = false)
 {
     $form = new Stuffpress_Form();
     // Add the blog url element
     $element = $form->createElement('text', 'url', array('label' => 'Feed URL', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $form->addElement($element);
     // Add the blog title element
     $element = $form->createElement('text', 'title', array('label' => 'Title', 'decorators' => $form->elementDecorators));
     $element->setRequired(false);
     $form->addElement($element);
     // Add the icon path element
     $element = $form->createElement('text', 'icon', array('label' => 'Icon', 'decorators' => $form->elementDecorators));
     $element->setRequired(false);
     $form->addElement($element);
     // Options
     $options = array();
     if ($this->getPropertyDefault('hide_content')) {
         $options[] = 'hide_content';
     }
     $e = new Zend_Form_Element_MultiCheckbox('options', array('decorators' => $form->elementDecorators, 'multiOptions' => array('hide_content' => 'Hide blog post (only title will be shown)')));
     $e->setLabel('Options');
     $e->setValue($options);
     $form->addElement($e);
     // Populate
     if ($populate) {
         $options = array();
         $values = $this->getProperties();
         if ($this->getProperty('hide_content')) {
             $options[] = 'hide_content';
         }
         $values['options'] = $options;
         $form->populate($values);
     }
     return $form;
 }
 public function getConfigForm($populate = false)
 {
     $form = new Stuffpress_Form();
     // Add the username element
     $element = $form->createElement('text', 'username', array('label' => 'Username', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $form->addElement($element);
     // Populate
     if ($populate) {
         $values = $this->getProperties();
         $form->populate($values);
     }
     return $form;
 }
Exemple #5
0
 public function getConfigForm($populate = false)
 {
     $form = new Stuffpress_Form();
     // Add the blog url element
     $label = $this->getServiceName() . " username";
     $element = $form->createElement('text', 'username', array('label' => $label, 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $form->addElement($element);
     // Options
     $options = array();
     if ($this->getPropertyDefault('hide_replies')) {
         $options[] = 'hide_replies';
     }
     $e = new Zend_Form_Element_MultiCheckbox('options', array('decorators' => $form->elementDecorators, 'multiOptions' => array('hide_replies' => 'Hide @replies tweets')));
     $e->setLabel('Options');
     $e->setValue($options);
     $form->addElement($e);
     if ($populate) {
         $options = array();
         $values = $this->getProperties();
         if ($this->getProperty('hide_replies')) {
             $options[] = 'hide_replies';
         }
         $values['options'] = $options;
         $form->populate($values);
     }
     return $form;
 }
 public function getConfigForm($populate = false)
 {
     $form = new Stuffpress_Form();
     // Add the username element
     $element = $form->createElement('text', 'username', array('label' => 'Username', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $element->setDescription('<div class="help">This is either your Google username, or a very long number. Depending if you have activated or not the pretty profile URL feature. In either case, just look <a href="http://www.google.com/profiles/me">here</a> and use the string appearing after the http://www.google.com/profiles/.');
     $form->addElement($element);
     // Populate
     if ($populate) {
         $values = $this->getProperties();
         $form->populate($values);
     }
     return $form;
 }
Exemple #7
0
	public function getConfigForm($populate=false) {
		$form = new Stuffpress_Form();
		
		// Add default username element
		$label	 = $this->getServiceName(). " username";
		$element = $form->createElement('text', 'username', array('label' => $label , 'decorators' => $form->elementDecorators));
		$element->setRequired(true);
		$form->addElement($element);  
		
		if($populate) {
			$form->populate($this->getProperties());
		}

		return $form;
	}
Exemple #8
0
 public function getConfigForm($populate = false)
 {
     $form = new Stuffpress_Form();
     $element = $form->createElement('text', 'username', array('label' => 'Username', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $form->addElement($element);
     $element = $form->createElement('text', 'userid', array('label' => 'User ID', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $form->addElement($element);
     $options = array();
     if ($this->getPropertyDefault('hide_content')) {
         $options[] = 'hide_content';
     }
     $e = new Zend_Form_Element_MultiCheckbox('options', array('decorators' => $form->elementDecorators, 'multiOptions' => array('hide_content' => 'Hide Scribd description (only title will be shown)')));
     $e->setLabel('Options');
     $e->setValue($options);
     $form->addElement($e);
     if ($populate) {
         $options = array();
         $values = $this->getProperties();
         if ($this->getProperty('hide_content')) {
             $options[] = 'hide_content';
         }
         $values['options'] = $options;
         $form->populate($values);
     }
     return $form;
 }
 public function getConfigForm($populate = false)
 {
     $form = new Stuffpress_Form();
     // Add the blog url element
     $element = $form->createElement('text', 'url', array('label' => 'URL of your shared items', 'decorators' => $form->elementDecorators));
     $element->setRequired(true);
     $form->addElement($element);
     if ($populate) {
         $form->populate($this->getProperties());
     }
     return $form;
 }