username; if (!$page_owner) { $page_owner = $logged_in_user; } // so we know if the user is looking at their own, everyone's or all friends $filter_context = $vars['context']; // get the object type $type = $vars['type']; // create an empty string to start with $new_button = ''; // generate a list of default tabs $default_tabs = array( 'all' => array( 'title' => elgg_echo('all'), 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : "{$vars['url']}mod/$type/all.php", 'selected' => ($filter_context == 'everyone'), ), 'mine' => array( 'title' => elgg_echo('mine'), 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "{$vars['url']}pg/$type/$username", 'selected' => ($filter_context == 'mine'), ), 'friend' => array( 'title' => elgg_echo('friends'), 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "{$vars['url']}pg/$type/$username/friends", 'selected' => ($filter_context == 'friends'), ), ); // determine if using default or overwritten tabs $tabs = (isset($vars['tabs'])) ? $vars['tabs'] : $default_tabs; $tab_list = elgg_view('navigation/tabs', array('tabs' => $tabs)); $title = elgg_echo($type); $title = '