MoveableType
September 8, 2004 7:54 PM   Subscribe

As a self-imposed php refresher, I've recently been toying around with writing custom movable type submission frontends for a few less web-literate family members (Basically just simplified forms that throw the user input into the MT mysql database). I've got everything ticking along nicely, but none of the submitted entries will show up until I log in and rebuild the site from within movable type. My question: Is there some way to either force a rebuild from a custom form, or automate a rebuild? I've searched the MT forums with no success. I'm using MT 2.64 with minimal knowledge of its inner workings. Any suggestions / pointers / links are appreciated!
posted by adamkempa to Computers & Internet (6 answers total)
 
adamkempa: yes. Easiest way is probably to grab a copy of the url that triggers mt.cgi into doing the rebuild. Then do an httpget on that (with an appropriate user/password thrown in the field).

I'm interested in your code, BTW, I've taken several stabs at this and the only way I've ever gotten it to work is by (a) going direct to database in PHP and (b) sneaking things in the back door via the import feature.
posted by weston at 8:04 PM on September 8, 2004


Why not use the XML-RPC API instead? MT documentation is here, and relevant PHP documentation is here. It'll do an update the way it ought to be done, so you don't have to worry about forcing a rebuild. As a bonus, your frontend can be backend-agnostic -- it will work with Blogger, MovableType, or any other software that supports the Blogger XML-RPC API. I once wrote a very, very small frontend in PHP that did this, and it worked like a charm. I'd offer it to you, but I can't for the life of me figure out what I've done with it.
posted by uncleozzy at 8:23 PM on September 8, 2004


Have you asked on the Movable Type support forums? A lot of people don't seem to know they exist, especially since Six Apart has hidden the link to them so well since the release of v3.
posted by bcwinters at 9:11 PM on September 8, 2004


alternatively, schedule rebuilds with trickle or the new fangled scheduled publishing feetch.
posted by mwhybark at 9:41 PM on September 8, 2004


Here's a little more on my suggested method:

mt.cgi?__mode=start_rebuild&blog_id=BLOGID&username=USERNAME&password=PASSWD

appears to trigger rebuilding, although it complains with a few error messages for which I'm not sure of the consequences yet...

The XML-RPC method may be a better one. It's slightly more unwieldly than just hitting a URL via httpget, but it's probably more correct in terms of well-defined behavior.
posted by weston at 9:55 PM on September 8, 2004


This just in from a fellow mefite who, for some reason, can't log in at the moment:
I run a site that features an different MT entry from the archive each day. I use mt-rebuild, avery handy plugin, along with a cron job that triggers the rebuild every night at midnight. I'm a relative novice, so I had to tinker with the croncommand for a while before I got it to work right, but once I got it set up, it's been fantastic. The cron job has been running every night for months, and I haven't had a single problem with it.
If you want timed automation instead of having a PHP script trigger rebuild, this setup could be good.
posted by weston at 8:47 PM on September 10, 2004


« Older Is there an RSS feed of the numbers of deaths of U...   |   How can one find out information about a person... Newer »
This thread is closed to new comments.