$loginId = $gSessionLogin->id; $loginName = $gSessionLogin->name; if (is_null($loginId)) { trigger_error("Error : NULL login_id on user dashboard", E_USER_ERROR); } $activityDao = new \com\indigloo\sc\dao\Activity(); $feedDataObj = $activityDao->getUserFeeds($loginId, 50); $socialGraphDao = new \com\indigloo\sc\dao\SocialGraph(); $followers = $socialGraphDao->getFollowers($loginId, 5); $followings = $socialGraphDao->getFollowing($loginId, 5); $options = array("ui" => "feed", "image" => true); $followersData = GraphHtml::getTable($loginId, $followers, 1, $options); $options = array("link" => "/user/dashboard/follower.php", "size" => sizeof($followers), "title" => "Followers"); $followersHtml = GraphHtml::getDashWrapper($followersData, $options); $options = array("ui" => "feed", "image" => true); $followingsData = GraphHtml::getTable($loginId, $followings, 2, $options); $options = array("link" => "/user/dashboard/following.php", "size" => sizeof($followings), "title" => "Followings"); $followingsHtml = GraphHtml::getDashWrapper($followingsData, $options); $htmlObj = new \com\indigloo\sc\html\Activity(); $activityHtml = $htmlObj->getHtml($feedDataObj); ?> <!DOCTYPE html> <html> <head> <title> Activities - <?php echo $loginName; ?> </title>
use com\indigloo\sc\html\SocialGraph as GraphHtml; use com\indigloo\sc\html\Lists as ListHtml; $headerHtml = UserHtml::getPubHeader($userDBRow); $content = PostHtml::getImageGrid($postDBRows); $count = $ucounters["post_count"]; $options = array("title" => "Items", "tab" => "items", "max" => 8, "size" => $gNumDBRows["items"]); $itemsHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); $content = PostHtml::getImageGrid($likeDBRows); $count = $ucounters["like_count"]; $options = array("title" => "Likes", "tab" => "likes", "max" => 8, "size" => $gNumDBRows["likes"]); $likesHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); $content = GraphHtml::getTable($loginId, $followers, 1, $followerUIOptions); $count = $ucounters["follower_count"]; $options = array("title" => "Followers", "tab" => "followers", "max" => 5, "size" => $gNumDBRows["followers"]); $followersHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); $content = GraphHtml::getTable($loginId, $followings, 2, $followingUIOptions); $count = $ucounters["following_count"]; $options = array("title" => "Followings", "tab" => "followings", "max" => 5, "size" => $gNumDBRows["followings"]); $followingsHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); $htmlActivityObj = new \com\indigloo\sc\html\Activity(); $activityHtml = $htmlActivityObj->getHtml($feedDataObj); //reset content $content = ""; foreach ($listDBRows as $listDBRow) { $content .= ListHtml::getPubWidget($listDBRow); } $count = $ucounters["list_count"]; $options = array("title" => "Lists", "tab" => "lists", "max" => 4, "size" => $gNumDBRows["lists"]); $listHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); ?>