variable_get('site_name', 'Drupal'))); // Video. // Set "wmode" to prevent z-index issues. see http://kb2.adobe.com/cps/155/tn_15523.html $video = ''; // Build links. $links = array(); $item = menu_get_item('node/add/group'); if ($item['access']) { $links[] = array( 'title' => "". t('Add @type', array('@type' => node_get_types('name', 'group'))), 'href' => 'node/add/group', ); } $item = menu_get_item('members/add'); if ($item['access']) { $links[] = array( 'title' => "". $item['title'], 'href' => 'members/add', ); } $item = menu_get_item('features'); if ($item['access']) { $links[] = array( 'title' => t('Customize features'), 'href' => 'features', ); } $links[] = array( 'title' => t('Documentation & support'), 'href' => 'http://community.openatrium.com', ); // Admin link. $admin = ''; if (spaces_access_admin()) { $link = l(t('customizing the dashboard'), $_GET['q'], array('fragment' => 'block-spaces_dashboard-editor', 'attributes' => array('class' => 'palette-toggle'))); $admin = t('You can remove this block by !customize_dashboard.', array('!customize_dashboard' => $link)); } $block['content'] = theme('atrium_welcome', $video, $links, $admin); return $block; } } /** * Welcome block for members. */ function _atrium_block_welcome_member() { $space = spaces_get_space(); if (user_access('access content') && $space && $space->type === 'og') { $block = array(); $block['subject'] = t('Welcome to @title', array('@title' => $space->title())); // Video. // Set "wmode" to prevent z-index issues. see http://kb2.adobe.com/cps/155/tn_15523.html $video = ''; // Build links. $links = array(); $feature_map = features_get_component_map('node'); foreach (system_admin_menu_block(menu_get_item('node/add')) as $menu_item) { $args = explode('/', $menu_item['href']); $type = str_replace('-', '_', array_pop($args)); if (!empty($feature_map[$type])) { $feature = reset($feature_map[$type]); $menu_item['title'] = t('Add @type', array('@type' => $menu_item['title'])); $menu_item['title'] = "{$menu_item['title']}"; $links[] = $menu_item; } } // Admin link. $admin = ''; if (spaces_access_admin()) { $link = l(t('customizing the dashboard'), $_GET['q'], array('fragment' => 'block-spaces_dashboard-editor', 'attributes' => array('class' => 'palette-toggle'))); $admin = t('You can remove this block by !customize_dashboard.', array('!customize_dashboard' => $link)); } $block['content'] = theme('atrium_welcome', $video, $links, $admin); return $block; } } /** * User starting point block. */ function _atrium_block_account() { global $user; $block = array(); if ($user->uid) { $block['subject'] = theme('user_picture', $user) . check_plain($user->name); $block['content'] = "