okay, so i’ve gotten the new webhost set up and, as i’ve mentioned, it should be visible to everyone in the next couple of days.
of course, since i was moving locations, i decided to upgrade to the latest and greatest version of moveable type while i was at it. i really wanted to take advantage of dynamic archiving (since part of the problems i had at my last host was from my rebuilding over two thousand archive pages when i made changes to the stuff on the sidebar) and future posting, which i just think is really cool.
one of the problems with upgrading or reinstalling mt is that i lose all the small changes i’ve made to the code to make things work the way i like them. this upgrade also required that i upgrade mt-blacklist and both of the new applications have totally revamped their code since the last time i fiddled with hacks. therefore, now that i’ve figured out where to make these changes, i’m archiving them here on the blog and making them available to anyone who googles successfully. i couldn’t find direct answers, so i hope this will help someone somewhere.
first, is my version of the more meaningful comment notifications tweak:

in file: /plugins/Blacklist/lib/Blacklist/App/Sumbmission.pm
(at or near) line 735
change it from:

  my %head = ( To => $recipients,
      From => $from_addr,
      Subject =>
            '[' . $blog->name . '] ' .
            $app->translate('New Comment Posted to \'[_1]\'',
            $entry->title)
      );

to:

# HACK:  alter the comment notification subject appearance
#   was:   [freakishly prompt] New Comment Posted to 'help!'
#   now:   [ help! ] by Bubba - freakishly prompt
# first found at http://www.promoguy.net/archives/002159.php
   my %head =  ( To => $recipients,
      From => $from_addr,
      Subject => '[ ' . $entry->title . ' ] by ' . 
                 $comment->author . ' - ' . $blog->name
   ); 

second, my version of the comment notification hack (comments you make on your own blog will no longer be emailed to you):

in file: /plugins/Blacklist/lib/Blacklist/App/Sumbmission.pm
(at or near) line 810
change it from:

    MT::Mail->send(\%head, $body)
        or return $app->handle_error(MT::Mail->errstr());

to:

# HACK:  prevent your own comments from being emailed to you
# first found at
# http://www.kalsey.com/2002/08/comment_notification_hack/
    MT::Mail->send(\%head, $body)
        unless $author->email eq $comment->email;
#    or return $app->handle_error(MT::Mail->errstr());

these work for me in mt 3.15 and mt-blacklist 2.04b. no warranties expressed or implied, your mileage may vary and i take NO responsibility for the outcome. before you change anything, remember to save a copy of the original file. it’s only common sense.

9 Thoughts on “mt hacks

  1. Yay! You’re back! Today’s the first day I’ve been able to read your site in like four days. I was going through withdrawls. =P

  2. heather on February 11, 2005 at 17:17 said:

    you people have to get out more. really. ;)

  3. You know what’s weird? Some of the menus on the lefthand side that used to default to closed are now defaulting to being open when I visit the page. But not all of them. Go figure.
    I need a drink!

  4. heather on February 11, 2005 at 19:56 said:

    i know they are. i opened them. =)

  5. heather on February 11, 2005 at 19:57 said:

    btw, that’s NOT your email address. =p

  6. You know how I feel about using mine!

  7. heather on February 11, 2005 at 21:09 said:

    so use a fake one. don’t use mine, please.

  8. Oh my God… Heather’s back!!!
    I hear squirrells chittering in delight.

Post Navigation