• Resolved Su

    (@sugeneris)


    This follows from the recent thread about scheduled posts. Tumblr does now support explicit scheduling (not sure when it happened), although they haven’t seen fit to actually document the API for it.

    So, to schedule something it just goes into queue status as already happens, but you set a publish_on value rather than date (via this Tumblr API Google Group thread). This turned out to be a very small edit in tumblr-crosspostr.php, eg.:

    473d472
    <             'date' => get_post_time('Y-m-d H:i:s', true, $post_id) . ' GMT',
    476a476,482
    >
    >         if ($state == 'queue') {
    >             $common_params['publish_on'] = get_post_time('Y-m-d H:i:s', true, $post_id) . ' GMT';
    >         } else {
    >             $common_params['date'] = get_post_time('Y-m-d H:i:s', true, $post_id) . ' GMT';
    >         }
    >

    I’ve already tested this with a couple of items, and it works, but there’s one (non-blocking, I think?) issue:

    Because WordPress doesn’t lock down pretty permalinks until after publish, the content source gets set as something like http://example.com/?post_type=[POST_TYPE]&p=[POST_ID] WordPress does resolve these to your pretty URLs upon visit, so it doesn’t break anything, but it’s a bit less than ideal. (The same issue comes up if you’re using something like the Yoast SEO feature that tacks on the “originally posted at yoursite.com” footer.)

    I’m not sure if there’s any way to resolve this since the Tumblr post is created at time of scheduling and the content source value isn’t editable later, at least not through the browser interface. On the other hand, it’s not a huge problem since strictly speaking those actually are the “real” URLs of the WP posts.

    Another option could be to not schedule these posts at Tumblr and instead just do an immediate publish when the actual WordPress one goes out, but I have no immediate idea how feasible/complicated that would be to implement, and I’m guessing Meitar might object to that as being against concept.

    https://wordpress.org/plugins/tumblr-crosspostr/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Meitar

    (@meitar)

    Nice work! I don’t have the bandwidth to look into this right now but referenced your diff here on the issue tracker’s equivalent post about this issue. Thanks for looking into this and doing the initial legwork to patch.

    Another option could be to not schedule these posts at Tumblr and instead just do an immediate publish when the actual WordPress one goes out, but I have no immediate idea how feasible/complicated that would be to implement, and I’m guessing Meitar might object to that as being against concept.

    Well, the bigger problem (and the reason it is “against the concept”) is because even unpublished posts are still “real” posts. Not sending them over to Tumblr would mean, for instance, not sending drafts over, because those aren’t published, either. :\ It might also mean implementing some way of maintaining state (i.e., having Tumblr Crosspostr “remember”) which posts made it over to Tumblr and which didn’t, beyond simply referencing their Tumblr IDs. It kind of seems like more trouble than it’s worth.

    Thread Starter Su

    (@sugeneris)

    Commented at Github, where it seems more appropriate for this to continue. Guess you can close this out for cleanliness and anyone interested can follow along there.

    I edited the tumblr-crosspostr.php for now but will this be implemented in the plugin?

    Plugin Author Meitar

    (@meitar)

    I edited the tumblr-crosspostr.php for now but will this be implemented in the plugin?

    It may be implemented in the plugin faster if you share your patch. I’m no longer actively developing this plugin but I will happily integrate bugfixes/feature enhancement, etc. contributions from coders such as yourself. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Proper scheduled post translation (work in progress)’ is closed to new replies.