[TxMt] Blogging Bundle: Excerpts for Wordpress
Brett Terpstra
brett at circlesixdesign.com
Thu Nov 2 03:29:05 UTC 2006
Excerpt functionality *is* built in to the xmlrpc in wordpress, you
just have to send it the mt_excerpt header, as mentioned on this list
previously.
If you edit the blogging.rb file in the blogging bundle support
directory (or make a copy in a new bundle) and add:
@post['mt_excerpt'] = @headers['excerpt'] if @headers['excerpt']
around line 224 (it's not especially important, as long as it's in
that block) it will send a header in this format:
Excerpt: your text without line breaks
You'll want to edit the language file to include the [Ee]xcerpt
header so it highlights properly.
Then you'll want to add
doc += "Excerpt: #{self.post['mt_excerpt']}\n" if self.post
['mt_excerpt'] && (self.post['mt_excerpt'] != '')
at about line 400 in blogging.rb so that it will retrieve the
excerpts when you fetch the post or after posting.
That's it. Excerpts should work for you then.
Brett
Brett Terpstra : Art Director
Circle Six Design, Inc.
111 Riverfront Dr, Suite 204
..................................................
p: 507.459.4398
877.858.4332
f: 1.866.540.3063
e: brett at circlesixdesign.com
http://www.circlesixdesign.com
..................................................
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061101/a45dd3a4/attachment.html>
More information about the textmate
mailing list