? multiple_tabs.patch
? panelsblock.css
Index: panelsblock.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/panelsblock/panelsblock.module,v
retrieving revision 1.1
diff -u -p -r1.1 panelsblock.module
--- panelsblock.module	24 Apr 2007 20:45:02 -0000	1.1
+++ panelsblock.module	17 May 2007 14:55:59 -0000
@@ -1,9 +1,6 @@
 <?php
 // $Id: panelsblock.module,v 1.1 2007/04/24 20:45:02 nedjo Exp $
 
-// Panels layout area used for blocks.
-define('PANELSBLOCK_AREA', 'left');
-
 /**
  * @file
  * Exposes panels as blocks.
@@ -24,7 +21,7 @@ function panelsblock_form_alter($form_id
     $form['panelsblock']['expose_block'] = array(
       '#type' => 'checkbox',
       '#title' => t('Expose as a block'),
-      '#description' => t('Select whether you wish to make this panels page available as a block Note that only the !area area will be displayed.', array('!area' => PANELSBLOCK_AREA)),
+      '#description' => t('Select whether you wish to make this panels page available as a block.'),
       '#default_value' => $blocks[$form['did']['#value']] && $blocks[$form['did']['#value']]['expose'] ? $blocks[$form['did']['#value']]['expose'] : 0,
     );
     $form['panelsblock']['expose_style'] = array(
@@ -45,10 +42,10 @@ function panelsblock_block($op = 'list',
     case 'list':
       $blocks = array();
       $panelsblocks = variable_get('panelsblock', array());
-      foreach ($panelsblocks as $did => $block) {
+      foreach ($panelsblocks as $panel_id => $block) {
         if ($block['expose']) {
-          $panels = panels_load_panels($did);
-          $blocks[$did] = array(
+          $panels = panels_load_panels($panel_id);
+          $blocks[$panel_id] = array(
             'info' => t('@title panel', array('@title' => $panels->title ? $panels->title : $panels->path)),
           );
         }
@@ -75,8 +72,8 @@ function panelsblock_form_submit($form_i
 /**
  * Load a panels block.
  */
-function panelsblock_get_block($did) {
-  $panels = panels_load_panels($did);
+function panelsblock_get_block($panel_id) {
+  $panels = panels_load_panels($panel_id);
   if (!$panels) {
     return MENU_NOT_FOUND;
   }
@@ -96,19 +93,18 @@ function panelsblock_get_block($did) {
   panelsblock_load_content_types();
   foreach ($panels->content as $location => $list) {
     foreach ($list as $area) {
-      if ($area->area == PANELSBLOCK_AREA) {
-        $function = $content_types[$area->type]['callback'] .'_block';
-        if (function_exists($function)) {
-          $content[] = $function($area->configuration);
-        }
+      $function = $content_types[$area->type]['callback'] .'_block';
+      if (function_exists($function)) {
+        $content[] = $function($area->configuration);
       }
     }
   }
   $blocks = variable_get('panelsblock', array());
-  $theme_function = 'panelsblock_block_'. ($blocks[$did] ? $blocks[$did]['style'] : 'default');
+  $theme_function = 'panelsblock_block_'. ($blocks[$panel_id] ? $blocks[$panel_id]['style'] : 'default');
+  drupal_add_css(drupal_get_path('module', 'panelsblock') .'/panelsblock.css');
   return array(
     'subject' => $panels->title ? $panels->title : '',
-    'content' => theme($theme_function, $did, $content),
+    'content' => theme($theme_function, $panel_id, $content),
   );
 }
 
@@ -116,11 +112,11 @@ function panelsblock_get_block($did) {
  * Load the supported content types.
  */
 function panelsblock_load_content_types() {
-  $path = drupal_get_path('module', 'panelsblock') . '/content_types';
+  $path = drupal_get_path('module', 'panelsblock') .'/content_types';
   $files = drupal_system_listing('.inc$', $path, 'name', 0);
 
   foreach($files as $file) {
-    require_once('./' . $file->filename);
+    require_once('./'. $file->filename);
   }
 }
 
@@ -138,14 +134,14 @@ function theme_panelsblock_block_default
 /**
  * Presentation of block in tabs.
  */
-function theme_panelsblock_block_tabs($did, $content) {
+function theme_panelsblock_block_tabs($panel_id, $content) {
   $tabs = array();
 
-  $tabs['panelsblock_'. $did] = array(
+  $tabs['panelsblock_'. $panel_id] = array(
     '#type' => 'tabset',
   );
   foreach ($content as $key => $item) {
-    $tabs['panelsblock_'. $did]['tab_'. $key] = array(
+    $tabs['panelsblock_'. $panel_id]['tab_'. $key] = array(
       '#type' => 'tabpage',
       '#title' => $item['title'],
       '#content' => $item['body'],
