I want my outgoing tweets to have a little more description to entice people to look at my posts, so I looked for a way to automatically add the node type in the announcement.

Examples:

New Blog Entry: How I Spent My Summer Vacation (http://blah.info/how)
New Movie Review: I Know How You Spent Your Summer Vacation (http://blah.info/now)
New Announcement: Your Summer Vacation Has Been Canceled (http://blah.info/cow)

However, substitution for "type" was not in the module. Only !url, !url-alias, !tinyurl, !title, and !user are available.

It was an easy enough addition (two lines of code), so I'm submitting my changes as a patch (my first, so I apologize in advance if I did it wrong) for anyone else that wants this or if you want to roll it into the module itself. Looks like token support is one of the feature requests, which would be a much more powerful solution, but this adds what I needed. Someone else might like it too.

CommentFileSizeAuthor
#6 twitter.module.txt10.21 KBdbeall
twitter.type_.patch1.78 KBsmscotten

Comments

Leeteq’s picture

+1, will test this.

dbeall’s picture

+ another 1, will test tonight.. gets old changing the text each time

dbeall’s picture

confirm, works as expected. Nice touch. Thanks
+have to add the !type string to the module settings page help text.
twitter.pages.inc line 67

Anonymous’s picture

Works for me too, thanks! :)

giorgio79’s picture

patching file twitter.module
Hunk #1 succeeded at 96 (offset 26 lines).
Hunk #2 FAILED at 112.
1 out of 2 hunks FAILED -- saving rejects to file twitter.module.rej

dbeall’s picture

StatusFileSize
new10.21 KB

@giorgio79 here is my patched file. rename or remove the .txt

altparty’s picture

This feature would be very usefull.

dbeall’s picture

what do u mean 'would be'? It is very useful and neat too. It works very well, been using it since June 10th.

altparty’s picture

I mean, I'd like to see this patch committed. I rather work not with patched modules for a production site.
Sorry for posting an incomplete comment.

nchase’s picture

+1

nchase’s picture

I' like to go a little further: I suggest to have different standard settings for each node type.

steinmb’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Active
13rac1’s picture

Status: Active » Closed (duplicate)

This issue would be fixed by a full token module integration: #1441596: Add support for tokens module on twitter post. This issue is effectively duplicate.