--- twitter.pages.inc 2009-06-17 16:16:37.000000000 +1200 +++ ../twitter.pages.inc 2009-06-17 16:07:44.000000000 +1200 @@ -216,21 +216,28 @@ $account = $user; } - $form['help'] = array( - '#type' => 'item', - '#value' => t("By clicking on Authorize twitter button you'll be taken to Twitter web site where you will need to login and allow @site to communicate with Twitter on your behalf", array('@site' => variable_get('site_name',''))), - ); - - $form['uid'] = array( - '#type' => 'value', - '#value' => $account->uid, - ); - - $form['submit'] = array( - '#type' => 'submit', - '#value' => t('Authorize twitter'), - ); - + if (variable_get('oauth_twitter_consumer_key', '') == '' || variable_get('oauth_twitter_consumer_secret', '') == '') { + $form['need_setup'] = array( + '#type' => 'item', + '#value' => t('OAuth needs to be setup. '). l('Click here', 'admin/settings/twitter') .t(' to go to the setup form.') + ); + } + else { + $form['help'] = array( + '#type' => 'item', + '#value' => t("By clicking on Authorize twitter button you'll be taken to Twitter web site where you will need to login and allow @site to communicate with Twitter on your behalf", array('@site' => variable_get('site_name',''))), + ); + + $form['uid'] = array( + '#type' => 'value', + '#value' => $account->uid, + ); + + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Authorize twitter'), + ); + } return $form; }