diff --git a/campcaster/src/modules/htmlUI/var/html/ui_browser.php b/campcaster/src/modules/htmlUI/var/html/ui_browser.php index 9097aeda7..207899273 100644 --- a/campcaster/src/modules/htmlUI/var/html/ui_browser.php +++ b/campcaster/src/modules/htmlUI/var/html/ui_browser.php @@ -413,7 +413,7 @@ if ($uiBrowser->userid) { case "twitter.settings": $Smarty->assign('dynform', $uiBrowser->TWITTER->getSettingsForm()); - $Smarty->assign('twitter', array('samplefeed' => $uiBrowser->TWITTER->getFeed())); + $Smarty->assign('twitter', array('samplefeed' => $uiBrowser->TWITTER->getFeed(true))); $Smarty->assign('act', $action); break; } diff --git a/campcaster/src/modules/htmlUI/var/ui_twitter.class.php b/campcaster/src/modules/htmlUI/var/ui_twitter.class.php index 04bc4af69..833cbccd8 100644 --- a/campcaster/src/modules/htmlUI/var/ui_twitter.class.php +++ b/campcaster/src/modules/htmlUI/var/ui_twitter.class.php @@ -15,6 +15,16 @@ class uiTwitter { 'type' => 'hidden', 'constant' => 'twitter.saveSettings' ), + array( + 'element' => 'twitter-account-fieldset-open', + 'type' => 'static', + 'text' => '
' + ), + array( + 'element' => 'twitter-config-fieldset-open', + 'type' => 'static', + 'text' => '' + ), array( 'element' => 'Submit', 'type' => 'submit', @@ -198,23 +228,23 @@ class uiTwitter { $this->Base->_retMsg('Twitter settings saved.'); } - public function getFeed($p_withSample = false) + public function getFeed($p_useSampledata = false) { $settings = $this->getSettings(); - $whatsplaying = $this->getWhatsplaying($settings['twitter-offset']); - if (!$p_withSample && !$whatsplaying) { - return; - } - - $whatsplaying = @array_merge( - array( + if ($p_useSampledata) { + $whatsplaying = array( "tracktitle" => "Gimme Shelter", "trackartist" => "The Rolling Stones", "playlisttitle" => "The Blues Hour" - ), - $whatsplaying - ); + ); + } else { + $whatsplaying = $this->getWhatsplaying($settings['twitter-offset']); + } + + if (!$whatsplaying) { + return; + } //////////////////////////////////////////////////////////////////////// // create twitter tweet sample