links['comment_comments']){ $vars['link_comment'] = l($vars['node']->links['comment_comments']['title'], $vars['node']->links['comment_comments']['href'], array('attributes' => array('class' => $vars['node']->links['comment_comments']['fragment'],'title' => $vars['node']->links['comment_comments']['attributes']['title'] ))); } //comment_add if($vars['node']->links['comment_add']){ $vars['link_comment_add'] = l($vars['node']->links['comment_add']['title'], $vars['node']->links['comment_add']['href'], array('attributes' => array('class' => 'comment-add','title' => $vars['node']->links['comment_add']['attributes']['title'] ))); } //upload_attachments if($vars['node']->links['upload_attachments']){ $vars['link_attachments'] = l($vars['node']->links['upload_attachments']['title'], $vars['node']->links['upload_attachments']['href'], array('attributes' => array('class' => 'attachments','title' => $vars['node']->links['upload_attachments']['attributes']['title'] ))); } //read more if($vars['node']->links['node_read_more']){ $vars['link_read_more'] = l($vars['node']->links['node_read_more']['title'], $vars['node']->links['node_read_more']['href'], array('attributes' => array('class' => $vars['node']->links['node_read_more']['fragment'],'title' => $vars['node']->links['node_read_more']['attributes']['title'] ))); } //statistics_counter if($vars['node']->links['statistics_counter']){ $vars['statistics_counter'] = $vars['node']->links['statistics_counter']['title']; } } function miro_menu_item_link($link) { if (empty($link['localized_options'])) { $link['localized_options'] = array(); } //define a class for each tab //TODO check out the multilang hell.... // $linkclass = mothership_id_safe($link['title']); $linkclass .= " link-" . mothership_id_safe($link['path']); // If an item is a LOCAL TASK, render it as a tab if($link['type'] & MENU_IS_LOCAL_TASK) { $link['title'] = '' . check_plain($link['title']) . ''; $link['localized_options']['html'] = TRUE; $link['localized_options']['attributes'] = array('class' => $linkclass); }else{ // its a standard menu item lets kick in a span class $link['title'] = '' . check_plain($link['title']) . ''; $link['localized_options']['html'] = TRUE; $link['localized_options']['attributes'] = array('class' => $linkclass); } return l($link['title'], $link['href'], $link['localized_options']); } /** * Generate a nice looking byline */ function miro_seed_byline($object) { static $accounts; $output = ''; // This is a comment if (isset($object->cid)) { $date = $object->timestamp; $uid = !empty($object->uid) ? $object->uid : NULL; $name = !empty($object->name) ? $object->name : NULL; } // This is a node else if ($object->nid) { $date = $object->created; $uid = !empty($object->uid) ? $object->uid : NULL; $name = !empty($object->name) ? $object->name : NULL; } // Build output $date = seed_rel_date($date); if ($uid) { if (!isset($accounts[$uid])) { $accounts[$uid] = user_load(array('uid' => $uid)); } if (!empty($accounts[$uid])) { $picture = theme('user_picture', $accounts[$uid]); $username = theme('username', $accounts[$uid]); } } if (empty($username)) { $username = theme('username', $object); } return "
$date
$username $picture"; } function miro_context_links($links) { $output = ''; foreach ($links as $link) { //remove number from user link $link_path = strtolower(preg_replace('/[^a-zA-Z_-]+/', '-', $link['href'])); $linkclass .= " link-" . mothership_id_safe($link_path); $options = $link; $options['html'] = TRUE; $options['attributes']['class'] = isset($link['attributes']['class']) ? $link['attributes']['class'] : 'button' . $linkclass; if (!empty($link['custom'])) { $output .= l('' . $link['title'], $link['href'], $options); } else { $output .= l('+ '. t('Add !type', array('!type' => $link['title'])), $link['href'], $options); } } return $output; }