".$legend.""; } else { $list_type = "div"; $legend = "

".$legend."

"; } $limit = $vars['limit']; if (!$limit) $limit = 5; // get the current page's owner $page_owner = page_owner_entity(); if ($page_owner === false || is_null($page_owner)) { $page_owner = $_SESSION['user']; set_page_owner($_SESSION['guid']); } $whos_portfolio = $_SESSION['guid']; if (get_input('username')) { $user = get_user_by_username(get_input("username")); if ($user) { $whos_portfolio = $user->guid; } } $blog_posts = get_entities('object', 'blog', $whos_portfolio, '', 10); if (is_array($blog_posts) && sizeof($blog_posts) > 0) { $posts_div = "<".$list_type.">"; $posts_div .= $legend; $posts_div .= ""; $posts_div .= ""; } echo $posts_div; ?>