trackback and comment mods
movable type April 25th, 2003i made a few simple movable type customization’s that i wanted to share with people. after consulting the folks in the mt support forum they informed me that it was ok to release the changes. i do however have to warn people that these changes are not supported by six apart and i don’t take responsibility for their effect on your installation. they are all rather simple changes but i recommend you backup the original files before placing these files in your mt installation.
what version of mt is supported? — 2.63
what was changed? — after installing the simplecomments plugin i found it annoying that the individual entry was not updating after a trackback occurred. to fix this i added some code to their trackback perl module. while i was in there i noticed that my rss feeds and other feeds were being updated when a comment or a trackback was posted. since i don’t provide a comment rss feed and i wanted these updates to be as fast as possible i obviously wanted to stop that from occuring. another thing i’ve noticed recently is that my new posts and updates have been publishing a lot slower. i’m not sure if this is due to the mtincludes i’m using now or the feeds i added. anyhow, if you don’t want to incorporate this update change, but want the trackback change, then just replace the trackback.pm file that’s included in the zip with the one in your installation and ignore the other two changes.
how do yes install it? — it’s rather simple actually. first thing you need to do is backup the following files in your mt install:
- /mt/lib/mt.pm
- /mt/lib/mt/app/comments.pm
- /mt/lib/mt/app/trackback.pm
then just copy the files from the zip file into the same location as the files you just backed up. that’s it!
how do i test the changes? — create a new posting that is a trackback to another posting. you should notice, if your using simplecomments, that the entry is now updated. in the past this didn’t happen when a ping occurred. you should also notice (if you installed all of the changes) that your rss feeds did not update. this is by design and if you don’t want this behavior revert the changes to the comments.pm and mt.pm files.
how can i see what you changed — do a search on “sean willson” in the files, there are copious comments. be forewarned, i didn’t change much so don’t expect all kinds of weird hacks.
are there any caveats to making these changes? — there are a few things i should caution you to. the first would be that these changes are not supported, but i already said that didn’t i? the second would be that you need to realize that any time anyone pings your entry it will get updated. so if you get those annoying 4-5 pings to one posting like some people do, it will update each time. you’ll likely then want to go back and remove those excess pings and then rebuild the entry. since most people don’t do that though, it’s not a big deal to me. i thought it appropriate to warn you ahead of time though.
are diff files available? — i didn’t initially think of this but since the first comment asked for it i threw it together.
finally, download the changes — mt-2.63-mod-1-sean.zip (18 k)
April 25th, 2003 at 10:02 pm
For those of us who have already modified these files — say, because we’ve implemented MT-ThreadedComments — (or, perhaps just because we’d like to see your changes more easily) it sure would be nice of you to post a diff file against the “stock” MT 2.63.
April 25th, 2003 at 10:27 pm
i just added the three diff files for these changes, you can obtain them from the links above. i hadn’t thought of it but it makes perfect sence.
April 26th, 2003 at 8:12 am
In trackback.pm, you need to check that $entry has been set before rebuilding it. A trackback can happen on an entry OR a category. I also changed my version of the hack to pass in BuildDependencies => 1 (I don’t get many pings so I don’t care about rebuilt times).
It should look something like this:
$app->rebuild_entry( Entry => $entry, RebuildType => 'trackback' ) or return $app->error($app->translate( "Rebuild failed: [_1]", $app->errstr)) if $entry;April 26th, 2003 at 5:11 pm
i added that fix, thanks for the heads up. i was thinking about working on a gui that would allow people to mark certain index files as rebuildable during a comment or trackback. we’ll see if i can figure it out and still make it look good.
May 14th, 2003 at 5:23 pm
in case you didn’t notice, i wrote the gui version of this mod. i guess this mod is really a “lite” version of that one in the event that you don’t want the gui changes.
August 27th, 2003 at 2:49 am
Integrating Trackbacks into the whole blog, but not just in post comments… Everywhere!
MT did a poor job of integrating trackbacks. I’ve made some changes that push them up the focus a little. They will now appear in the main and archive templates and in the comments sections. I hope everyone finds this useful in one way or another
Ad…