=========================== */ ?> getPosts($tumble->getPostsNumber()); if ($tumble->contarRegistros()>0) { while($register = mysql_fetch_assoc($rs)) { $output = handleNode($register); $theType = type2Text($register["type"]); switch($theType) { case 'quote': $quote[] = $output; continue; case 'conversation': $conversation[] = $output; continue; case 'url': $link[] = $output; continue; case 'photo': $photo[] = $output; continue; case 'post': $regular[] = $output; continue; case 'video': $video[] = $output; continue; } } } function handleNode($node) { global $user, $tumble, $conf; $dateTmp = null; $formatedDate = gmdate("M d", strtotime($node["date"]) + transform_offset($conf->offsetTime)); $output = array(); $output['url'] = $tumble->getPermalink($node["id_post"]); $output['date'] = $formatedDate; $theType = type2Text($node["type"]); switch($theType) { case 'quote': $output['quote'] = $node["description"]; $output['source'] = $node["title"]; break; case 'conversation': $output['lines'] = $tumble->formatConversation($node["description"]); break; case 'url': $node["title"] = (empty($node["title"]))? $node["url"] : $node["title"]; $output['text'] = $node["title"]; $output['link'] = $node["url"]; break; case 'photo': $fileName = "uploads/".getFileName($node["url"]); $x = @getimagesize($fileName); if ($x[0] > 500) { $photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$node["url"]; } else { $photoPath = str_replace("../", $conf->urlGelato."/", $node["url"]); } $output['caption'] = $node["description"]; $output['photo'] = $photoPath; break; case 'post': $output['title'] = $node["title"]; $output['body'] = $node["description"]; break; case 'video': $output['caption'] = $node["description"]; $temp = $tumble->getVideoPlayer($node["url"]); $patterns[0] = "/width='[0-9]+'/"; $patterns[1] = "/height='[0-9]+'/"; $replace[0] = "width='100'"; $replace[1] = "height='75'"; $embed = preg_replace($patterns, $replace, $temp); $output['embed'] = $embed; } return $output; } ?>
" /> "/>