--- buddylist.module	2007-10-31 11:36:42.000000000 +1100
+++ buddylist.module.mine	2007-10-31 11:37:01.000000000 +1100
@@ -290,6 +290,13 @@
     '#maxlength' => 128,
     '#description' => t('This will be the title for the %buddy list status block. If none is specified, "My %buddy list status" will be used.', buddylist_translation()),
   );
+  $form['block_settings']['buddylist_node_types'] = array(
+    '#type' => 'checkboxes',
+    '#title' => t('Node types to show'),
+    '#default_value' => variable_get('buddylist_node_types', array()),
+    '#options' => node_get_types(),
+  );
+
 
    $form['mail'] = array(
     '#type' => 'fieldset',
@@ -543,7 +550,23 @@
         $keys = array_keys($buddies);
         if (count($keys) > 0) {
           $str_buddies = implode(',', $keys);
-          $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.status, n.type, u.uid, u.name, n.created, n.title FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.status = 1 AND n.uid IN ($str_buddies) ORDER BY n.nid DESC"), 0, variable_get('buddylist_posts_block', 7));
+          
+          // limit for which node types should be displayed
+          $nodetypes=variable_get('buddylist_node_types', array());
+          if( sizeof($nodetypes) >0 ) {
+            foreach($nodetypes as $n => $t) {
+              if($t) {
+                $sn[]="'$n'";
+              }
+            }
+            if (sizeof($sn)>0) {
+              $str_ntypes=" AND n.type IN (".implode($sn,",").") ";
+            }
+          } else {
+            $str_ntypes="";
+          }
+          
+          $result = db_query_range(db_rewrite_sql("SELECT n.type,n.nid, n.status, n.type, u.uid, u.name, n.created, n.title FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.status = 1 AND n.uid IN ($str_buddies) $str_ntypes ORDER BY n.nid DESC"), 0, variable_get('buddylist_posts_block', 7));
 
           if (db_num_rows($result)) {
             $block['subject'] = variable_get('buddylist_block_title', t('My %buddies\' recent posts', buddylist_translation()));
