Yesterday, I told you how to get your Movable Type blog cross-posting to LiveJournal, but at the moment it only sends across the entry and title. Today I’ll show you how to get it posting your current mood and what music you are currently listening to, like you can using the LiveJournal interface.
To do this, we’re going to use RightFields, an incredibly powerful plugin from Kevin Shay which lets you add extra fields to your MT entry screens and use the fields in your templates. The plugin is shareware, so if you decide to keep it then you should pay Kevin $15 (for personal use), but it’s such a great power-user plugin I’m sure you’ll see that it’s worth it. You’ll also need to be using Movable Type 3.2 for this step – using ljcrosspost on its own will work on older versions, however.
1. Download and install RightFields
Because Kevin has documented the installation of RightFields in a high level of detail, we’ll just cover the basics here. Download RightFields and extract it somewhere, then upload all of the files to your Movable Type directory. Go into the MTDIR\plugins\RightFields folder and change the permissions on mt-rightfields.cgi to 755 so that it is executable.
2. Configure RightFields
Go to your main Movable Type menu and click on Plugins, then choose RightFields and then your blog from the list. Select the Extra Fields tab, and then Update to use PluginData (this option is explained in more detail in the documentation but this is the easiest option for now). Create two new fields – I called them ‘Mood’ and ‘Music’, and give them labels ‘Current Mood’ and ‘Currently Listening To’. You can leave the other options as is. Click Save Changes.
Now select the Template Tags tab. In the first two drop-down boxes, select ‘Current Mood’ and ‘Currently Listening To’ respectively, and then give them the tag name (on the left) of ‘EntryLJMood’ and ‘EntryLJMusic’ respectively. Click to save changes.
3. Re-configure ljcrosspost
We now need to change the code we added to cross post entries yesterday. Open the template where you pasted the code yesterday and find the line. We now need to change it to the following:
<MTExtraFields><$MTLJCrosspost user="melody" pass="573ad19d284b4fd9d735c99dc94af893" mood="[MTEntryLJMood]" music="[MTEntryLJMusic]"$></MTExtraFields>
Now, when you create a new entry, you’ll have extra fields for your current mood and what you are currently listening to, and these will appear on your LiveJournal entries.
If you have multiple pictures on your LJ account, you can do the same with those – create another field for the picture keyword and then add ‘picture=”[MTEntryLJPicture]”‘ (or equivalent) to the <$MTLJCrosspost$> tag. You can also change the mood field to be a drop-down menu of common moods, like on the LiveJournal post screen.