Changeset 638
- Timestamp:
- 2008-06-25 04:44:10 (2 months ago)
- Files:
-
- 1 modified
-
plugins/disqus/trunk/disqus.plugin.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/disqus/trunk/disqus.plugin.php
r270 r638 10 10 return array( 11 11 'name' => 'Disqus', 12 'version' => '0. 1',12 'version' => '0.2', 13 13 'url' => 'http://habariproject.org/', 14 14 'author' => 'Habari Community', … … 37 37 public function filter_plugin_config($actions, $plugin_id) 38 38 { 39 if ($plugin_id == $this->plugin_id()) 40 { 39 if ($plugin_id == $this->plugin_id()) { 41 40 $actions[] = _t('Configure'); 42 41 } … … 49 48 switch ($action) { 50 49 case _t('Configure'): 51 $ ui= new FormUI(strtolower(get_class($this)));52 $ ui->add('text', 'username', 'Disqus Username:');53 $ ui->on_success(array($this, 'updated_config'));54 $ ui->out();50 $form = new FormUI(strtolower(get_class($this))); 51 $form->append('text', 'username', 'disqus__username', _t('Disqus Username:')); 52 $form->append('submit', 'save', 'Save'); 53 $form->out(); 55 54 break; 56 55 } … … 58 57 } 59 58 60 public function updated_config($ui)61 {62 return true;63 }64 65 59 public function theme_comments( $theme, $post ) 66 60 { 67 $disqus_username= Options::get( strtolower(get_class($this)) . ':username' );61 $disqus_username= Options::get( 'disqus__username' ); 68 62 if ( !$post->info->comment_disabled && $post->comments->count == 0 && $disqus_username ) { 69 63 $theme->disqus_username= $disqus_username;
