Closed (fixed)
Project:
Drupal.org CVS applications
Component:
new project application
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Sep 2010 at 21:56 UTC
Updated:
13 Jan 2019 at 10:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
afasdfasdfsadfasdfasdfasdfasdfsaf commentedThis module shows your last tweet. I wrote this to display only your last one tweet. You can use it in a block...or hardcoded in your theme. I didn't see any other modules for this that did exactly this and/or were updated with the newest API from twitter. To use, you go into admin interface --> lats tweet --> and then enter the username you wish to display your last tweet from. Screenshot is attached.
Comment #2
afasdfasdfsadfasdfasdfasdfasdfsaf commentedComment #3
Scyther commented1. Your .install file with a table to save 1 tweet seems overkill. Remove it and use the variables functions that Drupal gives you. variable_get, variable_set and variable_del.
2.
You don't need to fill in access callback, when using the user_access function, it's default.
3.
There is a much easier way to do this. You can do it right in the menu definistion so that you don't need the function above at all.
4. last_tweet_settings_form() has a variable like last_tweet_settings_form(&$form_state)
5. Then you can simplify the last_tweet_settings_form() to.
And you don't need the last_tweet_settings_form_submit(), because system_settings_form() adds another form_submit that saves the "last_tweet_username" value into the variable "last_tweet_username".
6. WRONG WRONG WRONG... Please divide the function into more functions that only do one thing.
should be something like this
Some more comments in the code would be nice.
You probably would like to have a theme function that styles and prints out the last tweet.
Comment #4
avpadernoHello, and thanks for applying for a CVS account.
See also http://drupal.org/coding-standards to understand how a module should be written; in particular see how Drupal variables, global variables, constants, and functions defined from the module should be named.
Comment #5
afasdfasdfsadfasdfasdfasdfasdfsaf commentedThanks guys. How's this?
Comment #6
avpadernoRemember to change status when you upload a new version of the code, or reviewers will not know there is something new to review. :-)
Comment #7
WhenInRome commentedPlease review :)
Comment #8
afasdfasdfsadfasdfasdfasdfasdfsaf commentedWhat's the hold up here? I would really like to get this committed, get my CVS account and start helping the drupal community. I've been a Drupal member for 5 years and providing help in the IRC channels for a long time and now i want to start providing patches and support for contrib modules. Can someone please help me get my CVS account and approve my module?
Comment #9
Scyther commented1. Functionnames should start with the modules name.
should be something like this
2. Drupal variable names should be prefixed with the module name; if the module name is last_tweet.module, then the Drupal variable names should be prefixed by last_tweet_.
Wrong:
Look over the code again and you will soon have a modules that are ready. The "errors" I have pointed out, can maybe be found at more places in the code.
A suggestion will be to add a readme file, and recommend that cron should be run often, if the twitter is updated often.
Comment #10
avpadernoSee http://drupal.org/coding-standards to understand how a module should be written.
Comment #11
WhenInRome commentedupdated some stuff with jim.bo. check it out and let us know.
Comment #12
afasdfasdfsadfasdfasdfasdfasdfsaf commentedComment #13
Scyther commentedThink that the & should be remove infront off $form.
Otherwise the code looks good. Will try it out when I get som free time and report back.
Comment #14
avpadernoAs reported in http://drupal.org/node/751826, the argument
$formis not passed by reference.Comment #15
afasdfasdfsadfasdfasdfasdfasdfsaf commentedin regards to the &$form,
Comment #16
Scyther commentedSorry, I missed a few thinks with my eyes. Ran it in Coder, still 4 normal warnings, 1 minor warnings.
Comment #17
afasdfasdfsadfasdfasdfasdfasdfsaf commentedHow did i miss those?
Attached..again.
Comment #18
Scyther commented1. Don't forget to change the status to "needs review" when you have added a new revision that should be reviewed.
2. Still 1 normal warnings in Coder.
Comment #19
WhenInRome commentedfixed with jim.bo..
Coder module is pretty cool :)
Comment #20
afasdfasdfsadfasdfasdfasdfasdfsaf commentedComment #21
Scyther commentedThe code looks fine to me, no warnings from Coder.
Have tested the module and it works.
Comment #22
afasdfasdfsadfasdfasdfasdfasdfsaf commentedThanks guys for your time. Much appreciated.
Comment #23
michelleApproved based on Scyther's RTBC.
Michelle
Comment #26
avpaderno