Index: panels_mini/panels_mini.module =================================================================== RCS file: /cvs/drupal/contributions/modules/panels/panels_mini/Attic/panels_mini.module,v retrieving revision 1.1.2.25 diff -u -r1.1.2.25 panels_mini.module --- panels_mini/panels_mini.module 24 May 2008 04:59:05 -0000 1.1.2.25 +++ panels_mini/panels_mini.module 26 May 2008 21:39:36 -0000 @@ -2,16 +2,28 @@ // $Id: panels_mini.module,v 1.1.2.25 2008/05/24 04:59:05 sdboyer Exp $ /** - * Implementation of hook_help() + * @file panels_mini.module + * + * This module provides mini panels which are basically panels that can be + * used within blocks or other panels. + */ + +/** + * Implementation of hook_help(). */ function panels_mini_help($section = '') { switch ($section) { case 'admin/panels/panel-mini': case 'admin/panels/panel-mini/list': - return t('

You can edit existing mini panels, or click add to create a new one.

'); + $output = '

'; + $output .= t('You can edit existing mini panels, or click add to create a new one.'); + $output = '

'; case 'admin/panels/panel-mini/add': - return t('

Mini panels are the small variants of panel pages. Instead of pages, they define blocks.

'); + $output = '

'; + $output .= t('Mini panels are the small variants of panel pages. Instead of pages, they define blocks.'); + $output = '

'; } + return $output; } /** @@ -22,7 +34,7 @@ } /** - * Implementation of hook_menu() + * Implementation of hook_menu(). */ function panels_mini_menu($may_cache) { if ($may_cache) { @@ -312,7 +324,7 @@ } /** - * Page callback to export a panel page to PHP code. + * Page callback to export a mini panel to PHP code. */ function panels_mini_edit_export($panel_mini) { if (!is_object($panel_mini)) { @@ -330,7 +342,7 @@ return $form; } -/* +/** * Page callback to import a mini panel from PHP code. */ function panels_mini_import_mini() { @@ -343,8 +355,8 @@ return drupal_get_form('panels_mini_import_form'); } -/* - * Form for the mini panel import +/** + * Form for the mini panel import. */ function panels_mini_import_form() { $form['panel_mini'] = array( @@ -364,8 +376,8 @@ return $form; } -/* - * Handle the submit button on importing a panel mini. +/** + * Handle the submit button on importing a mini panel. */ function panels_mini_import_form_submit($form_id, $form) { ob_start(); @@ -384,7 +396,6 @@ } } - /** * Handle the add mini panel page. */ @@ -412,8 +423,9 @@ } /** - * Edit a mini panel. Called from both the add and edit points to provide for - * common flow. + * Edit a mini panel. + * + * Called from both the add and edit points to provide for common flow. */ function panels_mini_edit($panel_mini) { if (!is_object($panel_mini)) { @@ -424,7 +436,7 @@ } /** - * The form to edit the settings of a mini panel. + * Form to edit the settings of a mini panel. */ function panels_mini_edit_form($panel_mini) { panels_load_include('common'); @@ -573,7 +585,7 @@ } /** - * Form to edit context features of a mini panel + * Form to edit context features of a mini panel. */ function panels_mini_edit_context($panel_mini, $next = NULL) { if (!empty($_POST)) { @@ -588,7 +600,7 @@ } /** - * The form to edit the context settings of a panel mini + * Form to edit the context settings of a mini panel. */ function panels_mini_context_form($panel_mini, $next = NULL) { drupal_add_css(panels_get_path('css/panels_admin.css')); @@ -631,9 +643,8 @@ return $form; } - /** - * Process submission of the panel mini edit form + * Process submission of the mini panel edit form. */ function panels_mini_context_form_submit($form_id, $form_values) { $panel_mini = $form_values['panel_mini']; @@ -652,7 +663,7 @@ } /** - * Enable a default panel mini + * Enable a default mini panel. */ function panels_mini_enable_page($name = NULL) { $defaults = panels_mini_default_panels(); @@ -666,7 +677,7 @@ } /** - * Disable a default panel. + * Disable a default mini panel. */ function panels_mini_disable_page($name = NULL) { $defaults = panels_mini_default_panels(); @@ -759,8 +770,9 @@ // Allow the rest of the system access to mini panels /** - * Implementation of hook_block(). Expose qualifying mini panels to Drupal's - * block system. + * Implementation of hook_block(). + * + * Expose qualifying mini panels to Drupal's block system. */ function panels_mini_block($op = 'list', $delta = 0, $edit = array()) { if ($op == 'list') { @@ -805,7 +817,7 @@ } /** - * Return each available mini panel available as a sub type + * Return each available mini panel available as a subtype. */ function panels_mini_content_types() { $types = array(); @@ -836,8 +848,7 @@ } /** - * Statically store what IDs have been used so that we can ensure - * all mini panels get a unique id. + * Statically store all used IDs to ensure all mini panels get a unique id. */ function panels_mini_get_id($name) { static $id_cache = array(); @@ -854,7 +865,7 @@ } /** - * Render a mini panel called from a panels display + * Render a mini panel called from a panels display. */ function panels_mini_content($conf, $panel_args, &$contexts) { $mini = panels_mini_load($conf['name']); @@ -885,8 +896,9 @@ return $block; } + /** - * From to add a mini panel to a panel. + * Form to add a mini panel to a panel. */ function panels_mini_add_mini_panel($id, $parents, $conf = array()) { $conf['name'] = $id; @@ -894,8 +906,9 @@ } /** - * Returns an edit form for the mini panel; there isn't much here as most - * of this is set up at mini panel creation time. + * Returns an edit form for the mini panel. + * + * There isn't much here as most of this is set up at mini panel creation time. */ function panels_mini_edit_mini_panel($id, $parents, $conf) { $form['name'] = array( @@ -923,7 +936,7 @@ // Database functions. /** - * Sanitize a mini, to guarantee certain data is as we believe it will be. + * Sanitize a mini panel, to guarantee certain data is as we believe it will be. */ function panels_mini_sanitize($mini) { foreach (array('contexts', 'relationships', 'requiredcontexts') as $id) { @@ -936,7 +949,9 @@ } /** - * Fetch all panel pages in the system. This function does not cache. + * Fetch all mini panels in the system. + * + * This function does not cache. */ function panels_mini_load_all($page_size = 0) { $panels = $dids = array(); @@ -1083,8 +1098,9 @@ } /** - * Export a panel page into PHP code for use in import. The code returned from - * can be used directly in panels_mini_save(). + * Export a mini panel into PHP code for use in import. + * + * The code returned from can be used directly in panels_mini_save(). */ function panels_mini_export($panel_mini, $prefix = '') { $output = ''; @@ -1103,7 +1119,7 @@ } /** - * Get all 'default' panels. + * Get all 'default' mini panels. */ function panels_mini_default_panels() { $panels = module_invoke_all('default_panel_minis'); @@ -1115,7 +1131,7 @@ } /** - * Provide panels mini with its own category + * Provide mini panels with its own category. */ function panels_mini_panels_block_info($module, $delta, &$info) { // Remove the block version of mini panels from being available content types. @@ -1123,7 +1139,7 @@ } /** - * Implementation of hook_panels_exportables() + * Implementation of hook_panels_exportables(). */ function panels_mini_panels_exportables($op = 'list', $panels = NULL, $name = 'foo') { static $all_panels = NULL; Index: panels_export/panels_export.module =================================================================== RCS file: /cvs/drupal/contributions/modules/panels/panels_export/Attic/panels_export.module,v retrieving revision 1.1.2.2 diff -u -r1.1.2.2 panels_export.module --- panels_export/panels_export.module 31 Dec 2007 23:41:43 -0000 1.1.2.2 +++ panels_export/panels_export.module 26 May 2008 21:39:36 -0000 @@ -1,5 +1,6 @@ '; @@ -52,7 +53,7 @@ } /** - * Get cached content + * Get cached content. */ function panels_simple_cache_get_cache($conf, $display, $args, $contexts, $pane = NULL) { $cid = panels_simple_cache_get_id($conf, $display, $args, $contexts, $pane); @@ -69,7 +70,7 @@ } /** - * Set cached content + * Set cached content. */ function panels_simple_cache_set_cache($conf, $content, $display, $args, $contexts, $pane = NULL) { $cid = panels_simple_cache_get_id($conf, $display, $args, $contexts, $pane); @@ -77,8 +78,9 @@ } /** - * clear cached content. Cache clears are always for an entire display, - * regardless of arguments. + * Clear cached content. + * + * Cache clears are always for an entire display, regardless of arguments. */ function panels_simple_cache_clear_cache($display) { $cid = 'panels_simple_cache'; @@ -177,4 +179,3 @@ return $form; } - Index: panels_node/panels_node.install =================================================================== RCS file: /cvs/drupal/contributions/modules/panels/panels_node/Attic/panels_node.install,v retrieving revision 1.1.2.4 diff -u -r1.1.2.4 panels_node.install --- panels_node/panels_node.install 22 Nov 2007 16:43:31 -0000 1.1.2.4 +++ panels_node/panels_node.install 26 May 2008 21:39:36 -0000 @@ -2,7 +2,7 @@ // $Id: panels_node.install,v 1.1.2.4 2007/11/22 16:43:31 merlinofchaos Exp $ /** - * Install the panels node tables + * Install the panels node tables. */ function panels_node_install() { switch ($GLOBALS['db_type']) { @@ -32,7 +32,7 @@ } /** - * Uninstall the panels node tables + * Uninstall the panels node tables. */ function panels_node_uninstall() { // TODO: Delete all actual nodes that are panels_nodes. Index: panels_node/panels_node.module =================================================================== RCS file: /cvs/drupal/contributions/modules/panels/panels_node/Attic/panels_node.module,v retrieving revision 1.1.2.17 diff -u -r1.1.2.17 panels_node.module --- panels_node/panels_node.module 31 Mar 2008 06:16:06 -0000 1.1.2.17 +++ panels_node/panels_node.module 26 May 2008 21:39:36 -0000 @@ -1,18 +1,26 @@ '; @@ -121,7 +129,7 @@ // Node hooks /** - * Implementation of hook_node_info + * Implementation of hook_node_info(). */ function panels_node_node_info() { return array( @@ -135,7 +143,7 @@ } /** - * Implementation of hook_access + * Implementation of hook_access(). */ function panels_node_access($op, $node = NULL) { if (user_access('administer panel-nodes')) { @@ -164,7 +172,7 @@ } /** - * Implementation of hook_form. + * Implementation of hook_form(). */ function panels_node_form(&$node, &$param) { $form['panels_node']['#tree'] = TRUE; @@ -186,7 +194,7 @@ $type = node_get_types('type', $node); $form['title'] = array( - '#type'=> 'textfield', + '#type' => 'textfield', '#title' => check_plain($type->title_label), '#required' => TRUE, '#default_value' => $node->title, @@ -220,7 +228,7 @@ } /** - * Implementation of hook_validate() + * Implementation of hook_validate(). */ function panels_node_validate($node) { if (!$node->nid && empty($node->panels_node['layout'])) { @@ -229,10 +237,11 @@ } /** - * Implementation of hook_load() + * Implementation of hook_load(). * - * Panels does not use revisions for nodes because that would open us up to have completely - * separate displays, and we'd have to copy them, and that's going to be a LOT of data. + * Panels does not use revisions for nodes because that would open us up + * to have completely separate displays, and we'd have to copy them, + * and that's going to be a LOT of data. */ function panels_node_load($node) { // We shortcut this because only in some really drastic corruption circumstance will this @@ -242,7 +251,7 @@ } /** - * Implementation of hook_insert() + * Implementation of hook_insert(). */ function panels_node_insert(&$node) { // Create a new display and record that. @@ -257,7 +266,7 @@ } /** - * Implementation of hook_delete() + * Implementation of hook_delete(). */ function panels_node_delete(&$node) { db_query("DELETE FROM {panels_node} WHERE nid = %d", $node->nid); @@ -267,14 +276,14 @@ } /** - * Implementation of hook_update() + * Implementation of hook_update(). */ function panels_node_update($node) { db_query("UPDATE {panels_node} SET css_id = '%s' WHERE nid = %d", $node->panels_node['css_id'], $node->nid); } /** - * Implementation of hook_view() + * Implementation of hook_view(). */ function panels_node_view($node, $teaser = FALSE, $page = FALSE) { @@ -302,7 +311,7 @@ // Administrative pages /** - * Settings for panel nodes + * Settings for panel nodes. */ function panels_node_settings() { panels_load_include('common'); Index: panels_page/panels_page.module =================================================================== RCS file: /cvs/drupal/contributions/modules/panels/panels_page/Attic/panels_page.module,v retrieving revision 1.1.2.47 diff -u -r1.1.2.47 panels_page.module --- panels_page/panels_page.module 24 May 2008 23:26:16 -0000 1.1.2.47 +++ panels_page/panels_page.module 26 May 2008 21:39:37 -0000 @@ -2,27 +2,41 @@ // $Id: panels_page.module,v 1.1.2.47 2008/05/24 23:26:16 sdboyer Exp $ /** - * Implementation of hook_help() + * @file panels_page.module + * + * This module is the primary implementation pf the Panels API. + * It provides Panel pages that are used to create full page layouts. + * + * Code exclusively used on admin pages can be found in panels_page.admin.inc. + */ + +/** + * Implementation of hook_help(). */ function panels_page_help($section = '') { switch ($section) { case 'admin/panels/panel-page': case 'admin/panels/panel-page/list': - return t('

You may peruse a list of your current panels layouts and edit them, or click add to create a new page.

'); + $output = '

'; + $output .= t('You may peruse a list of your current panels layouts and edit them, or click add to create a new page.'); + $output = '

'; case 'admin/panels/panel-page/add': - return t('

Choose a layout for your new page from the list below.

'); + $output = '

'; + $output .= t('Choose a layout for your new page from the list below.'); + $output = '

'; } + return $output; } /** - * Implementation of hook_perm() + * Implementation of hook_perm(). */ function panels_page_perm() { return array('create panel-pages', 'access all panel-pages'); } /** - * Implementation of hook_menu() + * Implementation of hook_menu(). */ function panels_page_menu($may_cache) { $items = array(); @@ -474,7 +488,6 @@ return array_intersect($panel_page->access, $roles[$account->uid]); } - /** * Get the title for a panel page, given a context. * @@ -569,7 +582,7 @@ // panel page administrative pages /** - * Settings for panel pages + * Settings for panel pages. */ function panels_page_settings() { panels_load_include('common'); @@ -577,7 +590,7 @@ } /** - * Pass-through to admin.inc + * Pass-through to admin.inc. */ function panels_page_passthru() { $args = func_get_args(); @@ -763,8 +776,9 @@ } /** - * Theme function to render our panel as a form. We need to do this so that - * the entire display is inside the form. + * Theme function to render our panel as a form. + * + * We need to do this so that the entire display is inside the form. */ function theme_panels_page_render_form($form) { $form['#children'] = panels_render_display($form['#display']); @@ -799,7 +813,7 @@ } /** - * Fetch a display from a panel pages alternative list of displays + * Fetch a display from a panel pages alternative list of displays. */ function _panels_page_fetch_display(&$panel_page, $id) { $info = $panel_page->displays[$id]; @@ -833,8 +847,7 @@ } /** - * Get a display based on whether it's already in code or needs to be - * loaded + * Get a display based on whether it's already in code or needs to be loaded. */ function _panels_fetch_display_from_info($info) { // If the 'display' is set it's the result of an export/default @@ -883,7 +896,9 @@ // Database functions /** - * Fetch all panel pages in the system. This function does not cache. + * Fetch all panel pages in the system. + * + * This function does not cache. */ function panels_page_load_all($names = array(), $page_size = 0) { $pages = $dids = array(); @@ -931,7 +946,7 @@ } /** - * Load a panel page + * Load a panel page. */ function panels_page_load($pid, $load_display = FALSE) { static $cache = array(); @@ -1098,8 +1113,9 @@ } /** - * Export a panel page into PHP code for use in import. The code returned from - * can be used directly in panels_page_save(). + * Export a panel page into PHP code for use in import. + * + * The code returned from can be used directly in panels_page_save(). */ function panels_page_export($panel_page, $prefix = '') { $output = ''; @@ -1143,7 +1159,7 @@ } /** - * Implementation of hook_panels_exportables() + * Implementation of hook_panels_exportables(). */ function panels_page_panels_exportables($op = 'list', $panels = NULL, $name = 'foo') { static $all_panels = NULL; Index: panels_page/panels_page.admin.inc =================================================================== RCS file: /cvs/drupal/contributions/modules/panels/panels_page/Attic/panels_page.admin.inc,v retrieving revision 1.1.2.45 diff -u -r1.1.2.45 panels_page.admin.inc --- panels_page/panels_page.admin.inc 24 May 2008 05:37:14 -0000 1.1.2.45 +++ panels_page/panels_page.admin.inc 26 May 2008 21:39:36 -0000 @@ -1,8 +1,12 @@ '; @@ -48,8 +56,9 @@ } /** - * Output function for the 'node' content type. Outputs a node - * based on the module and delta supplied in the configuration. + * Output function for the 'node' content type. + * + * Outputs a node based on the module and delta supplied in the configuration. */ function panels_node_legacy_render($conf, $panel_args) { $nid = $conf['nid']; @@ -197,6 +206,7 @@ form_error($form['nid'], t('Invalid node')); } } + /** * Returns the administrative title for a node. */ Index: panels_views/panels_views.module =================================================================== RCS file: /cvs/drupal/contributions/modules/panels/panels_views/Attic/panels_views.module,v retrieving revision 1.1.2.18 diff -u -r1.1.2.18 panels_views.module --- panels_views/panels_views.module 24 May 2008 04:59:04 -0000 1.1.2.18 +++ panels_views/panels_views.module 26 May 2008 21:39:37 -0000 @@ -4,9 +4,9 @@ /** * @file panels_views.module * - * Provides views as panels content, configurable by the administrator. Each - * view provided as panel content must be configured in advance, but once - * configured, building panels with views is a little bit simpler. + * Provides views as panels content, configurable by the administrator. + * Each view provided as panel content must be configured in advance, + * but once configured, building panels with views is a little bit simpler. */ /** @@ -94,7 +94,7 @@ } /** - * Page callback to list panel views and the initial form to add new views. + * Page callback to list view panes and the initial form to add new view panes. */ function panels_views_list_views() { // Run the form first as it may redirect; no point in doing the rest of @@ -176,7 +176,7 @@ } /** - * Form to select a view for creating a new panel view + * Form to select a view for creating a new view pane. */ function panels_views_add_view_form() { $form['view'] = array( @@ -212,7 +212,7 @@ } /** - * Page callback to add a new view pane from an existing view. + * Page callback to edit a view pane. */ function panels_views_edit_view($view_name) { $pv = panels_views_load($view_name); @@ -493,7 +493,7 @@ } /** - * Validate the edit form + * Validate the edit form. */ function panels_views_edit_view_form_validate($form_id, $form_values, $form) { // Test uniqueness of name: @@ -515,7 +515,7 @@ } /** - * Submit the edit form and save the values + * Submit the edit form and save the values. */ function panels_views_edit_view_form_submit($form_id, $form_values) { $form_values['contexts'] = isset($form_values['contexts']) ? $form_values['contexts'] : array(); @@ -525,7 +525,7 @@ } /** - * Provide a form to confirm deletion of a panel view. + * Provide a form to confirm deletion of a view pane. */ function panels_views_delete_confirm($panel_view) { if (!is_object($panel_view)) { @@ -545,7 +545,7 @@ } /** - * Handle the submit button to delete a panel view. + * Handle the submit button to delete a view pane. */ function panels_views_delete_confirm_submit($form_id, $form) { if ($form['confirm']) { @@ -555,7 +555,7 @@ } /** - * Page callback to edit a view pane + * Page callback to import a view pane. */ function panels_views_import_view() { if ($_POST['form_id'] == 'panels_views_edit_view_form') { @@ -569,7 +569,7 @@ } /** - * Form for the panel view import. + * Form for the view pane import. */ function panels_views_import_form() { $form['panel_view'] = array( @@ -590,7 +590,7 @@ } /** - * Handle the submit button on importing a panel view. + * Handle the submit button on importing a view pane. */ function panels_views_import_form_submit($form_id, $form) { ob_start(); @@ -616,7 +616,7 @@ } /** - * Page callback to export a panel view. + * Page callback to export a view pane. */ function panels_views_export_view($pv, $prefix = '') { if (!is_object($pv)) { @@ -640,7 +640,7 @@ } /** - * Enable a default panel view. + * Enable a default view pane. */ function panels_views_enable_page($name = NULL) { $defaults = panels_views_default_panels(); @@ -654,7 +654,7 @@ } /** - * Disable a default panel. + * Disable a default view pane. */ function panels_views_disable_page($name = NULL) { $defaults = panels_views_default_panels(); @@ -721,7 +721,7 @@ } /** - * Render a panel view as a pane. + * Render a view as a pane. */ function panels_views_render($conf, $panel_args, &$contexts) { $pv = panels_views_load($conf['name']); @@ -1001,8 +1001,9 @@ // Panels views helpers. /** - * Get a list of all views as an option array. This really should be included - * with views. + * Get a list of all views as an option array. + * + * This really should be included with views. */ function panels_views_get_all_views() { views_load_cache(); @@ -1027,7 +1028,7 @@ // Database routines /** - * Poor man's schema API + * Poor man's schema API. */ function panels_views_pane_fields() { // Schema version 0 @@ -1233,7 +1234,7 @@ } /** - * Write a panel view to the database. + * Write a view pane to the database. */ function panels_views_save($pv) { $keys = $values = ""; @@ -1289,7 +1290,7 @@ } /** - * Load a panel view from the database. + * Load a view pane from the database. */ function panels_views_load($name) { $pv = db_fetch_object(db_query("SELECT * FROM {panels_views} WHERE name = '%s'", $name)); @@ -1318,7 +1319,7 @@ } /** - * Load all panel views. + * Load all view panes. */ function panels_views_load_all() { $panel_views = array(); @@ -1356,7 +1357,7 @@ } /** - * Get all 'default' panel views. + * Get all 'default' view panes. */ function panels_views_default_panels() { $panels = module_invoke_all('default_panel_views'); @@ -1368,7 +1369,7 @@ } /** - * Delete a panel view. + * Delete a view pane. */ function panels_views_delete($pv) { db_query("DELETE FROM {panels_views} WHERE pvid = %d", $pv->pvid); @@ -1376,8 +1377,10 @@ } /** - * Export a panel view into PHP code; this code is suitable to run through - * eval() and then be used in panels_views_save(). + * Export a view pane into PHP code. + * + * This code is suitable to run through eval() + * and then be used in panels_views_save(). */ function panels_views_export($pv, $prefix = '') { $output = ''; Index: panels_views_legacy/panels_views_legacy.module =================================================================== RCS file: /cvs/drupal/contributions/modules/panels/panels_views_legacy/Attic/panels_views_legacy.module,v retrieving revision 1.1.2.7 diff -u -r1.1.2.7 panels_views_legacy.module --- panels_views_legacy/panels_views_legacy.module 25 Mar 2008 19:35:09 -0000 1.1.2.7 +++ panels_views_legacy/panels_views_legacy.module 26 May 2008 21:39:37 -0000 @@ -2,7 +2,15 @@ // $Id: panels_views_legacy.module,v 1.1.2.7 2008/03/25 19:35:09 sdboyer Exp $ /** - * Implementation of hook_menu() + * @file panels_views_legacy.module + * + * This module exposes nodes directly to the add content interface. + * The panels views module is a recommended replacement that is better suited + * for non-admin users. + */ + +/** + * Implementation of hook_menu(). */ function panels_views_legacy_menu($may_cache) { if ($may_cache) { @@ -19,7 +27,7 @@ } /** - * Page callback for the very short admin page + * Page callback for the very short admin page. */ function panels_views_legacy_admin() { $output = '

'; @@ -45,8 +53,9 @@ } /** - * Output function for the 'views' content type. Outputs a views - * based on the module and delta supplied in the configuration. + * Output function for the 'views' content type. + * + * Outputs a views based on the module and delta supplied in the configuration. */ function panels_views_legacy_render($conf, $panel_args, $contexts) { if (!is_array($contexts)) { @@ -130,6 +139,7 @@ } return $block; } + /** * Return all content types available. */