MetaBlog Post Extension is a Graffiti plug-in that will allow you to set several post properties when posting via the MetaBlog API by including some tokens in your post body. I created this plug-in in response to a comment to my original Publishing to Graffiti CMS from Diarist post that asked about setting the Include on the Home Page property of a post when posting.
Installing MetaBlog Post Extension
Once you have the plug-in, you can either place it into your /bin directory yourself (via file copy or FTP), or use the File Browser in Graffiti. To use the File Browser, go go the Graffiti control panel > Site Options > Utilities > File Browser. Select the bin folder from the folder list and then click the Add Files link. Locate NinoB.Graffiti.PlugIns.dll and upload it.
Now, as all plug-ins are disabled by default, it must be enabled. In the Graffiti control panel, navigate to Site Options > Plug-Ins. Locate the ‘MetaBlog Post Extension’ entry and click the Enable link. Once enabled, it will look like this:
Configuring MetaBlog Post Extension
There is no configuration for this plug-in.
Using MetaBlog Post Extension
In your post, add one (or more) of the following tokens:
| [homepage] | Sets the ‘Include on the Home Page’ property. |
| [draft] | Sets the Publish Status to ‘Draft’ |
| [enablecomments:true] | Enables comments for this post if comments are disabled by default on new posts. |
| [enablecomments:false] | Disables comments for this post if comments are disabled by default on new posts. |
| [tags:<comma-delimited-tag-list>] | Sets the tags for the post. |
Here is an example using Windows Live Writer:
Here is an example using Diarist:
Notes
I have only tested this from Windows Live Writer (WLW), Microsoft Word 2007, and Diarist, so your YMMV (your mileage may vary). Any HTML that your blogging tool may prefix or suffix the token text with is not removed, so if your tool actually submits <p>[draft]</p>, the <p></p> will be left behind after the post is processed.
I would appreciate any feedback – please leave a comment to this post, or contact me directly. Enjoy!