Not displaying the correct amount of characters. From the looks of it, we're still about 12 characters short of the maximum allowance under Twitter.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | activitystream_node_245662.txt | 1.78 KB | Craig Gardner |
Not displaying the correct amount of characters. From the looks of it, we're still about 12 characters short of the maximum allowance under Twitter.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | activitystream_node_245662.txt | 1.78 KB | Craig Gardner |
Comments
Comment #1
akalsey commentedThe module just pulls in whatever is in Twitter's feed, but I can check it. What's your username on Twitter?
Comment #2
rastarr commentedMartin_Cooney is my username.
Comment #3
tayknight commentedPart of the problem is that {node_revisions}.title is varchar(128). A twitter post can be 140 characters, so title is getting trimmed. I'm not sure what should be done, but thought I'd point this out...
I've done something like this:
In my activitystream_twitter.module I've created a function (from http://www.lullabot.com/articles/trim_a_string_to_a_given_word_count, lullabot rules).
then I modified activitystream_twitter_streamapi and replaced
with
This trims the node title to 10 words and appends an ellipses (three dots, the html entity doens't work correctly in node title, like any other html).
Comment #4
Craig Gardner commentedCreated a patch for the above comment, but also added an administration option to set the number of words to display. Set default to 10 as noted above.
Comment #5
akalsey commentedI'm not sure this is something I want to do. I'm not a bug fan of creating endless config options as they just tend to confuse the user.
However, a feature that adds an ellipsis if the title is longer than the imported text makes sense. Also changing the twitter display to use the node body instead of the title is probably in order.
Comment #6
akalsey commented