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.
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;
$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)