Active
Project:
Share
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Aug 2009 at 23:04 UTC
Updated:
5 Aug 2009 at 23:04 UTC
output "share this" link on advanced profile panel / content profile context
share this widget must be configured for "content profile" "full-page" "node" display (maybe add a separate widget for this only)
add a new panel custom content with php as input filter and copy/paste the below as its contents, no title needed
$uid = arg(1) ;
$uprofile_node = content_profile_load('uprofile', $uid) ;
$output = '' ;
if ( $shares = share_get_widgets('node', $uprofile_node->type) ) {
foreach ( $shares as $value ) {
$share = share_load($value->share_id, $value->module) ;
if ( ! $share->visible($uprofile_node, FALSE, TRUE) ) {
continue ;
}
$share_clone = drupal_clone($share) ;
$node_clone = drupal_clone($uprofile_node) ;
$share_content = module_invoke($share->module, 'share_render', 'node', $share_clone, $node_clone) ;
if ( ! empty($share_content) ) {
$share_content_value = current($share_content) ;
$output .= $share_content_value['#value'] ;
}
}
}
echo $output ;