This is the email I just sent to Tumblr for help on this issue. If any of you know anything about this, I would GREATLY GREATLY appreciate it!
For awhile now I've been trying to display my blog on my website, but I can not seem to find anyway to do it. I mean I've tried everything. From the JS, and incrementing it through PHP.
<?php
$location = isset( $_REQUEST['nav'] ) ? $_REQUEST['nav'] : '';
$page = isset( $_POST['page'] ) ? $_POST['page'] : '0';
if (isset($_POST['next'])) {
$page++; }
else if (isset($_POST['previous'])) {
$page--;}
if ($page === 0) {
echo "<script src='http://myblog.tumblr.com/tagged/" . $_REQUEST["tag"] . "/js'></script>"; }
if ($page === 1) {
$page++;
echo "<script src='http://myblog.tumblr.com/tagged/" . $_REQUEST["tag"] . "/page/" . $page . "/js'></script>"; }
else {
echo "<script src='http://myblog.tumblr.com/tagged/" . $_REQUEST["tag"] . "/page/" . $page . "/js'></script>"; }
?>
<form method="POST">
<div class="btn-group">
<input type="submit" name="next" class="btn btn-large" value="Click For Next Page" />
</div>
<input type="hidden" name="navigation" value="location" />
<input type="hidden" name="page" value="<?php echo $page ?>" />
<input type="hidden" name="navigation" value="<?php echo $location; ?>" />
</form>
But you only really do that if you have a "tag", and I want to display all of my posts. So I even tried your JSON.
<script type='text/javascript' src='http://myblog.tumblr.com/api/read/json'></script>
<?php
$offset = 9;
$page = 1;
$placeholder = 1;
if (isset($_GET['post']) && is_numeric($_GET['post'])) {
$page = $_GET['post'];}
$start_number = ($page - 1) * $offset;
$end_number = $start_number + 9;
$num = $start_number;
while ($num <= $end_number) {
echo "<img border='0' style='margin-bottom:15px;' id='ji-tumblr-photo-myblog-" . $placeholder . "' src='' alt='' />\n";
echo "<script type='text/javascript'> document.getElementById('ji-tumblr-photo-myblog-" . $placeholder . "').setAttribute('src', tumblr_api_read.posts[" . $num . "]['photo-url-500']);</script><br />\n";
$num++;
$placeholder++;}
echo sprintf('<a href="/index.php?page=testing&post=%s">More</a>', $page + 1);
?>
But with the JSON you can only display the last few posts, and can't access all of them! So you can see my struggle, and all I want is a widget for my website. I post all of my photography, videos, life on Tumblr. I love Tumblr! PLEASE PLEASE PLEASE, help me in anyway possible.
Cheers,
Jade Allen Cook
You could run your Tumblr under your own (sub) domain.
You could copy all your posts to your own database. You could use your Tumblr’s sitemap to get all post URLs: http://MYBLOG.tumblr.com/sitemap.xml. Then you could scrape/download your posts.
You could run a tumblelog on your own site and duplicate all your posts to Tumblr via their API.
The last way should be preferred. That way it’s your content. Tumblr might will be gone sometime and with it all your content/URLs. But if you use your own site/server as base, you will have no problem if Tumblr goes evil. You can also easily move your content to the next hot centralized service that will appear.