tips and tricks for movable type

MTPings behavior (and hack)
July 05, 2002

If you read the documentation on MTPings, you might notice something that's easy to overlook:

MTPings
A container tag that lists all of the pings either on a certain entry, a certain category, or in your entire system.

So unless you're using MTPings within the context of an entry, or in a category archive, the listing displays recent pings from all of your blogs, not just the blog where you use the code.

But wait! There's a hack!

Open lib/MT/Template/Context.pm in a text editor (save a backup copy before making changes!), and look for this code (lines 1450-1451):

my %terms;
$terms{tb_id} = $tb->id if $tb;

And then add this line right after the code above:

$terms{blog_id} = $ctx->stash('blog_id');

Save Context.pm and upload to your server in ASCII mode!

Related Links:

• Original post on the MT support forum

Comments

For those that run across this hack, it's already in MT as of 2.51 (possibly sooner)

by Bill Kearney | 03.21.03 10:21 AM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

TrackBack: 0
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/45)