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.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | twitter.module.txt | 10.21 KB | dbeall |
| twitter.type_.patch | 1.78 KB | smscotten |
Comments
Comment #1
Leeteq commented+1, will test this.
Comment #2
dbeall commented+ another 1, will test tonight.. gets old changing the text each time
Comment #3
dbeall commentedconfirm, works as expected. Nice touch. Thanks
+have to add the !type string to the module settings page help text.
twitter.pages.inc line 67
Comment #4
Anonymous (not verified) commentedWorks for me too, thanks! :)
Comment #5
giorgio79 commentedpatching 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
Comment #6
dbeall commented@giorgio79 here is my patched file. rename or remove the .txt
Comment #7
altparty commentedThis feature would be very usefull.
Comment #8
dbeall commentedwhat do u mean 'would be'? It is very useful and neat too. It works very well, been using it since June 10th.
Comment #9
altparty commentedI 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.
Comment #10
nchase commented+1
Comment #11
nchase commentedI' like to go a little further: I suggest to have different standard settings for each node type.
Comment #12
steinmb commentedComment #13
13rac1 commentedThis issue would be fixed by a full token module integration: #1441596: Add support for tokens module on twitter post. This issue is effectively duplicate.