function fetch() { if (isset($_GET['fType']) && $_GET['fType'] != '') { $filterType = $_GET['fType']; } else { $filterType = 'all'; } //$code = '<link rel="stylesheet" href="'.URL_CALLBACK.'?p=cache&type=css&cf=hdFacebook_1235766581.css" type="text/css" charset="utf_8" />'; //$code.='<style type="text/css">'.htmlentities(file_get_contents(PATH_FACEBOOK_STYLES.'/default.css', true)).'</style>'; $code = $this->page->streamStyles(); require_once PATH_CORE . '/classes/home.class.php'; $homeObj = new home($this->db); $code .= '<div id="pageBody">'; $code .= '<div id="pageContent">'; //$code .= '<script type="text/javascript">'.htmlentities(file_get_contents(PATH_SCRIPTS.'/newsroom.js')).'</script>'; //$code .= '<h1>Abe\'s CLIMATE CHANGE APP!*!*!*!*!</h1>'; //$code .= '<a class="btn_1" href="'.SITE_URL.'">Visit the '.SITE_TITLE.' Application</a>'; //$code .= '<br /><br /><hr />'; $code .= '<div id="col_left"><!-- begin left side -->'; $code .= '<div id="featurePanel" class="clearfix">'; $code .= $this->page->buildPanelBar('Featured Stories', '<a href="?p=stories&o=sponsor">More from ' . SITE_SPONSOR . ' editors</a>'); $code .= $homeObj->fetchFeature(); $code .= '</div><!--end "featurePanel"--><div class="panel_1">'; require_once PATH_FACEBOOK . '/classes/actionFeed.class.php'; $actionFeed = new actionFeed(&$this->db, true); require_once PATH_FACEBOOK . '/classes/actionTeam.class.php'; $actionTeam = new actionTeam(&$this->page); //$code .= $actionFeed->fetchFeed('all', 1, $this->siteUserId); $feed = $actionFeed->fetchFeed($filterType, 1, $this->siteUserId); $code .= preg_replace_callback('/<div class="subFilter">.*?<\\/div>/s', array($this, 'changeFilterString'), $feed); $code .= '</div><!-- end panel_1 -->'; $code .= '</div><!-- end col_left -->'; $code .= '<div id="col_right">'; // hack to give fbId to action team class session $actionTeam->setAppTabMode($this->fbUserPageId); $code .= $this->fetchPromo(); $code .= $actionTeam->fetchSidePanel('appTab', 3); $code .= '</div><!-- end col_right -->'; $code .= '</div><!-- end pageContent -->'; $code .= '</div><!-- end pageBody -->'; // Hack this to the app tab $code = preg_replace('/on[cC]lick="[^"]+"/', '', $code); // $code = preg_replace('/<fb:profile-pic[^>]+>/', '', $code); $code = preg_replace('/href="\\/?index.php([^"]+)/', 'href="' . URL_CANVAS . '/$1&referfbid=' . $this->fbUserPageId, $code); $code = preg_replace('/href="\\?p=([^"]+)/', 'href="' . URL_CANVAS . '/?p=$1&referfbid=' . $this->fbUserPageId, $code); $code = preg_replace_callback('/<div class="pages">.*?<\\/div>/s', array($this, 'changeFilterString'), $code); return $code; }
$filter = $_GET['filter']; } else { $filter = 'all'; } if (isset($_GET['filter_userid'])) { $filter_userid = $_GET['filter_userid']; } else { $filter_userid = 0; } if (isset($_GET['filter_challengeid'])) { $filter_challengeid = $_GET['filter_challengeid']; } else { $filter_challengeid = 0; } require_once PATH_FACEBOOK . "/classes/actionFeed.class.php"; $feedObj = new actionFeed(); $code = $feedObj->fetchFeed($filter, $currentPage, $filter_userid, $filter_challengeid, true); break; /* case 'fetchFeedPage': if (isset($_GET['filter'])) $filter=$_GET['filter']; else $filter='all'; if (isset($_GET['filter_userid'])) $filter_userid=$_GET['filter_userid']; else $filter_userid=0; require_once(PATH_FACEBOOK ."/classes/actionFeed.class.php"); $feedObj = new actionFeed();
function fetchChallengesSubmittedFeedBox($currentPage = 1) { require_once PATH_FACEBOOK . '/classes/actionFeed.class.php'; $actionFeed = new actionFeed(&$this->db); $code .= '<input type="hidden" id="pagingFunction" value="fetchFeedPage">'; $code .= '<div class="panel_1">'; $code .= '<div class="panelBar clearfix"> <h2>' . $this->commonTeam['ChallengesSubmittedFeedPanelTitle'] . '</h2> <!-- <div class="bar_link"><a href="#">Post a story</a></div> TODO: put this back?--> </div><!__end "panelBar"__>'; $code .= '<div id="ajaxFeed">'; $code .= $actionFeed->fetchFeedChallengesSubmittedPage(UserInfoTable::getUserid($this->memberid), $currentPage); $code .= '<!-- end ajaxFeed --></div>'; $code .= '</div><!-- end panel_1 -->'; return $code; }
function fetchWeDidThis($challengeid, $currentPage = 1) { require_once PATH_FACEBOOK . '/classes/actionFeed.class.php'; $actionFeed = new actionFeed(&$this->db); $actionFeed->emptyLogMessage = 'No one has done this yet, be the first!'; //$actionFeed->showOnlyChallengeBlog = true; // now implied by filter_challenge being set $code .= '<input type="hidden" id="pagingFunction" value="fetchFeedPage">'; $code .= '<div class="panel_1">'; $code .= '<div class="panelBar clearfix"> <h2>We Did This</h2> <!-- <div class="bar_link"><a href="#">I did this too!</a></div> --> </div><!__end "panelBar"__>'; $code .= '<div id="ajaxFeed">'; $code .= $actionFeed->fetchFeed('challenges', $currentPage, 0, $challengeid, true); $code .= '<!-- end ajaxFeed --></div>'; $code .= '</div><!-- end panel_1 -->'; return $code; }
function fetchFeedBox($filter_userid = 0, $currentPage = 1) { require_once PATH_FACEBOOK . '/classes/actionFeed.class.php'; $actionFeed = new actionFeed(&$this->db); $code .= $actionFeed->fetchFeed('all', $currentPage); return $code; }