Пример #1
0
 public function getChildTabsUnderLinks($instance)
 {
     global $ld;
     $fb_data_tpl = Utils::getPluginViewDirectory('facebook') . 'facebook.inline.view.tpl';
     $child_tabs = array();
     //Links from friends
     $fltab = new WebappTab("links_from_friends", 'Links', 'Links posted on your wall', $fb_data_tpl);
     $fltabds = new WebappTabDataset("links_from_friends", $ld, "getLinksByFriends", array($instance->network_user_id));
     $fltab->addDataset($fltabds);
     array_push($child_tabs, $fltab);
     return $child_tabs;
 }
Пример #2
0
 public function getChildTabsUnderLinks($instance)
 {
     $ld = DAOFactory::getDAO('LinkDAO');
     $twitter_data_tpl = Utils::getPluginViewDirectory('twitter') . 'twitter.inline.view.tpl';
     $child_tabs = array();
     //Links from friends
     $fltab = new WebappTab("links-friends", 'Links From Friends', 'Links your friends posted', $twitter_data_tpl);
     $fltabds = new WebappTabDataset("links", $ld, "getLinksByFriends", array($instance->network_user_id));
     $fltab->addDataset($fltabds);
     array_push($child_tabs, $fltab);
     //Links from favorites
     /* $lftab = new WebappTab("links-favorites", 'Links From Favorites', 'Links in posts you favorited');
        $lftabds = new WebappTabDataset("links", $ld, "getLinksByFriends", array($instance->network_user_id));
        $lftab->addDataset($lftabds);
        array_push($child_tabs, $lftab);
        */
     //Photos
     $ptab = new WebappTab("links-photos", "Photos", 'Photos your friends have posted', $twitter_data_tpl);
     $ptabds = new WebappTabDataset("links", $ld, "getPhotosByFriends", array($instance->network_user_id));
     array_push($child_tabs, $ptab);
     return $child_tabs;
 }
Пример #3
0
 public function getChildTabsUnderPosts($instance)
 {
     $fb_data_tpl = Utils::getPluginViewDirectory('facebook') . 'facebook.inline.view.tpl';
     $child_tabs = array();
     //All tab
     $alltab = new WebappTab("all_facebook_posts", "All", '', $fb_data_tpl);
     $alltabds = new WebappTabDataset("all_facebook_posts", 'PostDAO', "getAllPosts", array($instance->network_user_id, $instance->network, 15, "#page_number#"), 'getAllPostsIterator', array($instance->network_user_id, $instance->network, GridController::MAX_ROWS), false);
     $alltab->addDataset($alltabds);
     array_push($child_tabs, $alltab);
     // Most replied-to tab
     $mrttab = new WebappTab("mostreplies", "Most replied-to", "Posts with most replies", $fb_data_tpl);
     $mrttabds = new WebappTabDataset("most_replied_to_posts", 'PostDAO', "getMostRepliedToPosts", array($instance->network_user_id, $instance->network, 15, '#page_number#'));
     $mrttab->addDataset($mrttabds);
     array_push($child_tabs, $mrttab);
     //Questions tab
     $qtab = new WebappTab("questions", "Inquiries", "Inquiries, or posts with a question mark in them", $fb_data_tpl);
     $qtabds = new WebappTabDataset("all_facebook_posts", 'PostDAO', "getAllQuestionPosts", array($instance->network_user_id, $instance->network, 15, "#page_number#"));
     $qtab->addDataset($qtabds);
     array_push($child_tabs, $qtab);
     return $child_tabs;
 }