Index: taxonews.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonews/taxonews.module,v
retrieving revision 1.10.8.2
diff -u -r1.10.8.2 taxonews.module
--- taxonews.module	12 Aug 2007 11:02:39 -0000	1.10.8.2
+++ taxonews.module	14 Aug 2007 07:09:46 -0000
@@ -24,6 +24,7 @@
 class Taxonews
   {
   const VERSION = '$Id: taxonews.module,v 1.10.8.2 2007/08/12 11:02:39 fgm Exp $';
+  const PATH_SETTINGS = 'admin/build/settings/taxonews';
 
   /**
    * Names of persistent variables
@@ -235,6 +236,21 @@
         . 'FROM {term_node} tn '
         . 'WHERE tn.tid = %d and tn.status = 1 ';
     $terms = Taxonews::getTerms();
+    if (count($terms) == 0)
+      {
+      $module_path = db_result(db_query("SELECT filename FROM {system} WHERE name = 'taxonews' AND type = 'module'"));
+      $module_path = dirname($module_path);
+      drupal_set_message(
+        t('WARNING: You will not be able to configure taxonews blocks until you !configure and !define in the taxonews vocabularies. You might want to refer to !install.',
+          array(
+            '!configure' => l(t('configure taxonews'), Taxonews::PATH_SETTINGS),
+            '!define'    => l(t('define terms'), 'admin/content/taxonomy'),
+            '!install'   => l('INSTALL.txt', "$module_path/INSTALL.txt")
+            )
+          ),
+        'error');
+      unset($module_path);
+      }
     foreach ($terms as $term)
       {
       if (!$showEmpty)
@@ -402,7 +418,7 @@
          . 'FROM {term_data} td '
          . 'WHERE td.vid = %s '
          . 'ORDER BY 2, 1 ';
-      $vids = variable_get(Taxonews::VAR_VOCABULARY, 0);
+      $vids = variable_get(Taxonews::VAR_VOCABULARY, array());
       foreach ($vids as $vid)
         {
         $sq = 'SELECT td.tid, td.name, v.name as vocabulary_name '
@@ -493,7 +509,7 @@
  */
 function taxonews_menu()
   {
-  $items['admin/build/settings/taxonews'] = array
+  $items[Taxonews::PATH_SETTINGS] = array
     (
     'title'            => 'Taxonews',
     'description'      => 'Define the various parameters used by the taxonews module',
