There is a twitter.js file in the module that I think is supposed to count characters.
It doesn't seem to be working. When I create a new tweet I've got the "Announce this post" on Twitter box checked, but alas, no js action happening.
shai
There is a twitter.js file in the module that I think is supposed to count characters.
It doesn't seem to be working. When I create a new tweet I've got the "Announce this post" on Twitter box checked, but alas, no js action happening.
shai
Comments
Comment #1
petercrowell commentedYes, I have the same issue. No character count. Also, and maybe this is by design, it's the title of the post, not the content, that is sent to Twitter.
Really love the possibilities with this module!
Comment #2
gregglesHere's the steps I followed to test this:
1. Enable twitter for all node types on my site
2. Went to my account page and added a twitter account to send things to
3. Started creating a node and entering characters into the title
I expected to see a little counter counting down, but didn't see it. I turned on the Script console in Firebug and it looks like in line 10 of twitter.js
var descDiv = $(this).parent().parent().parent().children(".description");My $(this) is valid, but the parent is "Window: business" which seems wrong. The next parents of that are all the same and then the children fails to find anything.
I'm using a stock Zen 6.x-1.0 theme, which seems like it might be part of the cause. Perhaps this JS just needs a more robust selector.
Comment #3
vanvemdenI am currently 'rebuilding' this module for a project in D5. Had the same problem. Fixed it by changing:
$(document).ready(function() {
$("#twitter-textfield").keyup(function() {
to
$(document).ready(function() {
$("#edit-twitter-status").keyup(function() {
in the twitter.js file.
Start typing and the description field with character count should show up, at least it did with me. Hope it helps. Again, not sure because my version of this module has been changed a bit.
Comment #4
Leeteq commented#3: thanks for the info, will test it.
Comment #5
roedelius commentedRe:
var descDiv = $(this).parent().parent().parent().children(".description");Since the current behavior is to overwrite the description, which I find comes in handy with the replacements list, I've modified it by adding a #field_suffix to $form['twitter']['status'] with
<span id="charsleft"></span>in there, and updating that instead (and just the number, without the redundant " characters remaining"). The JS then becomes a more readablevar descDiv = $("#charsleft");Granted, this won't work if there are multiple twitter status forms on a single page, but I don't see why there would be.
Comment #6
steinmb commentedComment #7
juampynr commentedDuplicate: #1354450: Port Twitter Post Javascript code to Drupal 7