Skip to content

Instantly share code, notes, and snippets.

@sguzik
Created November 7, 2011 19:44
Show Gist options
  • Save sguzik/1345934 to your computer and use it in GitHub Desktop.
Save sguzik/1345934 to your computer and use it in GitHub Desktop.
Psudo Code Description
//Psudo Code Description
$url = LOAD Tumblr Posts from API
$xml = CREATE ARRAY from $url
$i = 0 //create a counter
foreach( $xml->ONEPOST as $post ){ //create loop to process individual posts
if ( $i LESS THAN 1 ) {
if ( POST_TYPE is 'regular') {
ALL THE THINGS YOU NEED TO DO TO DISPLAY TEXTPOSTS
} elseif ( POST_TYPE is 'photo' ) {
ALL THE THINGS YOU NEED TO DO TO DISPLAY TEXTPOSTS
} elseif ( ETC ) {
ETC
} else {
say YOU MESSED UP!
}
$i++; //or, make i bigger
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment