Closed (won't fix)
Project:
Twitter
Version:
6.x-2.0
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
13 Nov 2008 at 23:13 UTC
Updated:
6 Jul 2011 at 13:12 UTC
Jump to comment: Most recent
Thanks for this module, it saves lots of time integrating with Twitter.
I noticed that it adds to each content input form a default-to-open menu titled "Post to Twitter", with a checkbox, a text field to override the default tweet structure and some text explanation. I would like to remove or hide that menu if possible, without removing the functionality. If that's not possible, I would like to have the menu closed, rather than open, by default. Thoughts on either solution?
Comments
Comment #1
john.arroyo commentedI am also interested in this functionality.
Comment #2
avangelist commentedI would also like to see a temp hack for minimizing the option and to change the default check box status to off.
Comment #3
avangelist commentedActually I have just found both of those:
in twitter.module:
/**
* Implementation of hook_form_alter().
*/
function twitter_form_alter(&$form, $form_state, $form_id) {
module_load_include('inc', 'twitter');
if (substr($form_id, -10) == '_node_form') {
$twitter_form = twitter_form();
if (!$twitter_form) {
return;
}
/* Hacks by AndyP (pure360.com) change collapsed status to true by default and to turn of checkbox */
$form['twitter'] = array(
'#type' => 'fieldset',
'#title' => t('Post to twitter.com'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#tree' => TRUE,
);
$form['twitter']['post'] = array(
'#type' => 'checkbox',
'#title' => t('Announce this post on Twitter'),
// '#default_value' => (empty($form['nid']['#value'])),
'#id' => 'twitter-toggle',
);
$form['twitter'] += $twitter_form;
$form['twitter']['status']['#default_value'] = variable_get('twitter_default_format', 'New post: !title (!url)');
$form['twitter']['status']['#description'] = t('The given text will be posted to twitter.com. You can use !url, !title and !user as replacement text.');
}
}
Comment #4
fumbling commentedAlso, I've found that the form filter module will collapse the drop-down for you.
Comment #5
gregolin commentedAnother question about this...
Can I disabled this field to any roles??? For example, XXXX role will be posted at Twitter, but the usar can't change the format (!title !tinyurl).
Thanks.
Comment #6
Anonymous (not verified) commentedyou can modify anything with your own hook form alter.
Comment #7
btopro commentedThese solutions seem a bit overkill. Try http://drupal.org/project/nodeformcols . I believe it'll integrate with this the right way.
Comment #8
honorfield commentedhttp://drupal.org/project/nodeformcols doesn't work for me. The Twitter function doesn't even appear in the "Manage Form" list. Does anybody know of another solution for this. It would be really great to be able to hide this feature on the create/edit node page, as i'd like to keep the process of posting a new node as simple as possible.
Thanks in advance for your help :)
Comment #9
windm commentedany news on this?
I would also prefer to hide the entire box to keep the node/add form as small as possible and in addition to that to prevent users from changing the posted message...
Comment #10
michaek commentedNo patch, and this doesn't belong in the module.