--- createcontentblock.module 2009-05-01 19:45:36.000000000 +0200 +++ createcontentblock.module.new 2009-09-17 17:57:36.000000000 +0200 @@ -137,11 +137,20 @@ function createcontentblock_form_init() function createcontentblock_links($init) { $links = array(); if (variable_get('createcontentblock_include_content_management', TRUE) && user_access('administer nodes')) { - $links[] = l(t('Content management'), 'admin/content/content'); + $links[] = l(t('Content management'), 'admin/content/node'); } asort($init['options']); + + if (isset($init['subscribe_nid'])) { + $links[] = theme('createcontentblock_link', t('Subscribe to Add Content to this Group'), 'og/subscribe/'. $init['subscribe_nid'], array(), 'destination=node/'. $init['subscribe_nid']); + } + foreach ($init['options'] as $type => $name) { - $links[] = theme('createcontentblock_link', $name, 'node/add/'. $type); + if (isset($init['group_nid'])) { + $links[] = theme('createcontentblock_link', $name, 'node/add/'. $type, 'gids[]='.$init['group_nid']); + } else { + $links[] = theme('createcontentblock_link', $name, 'node/add/'. $type); + } } return theme('item_list', $links); } @@ -288,6 +297,6 @@ function theme_createcontentblock_og_gro * @return * The HTML formatted link. */ -function theme_createcontentblock_link($title, $path) { - return l($title, $path); +function theme_createcontentblock_link($title, $path, $query=null) { + return l($title, $path, array('query'=>$query)); }