The Cadence Blog

'; echo ''; echo ''; } if ($debug_flag === $debug_key) { echo '
'; echo '

PHP Info

'; phpinfo(); echo '
'; } if ('NO' == 'YES') { $refresh_url = $script_info['dirname'] . '/refresh'; $type_url = $script_info['dirname'] . '/type-'; $tag_url = $script_info['dirname'] . '/tag-'; $post_url = $script_info['dirname'] . '/post-'; $page_url = $script_info['dirname'] . '/page-'; $search_url = $script_info['dirname'] . '/search-'; $ext_post_url = get_current_url() . '/post-'; } else { $refresh_url = $_SERVER["SCRIPT_NAME"] . '?refresh=1'; $type_url = $_SERVER["SCRIPT_NAME"] . '?type='; $tag_url = $_SERVER["SCRIPT_NAME"] . '?tag='; $post_url = $_SERVER["SCRIPT_NAME"] . '?id='; $page_url = $_SERVER["SCRIPT_NAME"] . '?page='; $search_url = $_SERVER["SCRIPT_NAME"] . '?search='; $ext_post_url = get_current_url() . '?id='; } echo '
'; $oTumblr = new readTumblrCache($tumblr_username,'phpTumblr',$cache_dir,60*$cache_min); $start = ($current_page - 1) * $posts_per_page; if ($post_id != null) { $oTumblr->getPosts(null,null,null,$post_id); } elseif ($tag_name != null) { $oTumblr->getPosts(null,null,null,null,$tag_name); } else { $oTumblr->getPosts($start,$posts_per_page,$post_type); } $aTumblr = $oTumblr->dumpArray(); if ($debug_flag === $debug_key) { echo '
'; echo '

Start Tumblr Debug Dump

'; echo '

Configured Tumblr ID: cadencesportstherapy

'; echo '
';
	print_r($aTumblr);
	echo '
'; echo '
'; } echo ''; date_default_timezone_set($aTumblr['tumblelog']['timezone']); if(is_array($aTumblr['posts'])) { foreach($aTumblr['posts'] as $post) { $disqus_title = $post['content']['title'] ? $post['content']['title'] : $post['content']['caption']; $post['tag-url'] = $tag_url; preg_match('/(\d+)$/i', $post['url'], $post_id_matches); $temp_post_id = $post_id_matches[0] ? $post_id_matches[0] : $post['id']; $post['local-page-url'] = $post_url . $temp_post_id; $post['external-page-url'] = $ext_post_url . $temp_post_id; $post['comment-username'] = $comment_username; $post['comment-type'] = $comment_type; $post['social-buttons'] = $social_buttons; $post['text-comment'] = $text_comment; $post['text-posted'] = $text_posted; echo '
'; echo get_post_date($post,'inline_date'); switch ($post['type']) { case 'regular': echo get_text_post($post); break; case 'photo': if (is_array($post['content']['photos'])) { if ('slideshow' === 'slideshow') { echo get_photoset_show_post($post); } else { echo get_photoset_gallery_post($post); } } else { echo get_single_photo_post($post); } break; case 'link': echo get_link_post($post); break; case 'video': echo get_video_post($post); break; case 'quote': echo get_quote_post($post); break; case 'audio': echo get_audio_post($post); break; case 'conversation': echo get_chat_post($post); break; default: break; } echo get_post_footer($post); echo '
'; } $total_post_count = $aTumblr['stats']['num-all']; echo '
'; if ($current_page * $posts_per_page < $total_post_count and !$post_id) { echo '

'. $text_older .'

'; } if ($current_page != 1 and !$post_id) { echo '

'. $text_newer .'

'; } echo '
'; echo '
'; } else { echo '

'. $text_error .'

'; } ?>
'; echo '
'; echo '
'; } else { echo '
'; echo ''; } } elseif ($comment_username != null) { if ($comment_type == 'facebook' and !$social_buttons) { echo ''; } else { echo ''; } } ?>

Custom Post Images