Got It
Ok to use now, but there is one more step.
Don't use this. It's got a nasty bug somewhere.
Ok, I finally have a fix for the problem I posted about on Friday. You have to mess deep in the bowels of Radio.root. Yuck.
Like I mentioned earlier today, the problem is that weblogPostForm() calls publishAllUnpublishedPosts(). I'm not sure why -- you really only want to publish the one that you're currently editing. In my haste to hack in a quick fix by changing the call to updatePagesForPost(), I forgot that you also need to remove the post from weblogData.stats.unpublishedPosts. So I added two new scripts to workspace: publishOneUnpublishedPost() and isPublished().
To use these:
- Follow the instructions here. This gets you on a minimum footing.
- Import the two scripts above.
- (This is the ugly part; if you're shy about mangling script in Radio, you may not want to do this.) Open radio.macros.weblogPostForm. Find the call to radio.weblog.publishAllUnpublishedPosts(adrdata) and replace it with a call to workspace.publishOneUnpublishedPost(adrPostToEdit).
- To test it: make two posts (post only, don't publish at first). Note that they both show up in "Previous 10 posts" as unpublished. Now click the edit button for one or the other. Click the publish button. Note that the post is now published and the other one isn't.
- Hooray. You're done.
- Not quite: the next radio.root update you get will probably wipe out your changes.
I've started a little tool that will do these things for you. Hopefully it pans out...
6:16:38 PM [ permalink ]
|