DrupalBin
Submit Code
About
Recent Posts
Fix for Views cumulus: tag_cloud
Fix for Code
sjfgjgjfgidfgh
Code
Code
test.berniecram.com.alias.drushrc.php
Code
provision-deploy error
Create node programmatically with file
Code
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
Fix for Loading handler from code
View
Fix
May 7, 2009 - 5:47pm — Anonymous
<?php
function
advanced_profile_ctools_plugin_api
(
$module
,
$api
)
{
if
(
$module
==
'delegator'
&&
$api
==
'delegator_default'
)
{
$module_path
=
drupal_get_path
(
'module'
,
'advanced_profile'
)
;
return
array
(
'version'
=
>
1
,
'path'
=
>
$module_path
.
'/includes/panels'
)
;
// return array('version' => 1, 'path' => '/includes/panels');
// return array('version' => 1, 'path' => 'includes/panels');
}
}
?>
/sites/all/modules/advanced_profile/includes/panels/advanced_profile.delegator_pages.inc
<?php
// $Id$
/**
* @file
* Holds the export of the task handler for the user page.
*/
/**
* Implementation of hook_default_delegator_pages()
*/
function
advanced_profile_default_delegator_pages
(
)
{
dsm
(
'advanced_profile_default_delegator_pages'
)
;
$handler
=
new
stdClass;
$handler
-
>
disabled
=
FALSE
;
/* Edit this to true to make a default handler disabled initially */
$handler
-
>
api_version
=
1
;
$handler
-
>
name
=
'user_view_panel_context_2'
;
$handler
-
>
task
=
'user_view'
;
$handler
-
>
subtask
=
''
;
$handler
-
>
handler
=
'panel_context'
;
$handler
-
>
weight
=
1
;
$handler
-
>
conf
=
array
(
'autogenerate_title'
=
>
TRUE
,
'title'
=
>
'Panel'
,
'no_blocks'
=
>
FALSE
,
'css_id'
=
>
''
,
'css'
=
>
''
,
'css_cache_file'
=
>
''
,
'contexts'
=
>
array
(
)
,
'relationships'
=
>
array
(
'0'
=
>
array
(
'context'
=
>
'argument_uid_1'
,
'name'
=
>
'node_from_user'
,
'id'
=
>
2
,
'identifier'
=
>
'Profile Node'
,
'keyword'
=
>
'content_profile'
,
'relationship_settings'
=
>
array
(
'type'
=
>
'uprofile'
,
)
,
)
,
)
,
'access'
=
>
array
(
'logic'
=
>
'and'
,
)
,
)
;
$display
=
new
panels_display;
$display
-
>
layout
=
'flexible'
;
$display
-
>
layout_settings
=
array
(
'items'
=
>
array
(
'canvas'
=
>
array
(
'type'
=
>
'row'
,
'contains'
=
>
'column'
,
'children'
=
>
array
(
'0'
=
>
'main'
,
)
,
'parent'
=
>
NULL
,
)
,
'main'
=
>
array
(
'type'
=
>
'column'
,
'width'
=
>
100
,
'width_type'
=
>
'%'
,
'children'
=
>
array
(
'0'
=
>
1
,
'1'
=
>
'main-row'
,
)
,
'parent'
=
>
'canvas'
,
)
,
'main-row'
=
>
array
(
'type'
=
>
'row'
,
'contains'
=
>
'region'
,
'children'
=
>
array
(
'0'
=
>
'center'
,
)
,
'parent'
=
>
'main'
,
)
,
'center'
=
>
array
(
'type'
=
>
'region'
,
'title'
=
>
'Bottom'
,
'width'
=
>
100
,
'width_type'
=
>
'%'
,
'parent'
=
>
'main-row'
,
)
,
'1'
=
>
array
(
'type'
=
>
'row'
,
'contains'
=
>
'column'
,
'children'
=
>
array
(
'0'
=
>
2
,
'1'
=
>
3
,
)
,
'parent'
=
>
'main'
,
)
,
'2'
=
>
array
(
'type'
=
>
'column'
,
'width'
=
>
'225'
,
'width_type'
=
>
'px'
,
'parent'
=
>
'1'
,
'children'
=
>
array
(
'0'
=
>
4
,
)
,
)
,
'3'
=
>
array
(
'type'
=
>
'column'
,
'width'
=
>
'70'
,
'width_type'
=
>
'%'
,
'parent'
=
>
'1'
,
'children'
=
>
array
(
'0'
=
>
5
,
)
,
)
,
'4'
=
>
array
(
'type'
=
>
'row'
,
'contains'
=
>
'region'
,
'children'
=
>
array
(
'0'
=
>
'left'
,
)
,
'parent'
=
>
'2'
,
)
,
'left'
=
>
array
(
'type'
=
>
'region'
,
'title'
=
>
'Left'
,
'width'
=
>
100
,
'width_type'
=
>
'%'
,
'parent'
=
>
'4'
,
)
,
'5'
=
>
array
(
'type'
=
>
'row'
,
'contains'
=
>
'region'
,
'children'
=
>
array
(
'0'
=
>
'right'
,
)
,
'parent'
=
>
'3'
,
)
,
'right'
=
>
array
(
'type'
=
>
'region'
,
'title'
=
>
'Right'
,
'width'
=
>
100
,
'width_type'
=
>
'%'
,
'parent'
=
>
'5'
,
)
,
)
,
)
;
$display
-
>
panel_settings
=
array
(
)
;
$display
-
>
cache
=
array
(
)
;
$display
-
>
title
=
''
;
$display
-
>
hide_title
=
FALSE
;
$display
-
>
content
=
array
(
)
;
$display
-
>
panels
=
array
(
)
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-1'
;
$pane
-
>
panel
=
'center'
;
$pane
-
>
type
=
'node_comment_form'
;
$pane
-
>
subtype
=
'node_comment_form'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'context'
=
>
'relationship_node_from_user_2'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
0
;
$display
-
>
content
[
'new-1'
]
=
$pane
;
$display
-
>
panels
[
'center'
]
[
0
]
=
'new-1'
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-2'
;
$pane
-
>
panel
=
'center'
;
$pane
-
>
type
=
'node_comments'
;
$pane
-
>
subtype
=
'node_comments'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'mode'
=
>
'2'
,
'order'
=
>
'1'
,
'comments_per_page'
=
>
'30'
,
'context'
=
>
'relationship_node_from_user_2'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
1
;
$display
-
>
content
[
'new-2'
]
=
$pane
;
$display
-
>
panels
[
'center'
]
[
1
]
=
'new-2'
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-3'
;
$pane
-
>
panel
=
'left'
;
$pane
-
>
type
=
'author_pane'
;
$pane
-
>
subtype
=
'author_pane'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'image_path'
=
>
''
,
'template_file'
=
>
'advanced_profile_author-pane'
,
'context'
=
>
'argument_uid_1'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
0
;
$display
-
>
content
[
'new-3'
]
=
$pane
;
$display
-
>
panels
[
'left'
]
[
0
]
=
'new-3'
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-4'
;
$pane
-
>
panel
=
'left'
;
$pane
-
>
type
=
'content_fieldgroup'
;
$pane
-
>
subtype
=
'uprofile:group_contact'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'empty'
=
>
''
,
'context'
=
>
'relationship_node_from_user_2'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
1
;
$display
-
>
content
[
'new-4'
]
=
$pane
;
$display
-
>
panels
[
'left'
]
[
1
]
=
'new-4'
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-5'
;
$pane
-
>
panel
=
'left'
;
$pane
-
>
type
=
'content_fieldgroup'
;
$pane
-
>
subtype
=
'uprofile:group_stats'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'empty'
=
>
''
,
'context'
=
>
'relationship_node_from_user_2'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
2
;
$display
-
>
content
[
'new-5'
]
=
$pane
;
$display
-
>
panels
[
'left'
]
[
2
]
=
'new-5'
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-6'
;
$pane
-
>
panel
=
'left'
;
$pane
-
>
type
=
'content_fieldgroup'
;
$pane
-
>
subtype
=
'uprofile:group_links'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'empty'
=
>
''
,
'context'
=
>
'relationship_node_from_user_2'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
3
;
$display
-
>
content
[
'new-6'
]
=
$pane
;
$display
-
>
panels
[
'left'
]
[
3
]
=
'new-6'
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-7'
;
$pane
-
>
panel
=
'left'
;
$pane
-
>
type
=
'profile_visitors'
;
$pane
-
>
subtype
=
'profile_visitors'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'context'
=
>
'argument_uid_1'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
4
;
$display
-
>
content
[
'new-7'
]
=
$pane
;
$display
-
>
panels
[
'left'
]
[
4
]
=
'new-7'
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-8'
;
$pane
-
>
panel
=
'right'
;
$pane
-
>
type
=
'content_field'
;
$pane
-
>
subtype
=
'uprofile:field_about_me'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'label'
=
>
'above'
,
'formatter'
=
>
'default'
,
'context'
=
>
'relationship_node_from_user_2'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
0
;
$display
-
>
content
[
'new-8'
]
=
$pane
;
$display
-
>
panels
[
'right'
]
[
0
]
=
'new-8'
;
$pane
=
new
stdClass;
$pane
-
>
pid
=
'new-9'
;
$pane
-
>
panel
=
'right'
;
$pane
-
>
type
=
'content_field'
;
$pane
-
>
subtype
=
'uprofile:field_interests'
;
$pane
-
>
shown
=
TRUE
;
$pane
-
>
access
=
array
(
)
;
$pane
-
>
configuration
=
array
(
'label'
=
>
'hidden'
,
'formatter'
=
>
'default'
,
'context'
=
>
'relationship_node_from_user_2'
,
'override_title'
=
>
0
,
'override_title_text'
=
>
''
,
)
;
$pane
-
>
cache
=
array
(
)
;
$pane
-
>
style
=
array
(
)
;
$pane
-
>
css
=
array
(
)
;
$pane
-
>
extras
=
array
(
)
;
$pane
-
>
position
=
1
;
$display
-
>
content
[
'new-9'
]
=
$pane
;
$display
-
>
panels
[
'right'
]
[
1
]
=
'new-9'
;
$handler
-
>
conf
[
'display'
]
=
$display
;
return
$handler
;
}
?>
Panels
Submit Fix
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Show summary in full view
<?php function advanced_profile_ctools_plugin_api($module, $api) { if ($module == 'delegator' && $api == 'delegator_default') { $module_path = drupal_get_path('module', 'advanced_profile'); return array('version' => 1, 'path' => $module_path . '/includes/panels'); // return array('version' => 1, 'path' => '/includes/panels'); // return array('version' => 1, 'path' => 'includes/panels'); } } ?> /sites/all/modules/advanced_profile/includes/panels/advanced_profile.delegator_pages.inc <?php // $Id$ /** * @file * Holds the export of the task handler for the user page. */ /** * Implementation of hook_default_delegator_pages() */ function advanced_profile_default_delegator_pages() { dsm('advanced_profile_default_delegator_pages'); $handler = new stdClass; $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ $handler->api_version = 1; $handler->name = 'user_view_panel_context_2'; $handler->task = 'user_view'; $handler->subtask = ''; $handler->handler = 'panel_context'; $handler->weight = 1; $handler->conf = array( 'autogenerate_title' => TRUE, 'title' => 'Panel', 'no_blocks' => FALSE, 'css_id' => '', 'css' => '', 'css_cache_file' => '', 'contexts' => array(), 'relationships' => array( '0' => array( 'context' => 'argument_uid_1', 'name' => 'node_from_user', 'id' => 2, 'identifier' => 'Profile Node', 'keyword' => 'content_profile', 'relationship_settings' => array( 'type' => 'uprofile', ), ), ), 'access' => array( 'logic' => 'and', ), ); $display = new panels_display; $display->layout = 'flexible'; $display->layout_settings = array( 'items' => array( 'canvas' => array( 'type' => 'row', 'contains' => 'column', 'children' => array( '0' => 'main', ), 'parent' => NULL, ), 'main' => array( 'type' => 'column', 'width' => 100, 'width_type' => '%', 'children' => array( '0' => 1, '1' => 'main-row', ), 'parent' => 'canvas', ), 'main-row' => array( 'type' => 'row', 'contains' => 'region', 'children' => array( '0' => 'center', ), 'parent' => 'main', ), 'center' => array( 'type' => 'region', 'title' => 'Bottom', 'width' => 100, 'width_type' => '%', 'parent' => 'main-row', ), '1' => array( 'type' => 'row', 'contains' => 'column', 'children' => array( '0' => 2, '1' => 3, ), 'parent' => 'main', ), '2' => array( 'type' => 'column', 'width' => '225', 'width_type' => 'px', 'parent' => '1', 'children' => array( '0' => 4, ), ), '3' => array( 'type' => 'column', 'width' => '70', 'width_type' => '%', 'parent' => '1', 'children' => array( '0' => 5, ), ), '4' => array( 'type' => 'row', 'contains' => 'region', 'children' => array( '0' => 'left', ), 'parent' => '2', ), 'left' => array( 'type' => 'region', 'title' => 'Left', 'width' => 100, 'width_type' => '%', 'parent' => '4', ), '5' => array( 'type' => 'row', 'contains' => 'region', 'children' => array( '0' => 'right', ), 'parent' => '3', ), 'right' => array( 'type' => 'region', 'title' => 'Right', 'width' => 100, 'width_type' => '%', 'parent' => '5', ), ), ); $display->panel_settings = array(); $display->cache = array(); $display->title = ''; $display->hide_title = FALSE; $display->content = array(); $display->panels = array(); $pane = new stdClass; $pane->pid = 'new-1'; $pane->panel = 'center'; $pane->type = 'node_comment_form'; $pane->subtype = 'node_comment_form'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'context' => 'relationship_node_from_user_2', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 0; $display->content['new-1'] = $pane; $display->panels['center'][0] = 'new-1'; $pane = new stdClass; $pane->pid = 'new-2'; $pane->panel = 'center'; $pane->type = 'node_comments'; $pane->subtype = 'node_comments'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'mode' => '2', 'order' => '1', 'comments_per_page' => '30', 'context' => 'relationship_node_from_user_2', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 1; $display->content['new-2'] = $pane; $display->panels['center'][1] = 'new-2'; $pane = new stdClass; $pane->pid = 'new-3'; $pane->panel = 'left'; $pane->type = 'author_pane'; $pane->subtype = 'author_pane'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'image_path' => '', 'template_file' => 'advanced_profile_author-pane', 'context' => 'argument_uid_1', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 0; $display->content['new-3'] = $pane; $display->panels['left'][0] = 'new-3'; $pane = new stdClass; $pane->pid = 'new-4'; $pane->panel = 'left'; $pane->type = 'content_fieldgroup'; $pane->subtype = 'uprofile:group_contact'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'empty' => '', 'context' => 'relationship_node_from_user_2', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 1; $display->content['new-4'] = $pane; $display->panels['left'][1] = 'new-4'; $pane = new stdClass; $pane->pid = 'new-5'; $pane->panel = 'left'; $pane->type = 'content_fieldgroup'; $pane->subtype = 'uprofile:group_stats'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'empty' => '', 'context' => 'relationship_node_from_user_2', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 2; $display->content['new-5'] = $pane; $display->panels['left'][2] = 'new-5'; $pane = new stdClass; $pane->pid = 'new-6'; $pane->panel = 'left'; $pane->type = 'content_fieldgroup'; $pane->subtype = 'uprofile:group_links'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'empty' => '', 'context' => 'relationship_node_from_user_2', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 3; $display->content['new-6'] = $pane; $display->panels['left'][3] = 'new-6'; $pane = new stdClass; $pane->pid = 'new-7'; $pane->panel = 'left'; $pane->type = 'profile_visitors'; $pane->subtype = 'profile_visitors'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'context' => 'argument_uid_1', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 4; $display->content['new-7'] = $pane; $display->panels['left'][4] = 'new-7'; $pane = new stdClass; $pane->pid = 'new-8'; $pane->panel = 'right'; $pane->type = 'content_field'; $pane->subtype = 'uprofile:field_about_me'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'label' => 'above', 'formatter' => 'default', 'context' => 'relationship_node_from_user_2', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 0; $display->content['new-8'] = $pane; $display->panels['right'][0] = 'new-8'; $pane = new stdClass; $pane->pid = 'new-9'; $pane->panel = 'right'; $pane->type = 'content_field'; $pane->subtype = 'uprofile:field_interests'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'label' => 'hidden', 'formatter' => 'default', 'context' => 'relationship_node_from_user_2', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 1; $display->content['new-9'] = $pane; $display->panels['right'][1] = 'new-9'; $handler->conf['display'] = $display; return $handler; } ?>
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal 5
Drupal 6
HTML
INI
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.
See Also:
Order
Title:
URL:
-1
0
1
Title:
URL:
-1
0
1
Any links you'd like to have associated with the post (Drupal.org issue, Wikipedia article, etc).
File attachments
Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.
Attach new file:
The maximum upload size is
1 MB
. Only files with the following extensions may be uploaded:
jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp phps
.