Customize your MT admin page – comments

We had some problems with comment spam recently so we wanted to see more comments at the same time…

We could have just made a new plugin, or found one already written, and used it in a new index, but then we’d have to rebuild the thing every time we needed to find spam.

So, I went into our MT installation and changed it directly to show the last 25 comments instead of the last 5.

  • MT_HOME/tmpl/cms (for example /usr/local/apache/cgi-bin/mt/tmpl/cms )
    is where the templates are.

  • The one which we want is menu.tmpl which defines COMMENT_LOOP.

  • They use a templating language defined by Template.pm which lives at
    MT_HOME/extlib/HTML (for example /usr/local/apache/cgi-bin/mt/extlib/HTML ). This module is very well commented, type

    perldoc Template

    to read it.

  • now we want to change the number of times the COMMENT_LOOP iterates-
    kind of a pain in the ass, since it iterates over an array, and so it will be the length of the array and not defined in our template at all!

  • the library that builds this is called
    MT_HOME/lib/MT/App/CMS.pm
    ( for example
    /usr/local/apache/cgi-bin/mt/lib/MT/App/CMS.pm ).

  • the array in question is called @c_data and somewhat disturbingly has a hard coded length:
    $iter = MT::Comment->load_iter({ blog_id => $blog_id },
            { 'sort' => 'created_on',
              direction => 'descend',
              limit => 5 });
        my @c_data;

    See that 5? that’s our puppy!

Urban Iditarod

MAX: basically drunken dog sled racing but the dogs are costumed people and the
sled is a shopping cart. looks like 35 teams participated last year.
insane. if anyone wants to chase them through town from SOMA to Fort Mason,
stopping at all the mandatory pitstops (read: bars), I’ll be there and we
can be fanboys together.

Web link of note: Urban Iditarod
(At http://www.urbaniditarod.com/)

Monkey Magic (UK)

British site about Japanese 1970’s TV show “Monkey” ( 西遊記 = さいゆうき = saiyuuki) which I would bet spawned some of the flying-monkey imagery in Dragon Ball Z.

Monkey was based on the Chinese story Hsi Yu Chi (= Journey to the West), which not coincidentally is spelled with the same characters ( 西遊記 ). I’m sure you could trace the monkey character back to the Hindu god Hanuman.
Web link of note: Monkey Magic (UK)
(At http://www.monkeymania.co.uk/monkeymagic/)

MonkeyHeaven (Monkey Magic)

American site about Japanese 1970’s TV show “Monkey” ( 西遊記 = さいゆうき = saiyuuki) which I would bet spawned some of the flying-monkey imagery in Dragon Ball Z.

Monkey was based on the Chinese story Hsi Yu Chi (= Journey to the West), which not coincidentally is spelled with the same characters ( 西遊記 ). I’m sure you could trace the monkey character back to the Hindu god Hanuman.
Web link of note: MonkeyHeaven (Monkey Magic)
(At http://www.monkeyheaven.com/)

Banana Racket Productions

Random San Rafael amateur production company- starting in February, they aim to have a completed feature by May 1st. Ambitious isn’t it?

Their title: Sixteen Pound Sledge vs The Vegas Vampire.

I think it’s a just-for-fun thing- they didn’t even have a script in February. I personally can’t see putting so much effort into a random design-by-comittee venture, but that’s just my personal preference. Good luck guys!
Web link of note: Banana Racket Productions
(At http://www.bananaracket.com/)