https://buy-zithromax.online buy kamagra usa https://antibiotics.top buy stromectol online https://deutschland-doxycycline.com https://ivermectin-apotheke.com kaufen cialis https://2-pharmaceuticals.com buy antibiotics online Online Pharmacy vermectin apotheke buy stromectol europe buy zithromax online https://kaufen-cialis.com levitra usa https://stromectol-apotheke.com buy doxycycline online https://buy-ivermectin.online https://stromectol-europe.com stromectol apotheke https://buyamoxil24x7.online deutschland doxycycline https://buy-stromectol.online https://doxycycline365.online https://levitra-usa.com buy ivermectin online buy amoxil online https://buykamagrausa.net

Polishing the Tweets

Per Doyce’s inspiration, I’ve tweaked things in my templates so that (if all goes well) anything I post here via Twitter will not have the “In passing (200912021347)” style of…

Per Doyce’s inspiration, I’ve tweaked things in my templates so that (if all goes well) anything I post here via Twitter will not have the “In passing (200912021347)” style of title, but instead excerpt the first five words of the post as the title. 

This isn’t actually changing the post title (Twitter doesn’t have any such thing, so it can’t be passed along from it; instead, it’s generated by the MT-Twitter plug-in), but is manipulating the underlying Movable Type templates to include code that looks like this:

<mt:IfCategory name=”Tweets”>
<$mt:EntryExcerpt words=”5″$>
<mt:Else>
<$MTEntryTitle$>
</mt:IfCategory>

I’ve done this in the usual index and archive templates, in the bits of code that show the latest comments at the top of the index page, and in the Atom/RSS feeds (I believe). There are a few unlikely places that you might still see it show up, and I’ll still see the true “In Passing” title inside of MT, but I think I can live with that.

Now I just need to bear in mind that the first five words I put in are title-worthy.

(I’m doing this because it’s been bugging me, I’ve been meaning to do it, and I suspect I may do a Tweet or two tomorrow and wanted this in place — which means I’ll probably come home to see how broken I’ve made the whole thing. 😛 )

For the record, since it’s been asked, and if I don’t write it down someplace I’ll forget, I generate that underlying Tweet title by specifying the “In Passing” in the MT-Twitter control panel, and then create the rather ugly date-time string by changing in the Twitter.pl file this …

$entry->title( $twitter_title . ‘ (#’ . $tweet->{id} . ‘)’ );

… to this …

$entry->title( $twitter_title . ‘ (at ‘ . jsondate2ts( $blog->id, $tweet->{created_at} ) . ‘)’ );

And that’s probably about as technical as I should be at this hour of the night. 🙂

51 view(s)  

One thought on “Polishing the Tweets”

  1. Okay, that’s sort of interesting. The good news is, it’s working like gang-busters on the main page, the comments listing, and the RSS feeds.

    The bad news is that it’s working a bit oddly on the actual Individual Archive pages — it *looks* like the “words” parameter for $MTEntryExcerpt$ doesn’t work (?!) for dynamically generated templates. Bummer.

    The bad news isn’t hugely bad — it just means that when you open the individual post, the title will be the full Tweet, rather than the first five words.

Leave a Reply

Your email address will not be published. Required fields are marked *