CVS edit link for cbovard
Hello,
I am applying for a CVS account to submit a module that allows a people to use only one Twitter account with their drupal site. It is called Simple Tweet.
The existing Twitter module is very good, but seems like overkill for having one block pulling in Tweets from one twitter account.
I have posted a request in the Twitter module queue asking the maintainers about this here:
http://drupal.org/node/702984
with no response except comments from people that are happy to use our code. There has been small feature requests to the module we have created. People seem to be happy because of it simplicity.
I have also posted here in the Contributed Module Group http://groups.drupal.org/node/50108 with no response.
I am happy to share the code, maintain this module and also create a Drupal 7 version.
I am currently hosting this module on Github here: http://github.com/cbovard/simple_tweet
Thank you for your time and consideration.
Chris Bovard
Comments
Comment #1
cbovard commentedHello,
Attached is a zip of the module Simple Tweet.
Thanks
chris
Comment #2
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.
As per http://drupal.org/cvs-application/requirements, the motivation message should be expanded to contain more details about the features of the proposed module, and it should include also a comparison with the existing solutions.
As reported in the requirements, the proposed module should not duplicate the work done in existing projects.
Comment #3
cbovard commentedHello and thanks for the consideration.
Overview of Simple Tweet
This project was developed because we found the Twitter Module (http://drupal.org/project/twitter) was too heavy of a module for a one person Website - Blog. We also found it hard to set up for a one person to use, to pull in tweets from one account.
We started to use custom php code in a block instead of using the Twitter module because of website performance.
Explanation of Simple Tweet Module
The Simple Tweet Module only uses one Twitter Account (as described above).
The module has 2 permission settings (Administer Simple Tweet and See Tweets).
The module will create: a block with one tweet; a block with a dynamic number of tweets set on the Simple Tweet Admin page (see below); and a page of recent tweets.
There is an administration page (admin/settings/simple-tweet). This will allow the user to: enter their Twitter login and password; number of tweets to show in multiple tweets block; Title of recent tweets page; Recent Tweets Page path; and more control over the date using the Date API (if enabled).
The cache needs to be cleared if the Recent Tweets page path changes.
The cron.php needs to be run in order to get tweets or update tweets.
We built this trying to keep it lean with out any extra table creation or deletion. We use the variable table for any of the values mentioned above.
Comparison of Existing Modules
Simple Tweet is a one account module as the Twitter module (http://drupal.org/project/twitter) is a multi-user account module.
Simple Tweet does not create any new table in the database as the Twitter module (http://drupal.org/project/twitter) does.
Simple Tweet does not post to new tweets to Twitter as the Twitter module (http://drupal.org/project/twitter) and the Tweet module (http://drupal.org/project/tweet) does.
Simple Tweet is easy to use and has good performance on shared hosting. The Twitter module (http://drupal.org/project/twitter)runs slower on shared hosting and is hard to get running for a one user twitter account.
Summary
This module is a great idea because it is simple. I have been using drupal for almost 4 years and have noticed there is some complex modules that 'do it all'. This is great but at times you only need a small part of the functionality of a module for a small website.
Sometimes a simple alternative is better.
Thank you for your time.
Chris Bovard
Comment #4
avpadernoJust a little note on what reported on http://drupal.org/node/539608:
Comment #5
cbovard commentedThen we will continue to host it on Github.
Thank you for the clarification.
Comment #6
avpadernoComment #7
cbovard commentedHello,
It has been brought to my attention that our module does not duplicate the Twitter module.
Here is the updated Motivational Message:
Overview of Simple Tweet
The Simple Tweet module is site centric module. It is designed to retrieve and display tweets from a single user's rss twitter feed.
Explanation of Simple Tweet Module
The Simple Tweet Module only uses one Twitter Account to get the RSS feed of Tweets. There is no authentication process.The Simple Tweet Module will not require the OAuth to use Twitter, as Twitter will deprecate Basic Auth June 30, 2010 - http://www.countdowntooauth.com/
The module has 2 permission settings (Administer Simple Tweet and See Tweets).
The module will create: a block with one tweet; a block with a dynamic number of tweets set on the Simple Tweet Admin page (see below); and a page of recent tweets.
There is an administration page (admin/settings/simple-tweet). This will allow the user to: enter their Twitter Username; their Twitter RSS feed; number of tweets to show in multiple tweets block; Title of recent tweets page; Recent Tweets Page path; and more control over the date using the Date API (if enabled).
The cache needs to be cleared if the Recent Tweets page path changes.
We built this trying to keep it lean with out any extra table creation or deletion. We use the variable table for any of the values mentioned above.
Comparison of Existing Modules
Simple Tweet is a one account - site centric module as the Twitter module (http://drupal.org/project/twitter) is user centric module.
Simple Tweet does not post to new tweets to Twitter as the Twitter module (http://drupal.org/project/twitter) and the Tweet module (http://drupal.org/project/tweet) are designed for users to submit and retrieve tweets. Their functionality is build around user account features.
Simple Tweet is easy to use and has good performance on shared hosting. The Twitter module (http://drupal.org/project/twitter) runs slower on shared hosting.
Summary
This module is small, very fast and does not need OAuth to get the user's Tweets.
There could be issues with the code (better ways to do things), so I am expecting that with the review of the code.
Thanks for your time.
Chris Bovard
Comment #8
cbovard commentedHere is our updated module.
Comment #9
cbovard commentedchanged status
Comment #10
cbovard commentedDid a bunch of fixes and ran it through the Coder Module.
Comment #11
chazz commentedThanks, had some problem with the module today
* warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 49: parser error : Entity 'rsaquo' not defined in .................../simple_tweet.module on line 204.
* warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]:
in .................../simple_tweet.module on line 204.
* warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in .................../simple_tweet.module on line 204.
Will try the update now
btw. Why this module doesn't have own project page?
Comment #12
chazz commentedI can also see similar error on your site maximumjazz...
Comment #13
cbovard commentedHello,
I checked out the maximumjazzmarketing.com site and this a wordpress site. I am not sure what your issue is.
I just installed a fresh copy of this module and it works.
Clear your cache!!!
chris
Comment #14
chazz commentedI have notice this issue happen for logged users. It was working fine for a few days, I did not change nothing within module or my Twitter account. Cleared cache and installed new version dated 18 may. Instead of Tweeter block I can see errors:
Comment #15
chazz commentedHmm just checked now and it is working fine so far... maybe there was a fault with Twitter?
Comment #16
cbovard commentedAfter I cleared my cache all worked.??
not sure
chris
Comment #17
specialjyo commentedI'm having an issue with this, the install is so simple that i'm hoping this is a common thing. I put the simple tweet block in play, and it just displays Thu, 01/01/1970 - 00:00 , i verified RSS feed and everything. Ideas?
Comment #18
avpadernoKeep in mind this is not a project issue queue, nor a debugging session; the purpose of a CVS application is to verify if the code has security issues, uses the correct Drupal functions, follows the coding standards, and duplicates the work done in existing projects.
Comment #19
avpadernoDeleting Drupal variables using a query that matches any Drupal variable with a name that starts with the module name would remove also the Drupal variables of other modules.
t().The second permission should be renamed see simple tweets, or the first permission should be renamed administer tweets.
Why isn't the code using
drupal_http_request()?Use a
t()-placeholder.Multiple calls to
preg_replace()can be replaced by a single call.l()should not be used together witht(). See the documentation for t(), where this code is reported to be wrong:The correct code to use is the following:
There is a function that can be used to obtain the absolute URL of the front page.
A form submission handler doesn't validate the values passed in the form; that is the task of a form validation handler.
Comment #20
cbovard commentedHello,
I need too update the code to use the Drupal Cache functions.
Will provide an update as soon as I can.
chris
Comment #21
cbovard commentedHello,
Also reviewing your list:
Number 5, this module was run through the Coder Module. If you are going to reference a link on Coding Standards, then give an example.
Number 10, Give the link to the function if you can.
More to follow.
Sincerely,
chris
Comment #22
avpadernoPlease read the following links as this is very important information about CVS applications.
Comment #23
avpaderno