March 05, 2004

MT-Revision 0.91

I released 0.91 of my MT-Revision plugin. It fixes some issues regarding weblogs and entries that have the convert_breaks and convert_paras options enabled.

RevisionPlugin

My Movable Type RevisionPlugin allows you to keep a version history of your weblog entries. It tracks"main entry" and "extended entry". It also allows you to browse the diffs by using your individual archive template. This is an effort to make movable type revision history more possible and available than what is currently available through Aaron Swartz and Mark Pilgrim's python effort (thanks to both of them since I cribbed a couple of their ideas and attempted to improve on them.)

If you use it, please add your name or a link to your website to RevisionPluginUsers.

I have some community-editable RevisionPluginInstructions. My instructions below are only for harder-core geeks. Hopefully the community will add some friendlier instructions. :-)

Here are the unchanging elements:

The plugin intercepts Movable Type's "save" entry.

It requires a few perl libraries. You can find these at cpan.org and put them in your extlib directory, but it's better to install them via CPAN yourself, or ask your administrator to do so.

  • Rcs::Agent
  • HTML::Diff
  • HTML::TokeParser
  • String::ShellQuote
  • Algorithm::Diff
  • File::Temp

It supplies two Template tags. I use them on my index page template and my individual archive template:

<MTIfRevised>
 Revision: <$MTRevisionLink$>
</MTIfRevised>

Finally, it uses two style elements for added and deleted text:

<span class="ins"></span> 

and

<span class="del"></span>.  

Add style definitions for these classes to your stylesheet. I use the following:

.ins {
    text-decoration: none;
    padding: 0 2px 0 2px;
    background-color: #66ff99;
}
.del {
    text-decoration: none;
    padding: 0 2px 0 2px;
    background-color: #ff6699;
}

But they are pretty ugly so you might like to suggest something better.

In the future, this plugin might use the ins and del tags instead. Go ahead and make your style elements apply to those tags as well in case you upgrade and the syntax changes.

Please Note: Versioning happens upon save. This means that if you edit an existing entry and make changes, the version you are changing from is not versioned. For these entries, you may wish to edit and save without making changes first, one time for each pre-existing entry you wish to edit. New entries will be automatically versioned upon creation, though.

RevisionPluginChangeLog

RevisionPluginBugs (check here for a note about customized individual-entry tpls)

Posted by Curt at March 5, 2004 05:48 AM

Comments

Hi,

where can i contact you?
i have a question.
i need help with my website :(

Posted by: peterpaul at March 26, 2004 05:24 PM