Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xmacinfo’s picture

Status: Needs review » Needs work

There is a spelling error in the line starting with:

+ retrun t('This button allows your . . .

chia’s picture

Status: Needs work » Fixed

Thanks, added to 6.x-1.x

andypost’s picture

Status: Fixed » Needs review
FileSize
13.72 KB

Another round of cleanups.

- Fixes for $Id$ (should be exactly $Id$) #882084: Where to configure it?
- Removed unused .js file
admin.inc
- node_get_types('names') returns what we need
- menu description should be one line or cant be translated
.css
- removed unused #tweetbutton {}

- removed trailing spaces and tabs
- fixed code style as coder module suggests

andypost’s picture

Also D6 has no 'article' node type - replaced with 'story'

andypost’s picture

FileSize
13.81 KB

And this changes should go into D7 (needs more cleanups)

timmillwood’s picture

Status: Needs review » Closed (fixed)

Commit to 6.x-1.x-dev.

andypost’s picture

Status: Closed (fixed) » Needs review
FileSize
1.04 KB

Last commit does not fix a default value for variable (there's no article node-type in D6)

Also $op == 'view Better move to a start of condition: other nodeapi invocations will not call user_access()

Anonymous’s picture

I wanted to move the widget.js to my footer. I've never written a patch before (maybe someone else can for me) but this is what I did:

around line 89:

Replace:

drupal_set_html_head('<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>'); 

with:

//Move the widget.js to the footer
$script .= 'var twittButt = document.write(unescape("%3Cscript src=\'http://platform.twitter.com/widgets.js\' type=\'text/javascript\'%3E%3C/script%3E"));';
drupal_add_js($script, 'inline', 'footer');

Mostly taken from the Google Analytics module. I'll also note that !title wasn't showing up in my data variable and after I moved the widget.js to the footer the title started showing up in my tweets. Woohoo!

egomac’s picture

The theme_tweetbutton_display should be flexible so the function can be used to display the button anywhere else (e.g other modules and template). Developers should be able to call the function elsewhere (outside node view).