Index: includes/ooyala.api.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ooyala/includes/ooyala.api.inc,v
retrieving revision 1.7
diff -u -r1.7 ooyala.api.inc
--- includes/ooyala.api.inc	15 Dec 2010 23:19:04 -0000	1.7
+++ includes/ooyala.api.inc	16 Dec 2010 17:34:51 -0000
@@ -76,7 +76,7 @@
 
   // Verify that we're even setup correctly.
   if ($response->data == 'unknown pcode') {
-    drupal_set_message(t('Ooyala configuration invalid. Please check your !settings.', array('!settings' => l('settings', 'admin/settings/ooyala'))), 'error');
+    drupal_set_message(t('The Ooyala configuration appears to be invalid.'), 'error');
     return FALSE;
   }
 
Index: includes/ooyala.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ooyala/includes/ooyala.pages.inc,v
retrieving revision 1.23
diff -u -r1.23 ooyala.pages.inc
--- includes/ooyala.pages.inc	16 Dec 2010 03:40:36 -0000	1.23
+++ includes/ooyala.pages.inc	16 Dec 2010 17:34:51 -0000
@@ -11,6 +11,12 @@
  */
 function ooyala_settings_form(&$form_state) {
   module_load_include('inc', 'ooyala', 'includes/ooyala.api');
+
+  // Display help messages if not yet configured.
+  if (empty($form_state['post'])) {
+    ooyala_settings_messages();
+  }
+
   $form['ooyala_global_pcode'] = array(
     '#type' => 'textfield',
     '#default_value' => variable_get('ooyala_global_pcode', ''),
@@ -116,9 +122,9 @@
   $autopublish_help = '';
   $autopublish_help .= t('Auto-publishing is a tool that you can use to publish content only after it has completed processing by the Ooyala servers. To set this up you need to do the following:');
   $autopublish_help .= theme('item_list', array(
-    t('Visit your <a href="http://www.ooyala.com/backlot/web">Ooyala Backlot account</a>. Under the Account => Developers tab, there is an option for "API Ping URL". Enter the URL <strong>@url</strong>.', array('@url' => url('ooyala/ping', array('absolute' => TRUE)))),
-    t('Visit the <a href="@content-types">content types overview</a>, and click "edit" on any types that contain Ooyala videos. Configure the type to set the default state to unpublished by unchecking the "Published" checkbox underneath the "Workflow settings" fieldset.', array('@content-types' => url('admin/content/types'))),
-    t('Enable this option for auto-publishing (be sure to click the "Save configuration" button).'),
+    t('Ensure the "API Ping URL" <strong>@url</strong> is set up in your <a href="http://www.ooyala.com/backlot/web">Ooyala Backlot account</a> (under the "Account" => "Developers" tab).', array('@url' => url('ooyala/ping', array('absolute' => TRUE)))),
+    t('Set the default of video content to unpublished. Visit the <a href="@content-types">content types overview</a>, and click "edit" on any types that contain Ooyala videos. Uncheck the "Published" checkbox underneath the "Workflow settings" fieldset.', array('@content-types' => url('admin/content/types'))),
+    t('Check this option for auto-publishing and click "Save configuration".'),
   ));
 
   $form['ooyala_autopublish'] = array(
@@ -140,6 +146,36 @@
   return $form;
 }
 
+/**
+ * Print out messages checking the current Ooyala configuration.
+ */
+function ooyala_settings_messages() {
+  if (!variable_get('ooyala_global_pcode', '') || !variable_get('ooyala_global_pcode', '')) {
+    $help = '';
+    $help .= t('Welcome to the Ooyala module! Before you can upload any content you need to configure your site for syncronizing with Ooyala. To do this, you need to both enter and retrieve some information to and from Ooyala.');
+    $steps = array(
+      t('If you haven\'t yet, you need to <a target="_blank" href="http://www.ooyala.com/free_trial">create an Ooyala account</a>. After you have an account, you need to sign-in to the <a target="_blank" href="https://backlot.ooyala.com/backlot/web">Ooyala admin interface (Backlot)</a>.'),
+      t('Once logged in to Backlot, click on the "Account" tab. Then click on the "Developers" tab. Enter the following into "API Ping URL":') . '<br /><strong>' . url('ooyala/ping', array('absolute' => TRUE)) . '</strong><br />' . t('Note that your site must be publicly accessible from the internet for this step to work. If your site is not publicly available, some features of the Ooyala module will not work (auto-publishing), while other features will work but be delayed until cron jobs (thumbnail and attribute retreival).'),
+      t('On that same page, there are two values for "Partner Code" And "Secret Code". Copy and paste these values from Backlot into the fields below.'),
+      t('The Ooyala module is very dependent upon cron jobs, ensure that "Cron maintenance tasks" is set up properly on your site by checking your <a href="!url">site status report</a>.', array('!url' => url('admin/reports/status'))),
+    );
+    $help .= theme('item_list', $steps, NULL, 'ol');
+    drupal_set_message($help);
+  }
+  elseif (ooyala_api_available()) {
+    $details = array();
+    ooyala_api_video_query(array('limit' => 1), $details);
+    if ($details) {
+      drupal_set_message(t('The Ooyala servers have been contacted and your Partner and Secret code have been confirmed.'));
+    }
+    else {
+      drupal_set_message(t('Check that your Partner and Secret code values are correct. These can be obtained from your <a href="https://backlot.ooyala.com/backlot/web">Ooyala Backlot account</a> under the "Account" => "Developers" sub-tab.'), 'error');
+    }
+  }
+  else {
+    drupal_set_message(t('The Ooyala service could not be reached. Check that your server is able to make HTTP requests.'), 'warning');
+  }
+}
 
 /**
  * Element #validate function to ensure the entered directory is writable.
