Home > Geek Stuff > Whoops

Whoops

November 14th, 2003

Guess that’ll teach me for testing things on my own LiveJournal. I was working on some modifications to my ljcrosspost plugin for MovableType, and I messed up and deleted my last entry, along with it’s comments. I should probably do my testing on another journal. Ah well.

Anyway, I’ve worked out some additions to ljcrosspost that I think will be pretty useful. The first one is pretty simple, just allowing you to specify a text-formatting plugin to run on the entry before it gets sent to LJ, like so <$MTLJCrosspost user="pla" pass="pla" filters="jive"$>. Nothing too special there, but it got me thinking. I decided it would be nice to have full control over what gets posted to LiveJournal, so I added a new tag, LJCrosspostEntry. This one let’s you specify exactly what to post, like so:

<MTLJCrosspostEntry user="pla" pass="pla">
<$MTEntryBody$>
<p>Crossposted from <a href="<$MTEntryLink$>">here</a></p>
</MTLJCrosspostEntry>

I also added another new tag that let’s you insert a link to the LiveJournal entry from the MovableType entry, <$MTEntryLink user="pla"$>. It’d be nice if it didn’t need that ‘user’ in there, but I kindof messed up in the way I store the plugin data, so it needs it. Ah well.

I still have some testing to do on this version before I release it, but I think it’s looking pretty good now. I still want to add a way to set LJ moods and music, but that’s about it.

Geek Stuff

  1. June 23rd, 2006 at 18:21 | #1

    I installed your ljcrosspost MT plugin, and wanted to be able to specify the security of the post. So … I added it.

    — ljcrosspost.pm 2003-11-24 14:55:07.000000000 -0600
    +++ modified/ljcrosspost.pm 2006-06-23 18:14:45.000000000 -0500
    @ -290,6 +290,8 @
    event => $entry_text || ‘What happened to the text?’,
    subject => $entry->title,
    lineendings => ‘unix’,
    + security => $args->{security} || ‘public’,
    + allowmask => $args->{allowmask} || ‘1′,
    );

    my $method;

    I thought you might appreciate that. Not much to it … but it works. My individual entry template now looks like:

    Which makes all my posts “Friends” only. I guess it wouldn’t be too hard to have it configurable such as the mood & music, but I wanted all my posts to be friends only by default.

    Cheers!

    Jon

  2. June 23rd, 2006 at 18:25 | #2

    Let’s try that code again using the magic WordPress tags … Again, here is a diff showing the very minor changes I made to ljcrosspost.pm:


    --- ljcrosspost.pm 2003-11-24 14:55:07.000000000 -0600
    +++ modified/ljcrosspost.pm 2006-06-23 18:14:45.000000000 -0500
    @@ -290,6 +290,8 @@
    event => $entry_text || 'What happened to the text?',
    subject => $entry->title,
    lineendings => 'unix',
    + security => $args->{security} || 'public',
    + allowmask => $args->{allowmask} || '1',
    );

    my $method;

    With the MT template tag looking like:

  1. No trackbacks yet.