You are here

function socialfeed_build_the_feed in Social Feed 6

Builds the block using data based on settings.

1 call to socialfeed_build_the_feed()
socialfeed_block in ./socialfeed.module
Implements hook_block().

File

./socialfeed.module, line 615
Module for fetching data from Facebook, Twitter, Youtube, and Foursquare. This module provides block content retrieved from a

Code

function socialfeed_build_the_feed() {
  $displaycount = variable_get('socialfeed_displaycount', FALSE);
  $query = "SELECT * FROM {socialfeed_post} ORDER BY time DESC";
  $sql = db_query_range($query, 0, $displaycount);
  while ($item = db_fetch_object($sql)) {
    $feeditems[] = $item;
  }
  $feedname = variable_get('socialfeed_title', FALSE);
  $facebookprofile = variable_get('socialfeed_facebook_profile_id', FALSE);
  $facebooknamecustom = variable_get('socialfeed_facebook_title', FALSE);
  $twitternamecustom = variable_get('socialfeed_twitter_title', FALSE);
  $youtubenamecustom = variable_get('socialfeed_facebook_title', FALSE);
  $foursquarenamecustom = variable_get('socialfeed_foursquare_title', FALSE);
  return theme('socialfeed_feed_structure', 'socialfeed', $feeditems, $feedname, $facebookprofile, $facebooknamecustom, $twitternamecustom, $youtubenamecustom, $foursquarenamecustom);
}