Fix for Loading handler from code

  1. <?php
  2. function advanced_profile_ctools_plugin_api($module, $api) {
  3.   if ($module == 'delegator' && $api == 'delegator_default') {
  4.     $module_path = drupal_get_path('module', 'advanced_profile');
  5.     return array('version' => 1, 'path' => $module_path . '/includes/panels');
  6.     // return array('version' => 1, 'path' => '/includes/panels');
  7.     // return array('version' => 1, 'path' => 'includes/panels');
  8.   }
  9. }
  10. ?>
  11.  
  12. /sites/all/modules/advanced_profile/includes/panels/advanced_profile.delegator_pages.inc
  13.  
  14. <?php
  15. // $Id$
  16.  
  17. /**
  18.  * @file
  19.  * Holds the export of the task handler for the user page.
  20.  */
  21.  
  22. /**
  23.  * Implementation of hook_default_delegator_pages()
  24.  */
  25. function advanced_profile_default_delegator_pages() {
  26. dsm('advanced_profile_default_delegator_pages');
  27. $handler = new stdClass;
  28. $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
  29. $handler->api_version = 1;
  30. $handler->name = 'user_view_panel_context_2';
  31. $handler->task = 'user_view';
  32. $handler->subtask = '';
  33. $handler->handler = 'panel_context';
  34. $handler->weight = 1;
  35. $handler->conf = array(
  36.   'autogenerate_title' => TRUE,
  37.   'title' => 'Panel',
  38.   'no_blocks' => FALSE,
  39.   'css_id' => '',
  40.   'css' => '',
  41.   'css_cache_file' => '',
  42.   'contexts' => array(),
  43.   'relationships' => array(
  44.     '0' => array(
  45.       'context' => 'argument_uid_1',
  46.       'name' => 'node_from_user',
  47.       'id' => 2,
  48.       'identifier' => 'Profile Node',
  49.       'keyword' => 'content_profile',
  50.       'relationship_settings' => array(
  51.         'type' => 'uprofile',
  52.       ),
  53.     ),
  54.   ),
  55.   'access' => array(
  56.     'logic' => 'and',
  57.   ),
  58. );
  59. $display = new panels_display;
  60. $display->layout = 'flexible';
  61. $display->layout_settings = array(
  62.   'items' => array(
  63.     'canvas' => array(
  64.       'type' => 'row',
  65.       'contains' => 'column',
  66.       'children' => array(
  67.         '0' => 'main',
  68.       ),
  69.       'parent' => NULL,
  70.     ),
  71.     'main' => array(
  72.       'type' => 'column',
  73.       'width' => 100,
  74.       'width_type' => '%',
  75.       'children' => array(
  76.         '0' => 1,
  77.         '1' => 'main-row',
  78.       ),
  79.       'parent' => 'canvas',
  80.     ),
  81.     'main-row' => array(
  82.       'type' => 'row',
  83.       'contains' => 'region',
  84.       'children' => array(
  85.         '0' => 'center',
  86.       ),
  87.       'parent' => 'main',
  88.     ),
  89.     'center' => array(
  90.       'type' => 'region',
  91.       'title' => 'Bottom',
  92.       'width' => 100,
  93.       'width_type' => '%',
  94.       'parent' => 'main-row',
  95.     ),
  96.     '1' => array(
  97.       'type' => 'row',
  98.       'contains' => 'column',
  99.       'children' => array(
  100.         '0' => 2,
  101.         '1' => 3,
  102.       ),
  103.       'parent' => 'main',
  104.     ),
  105.     '2' => array(
  106.       'type' => 'column',
  107.       'width' => '225',
  108.       'width_type' => 'px',
  109.       'parent' => '1',
  110.       'children' => array(
  111.         '0' => 4,
  112.       ),
  113.     ),
  114.     '3' => array(
  115.       'type' => 'column',
  116.       'width' => '70',
  117.       'width_type' => '%',
  118.       'parent' => '1',
  119.       'children' => array(
  120.         '0' => 5,
  121.       ),
  122.     ),
  123.     '4' => array(
  124.       'type' => 'row',
  125.       'contains' => 'region',
  126.       'children' => array(
  127.         '0' => 'left',
  128.       ),
  129.       'parent' => '2',
  130.     ),
  131.     'left' => array(
  132.       'type' => 'region',
  133.       'title' => 'Left',
  134.       'width' => 100,
  135.       'width_type' => '%',
  136.       'parent' => '4',
  137.     ),
  138.     '5' => array(
  139.       'type' => 'row',
  140.       'contains' => 'region',
  141.       'children' => array(
  142.         '0' => 'right',
  143.       ),
  144.       'parent' => '3',
  145.     ),
  146.     'right' => array(
  147.       'type' => 'region',
  148.       'title' => 'Right',
  149.       'width' => 100,
  150.       'width_type' => '%',
  151.       'parent' => '5',
  152.     ),
  153.   ),
  154. );
  155. $display->panel_settings = array();
  156. $display->cache = array();
  157. $display->title = '';
  158. $display->hide_title = FALSE;
  159. $display->content = array();
  160. $display->panels = array();
  161.   $pane = new stdClass;
  162.   $pane->pid = 'new-1';
  163.   $pane->panel = 'center';
  164.   $pane->type = 'node_comment_form';
  165.   $pane->subtype = 'node_comment_form';
  166.   $pane->shown = TRUE;
  167.   $pane->access = array();
  168.   $pane->configuration = array(
  169.     'context' => 'relationship_node_from_user_2',
  170.     'override_title' => 0,
  171.     'override_title_text' => '',
  172.   );
  173.   $pane->cache = array();
  174.   $pane->style = array();
  175.   $pane->css = array();
  176.   $pane->extras = array();
  177.   $pane->position = 0;
  178.   $display->content['new-1'] = $pane;
  179.   $display->panels['center'][0] = 'new-1';
  180.   $pane = new stdClass;
  181.   $pane->pid = 'new-2';
  182.   $pane->panel = 'center';
  183.   $pane->type = 'node_comments';
  184.   $pane->subtype = 'node_comments';
  185.   $pane->shown = TRUE;
  186.   $pane->access = array();
  187.   $pane->configuration = array(
  188.     'mode' => '2',
  189.     'order' => '1',
  190.     'comments_per_page' => '30',
  191.     'context' => 'relationship_node_from_user_2',
  192.     'override_title' => 0,
  193.     'override_title_text' => '',
  194.   );
  195.   $pane->cache = array();
  196.   $pane->style = array();
  197.   $pane->css = array();
  198.   $pane->extras = array();
  199.   $pane->position = 1;
  200.   $display->content['new-2'] = $pane;
  201.   $display->panels['center'][1] = 'new-2';
  202.   $pane = new stdClass;
  203.   $pane->pid = 'new-3';
  204.   $pane->panel = 'left';
  205.   $pane->type = 'author_pane';
  206.   $pane->subtype = 'author_pane';
  207.   $pane->shown = TRUE;
  208.   $pane->access = array();
  209.   $pane->configuration = array(
  210.     'image_path' => '',
  211.     'template_file' => 'advanced_profile_author-pane',
  212.     'context' => 'argument_uid_1',
  213.     'override_title' => 0,
  214.     'override_title_text' => '',
  215.   );
  216.   $pane->cache = array();
  217.   $pane->style = array();
  218.   $pane->css = array();
  219.   $pane->extras = array();
  220.   $pane->position = 0;
  221.   $display->content['new-3'] = $pane;
  222.   $display->panels['left'][0] = 'new-3';
  223.   $pane = new stdClass;
  224.   $pane->pid = 'new-4';
  225.   $pane->panel = 'left';
  226.   $pane->type = 'content_fieldgroup';
  227.   $pane->subtype = 'uprofile:group_contact';
  228.   $pane->shown = TRUE;
  229.   $pane->access = array();
  230.   $pane->configuration = array(
  231.     'empty' => '',
  232.     'context' => 'relationship_node_from_user_2',
  233.     'override_title' => 0,
  234.     'override_title_text' => '',
  235.   );
  236.   $pane->cache = array();
  237.   $pane->style = array();
  238.   $pane->css = array();
  239.   $pane->extras = array();
  240.   $pane->position = 1;
  241.   $display->content['new-4'] = $pane;
  242.   $display->panels['left'][1] = 'new-4';
  243.   $pane = new stdClass;
  244.   $pane->pid = 'new-5';
  245.   $pane->panel = 'left';
  246.   $pane->type = 'content_fieldgroup';
  247.   $pane->subtype = 'uprofile:group_stats';
  248.   $pane->shown = TRUE;
  249.   $pane->access = array();
  250.   $pane->configuration = array(
  251.     'empty' => '',
  252.     'context' => 'relationship_node_from_user_2',
  253.     'override_title' => 0,
  254.     'override_title_text' => '',
  255.   );
  256.   $pane->cache = array();
  257.   $pane->style = array();
  258.   $pane->css = array();
  259.   $pane->extras = array();
  260.   $pane->position = 2;
  261.   $display->content['new-5'] = $pane;
  262.   $display->panels['left'][2] = 'new-5';
  263.   $pane = new stdClass;
  264.   $pane->pid = 'new-6';
  265.   $pane->panel = 'left';
  266.   $pane->type = 'content_fieldgroup';
  267.   $pane->subtype = 'uprofile:group_links';
  268.   $pane->shown = TRUE;
  269.   $pane->access = array();
  270.   $pane->configuration = array(
  271.     'empty' => '',
  272.     'context' => 'relationship_node_from_user_2',
  273.     'override_title' => 0,
  274.     'override_title_text' => '',
  275.   );
  276.   $pane->cache = array();
  277.   $pane->style = array();
  278.   $pane->css = array();
  279.   $pane->extras = array();
  280.   $pane->position = 3;
  281.   $display->content['new-6'] = $pane;
  282.   $display->panels['left'][3] = 'new-6';
  283.   $pane = new stdClass;
  284.   $pane->pid = 'new-7';
  285.   $pane->panel = 'left';
  286.   $pane->type = 'profile_visitors';
  287.   $pane->subtype = 'profile_visitors';
  288.   $pane->shown = TRUE;
  289.   $pane->access = array();
  290.   $pane->configuration = array(
  291.     'context' => 'argument_uid_1',
  292.     'override_title' => 0,
  293.     'override_title_text' => '',
  294.   );
  295.   $pane->cache = array();
  296.   $pane->style = array();
  297.   $pane->css = array();
  298.   $pane->extras = array();
  299.   $pane->position = 4;
  300.   $display->content['new-7'] = $pane;
  301.   $display->panels['left'][4] = 'new-7';
  302.   $pane = new stdClass;
  303.   $pane->pid = 'new-8';
  304.   $pane->panel = 'right';
  305.   $pane->type = 'content_field';
  306.   $pane->subtype = 'uprofile:field_about_me';
  307.   $pane->shown = TRUE;
  308.   $pane->access = array();
  309.   $pane->configuration = array(
  310.     'label' => 'above',
  311.     'formatter' => 'default',
  312.     'context' => 'relationship_node_from_user_2',
  313.     'override_title' => 0,
  314.     'override_title_text' => '',
  315.   );
  316.   $pane->cache = array();
  317.   $pane->style = array();
  318.   $pane->css = array();
  319.   $pane->extras = array();
  320.   $pane->position = 0;
  321.   $display->content['new-8'] = $pane;
  322.   $display->panels['right'][0] = 'new-8';
  323.   $pane = new stdClass;
  324.   $pane->pid = 'new-9';
  325.   $pane->panel = 'right';
  326.   $pane->type = 'content_field';
  327.   $pane->subtype = 'uprofile:field_interests';
  328.   $pane->shown = TRUE;
  329.   $pane->access = array();
  330.   $pane->configuration = array(
  331.     'label' => 'hidden',
  332.     'formatter' => 'default',
  333.     'context' => 'relationship_node_from_user_2',
  334.     'override_title' => 0,
  335.     'override_title_text' => '',
  336.   );
  337.   $pane->cache = array();
  338.   $pane->style = array();
  339.   $pane->css = array();
  340.   $pane->extras = array();
  341.   $pane->position = 1;
  342.   $display->content['new-9'] = $pane;
  343.   $display->panels['right'][1] = 'new-9';
  344.   $handler->conf['display'] = $display;
  345.  
  346.   return $handler;
  347. }
  348. ?>

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.