run cron + post tweet
Hi I am a newbie in drupal module developement, I have my website http://seydinet.com made with Managing News and now I just want create a module who if I run my cron post automaticly a tweet with a message telling for exemple "4news item added in seydinet.com" So I create a module directory name seydi, I add both file seydi.info and seydi.module. I have no problem with editing seydi.info but the big deal is with seydi.module. I start by implementing hook_cron() then I have to implement the code who gonna post the tweet and I dont know how to do that Here is the begining of my code <?php /* implementation de hook_cron */ function seydi_cron(){ //watchdog('seydi', 'my module just add something in cron', array(), WATCHDOG_DEBUG); // db stuff if (date('G', time()) == '19'){ //tweet } } Thanks -- Seydina Mouhamadou Ndiaye dit "Nattyseydi" Administrateur Réseaux Montage Vidéos, Etudiant en Java, Membres de DakarLug, Gtug-dakar Tel por: 77-512-35-00, fixe: 33-824-80-80 http://nattyseydi.blogspot.com http://twitter.com/NattySeydi http://www.facebook.com/nattyseydi
NubianNattySeydi wrote:
Hi I am a newbie in drupal module developement, I have my website
This list is for the development of Drupal. Your post belongs in support@drupal.org. Please also review http://drupal.org/support for more areas of support. -- Earnie -- http://progw.com -- http://www.for-my-kids.com
On 05/20/2011 09:05 AM, Earnie Boyd wrote:
NubianNattySeydi wrote:
Hi I am a newbie in drupal module developement, I have my website This list is for the development of Drupal. Your post belongs in support@drupal.org. Please also review http://drupal.org/support for more areas of support.
I hate seeing questions spiral into a debate about whether the question is proper. However... if the development list is only for discussion of Drupal core, and not for the discussion of development of Drupal modules, then perhaps http://lists.drupal.org/mailman/listinfo/development should say so. It does not, nor does http://drupal.org/support make such a distinction clear. The support list is described as "If you need help with getting Drupal up and running" and the list seems to be populated by administration questions, not module development. I've spent many hours answering questions in the Drupal forums, and find them a very poor place to get development help. While there are some volunteers who have the necessary technical depth, the volume of "I can't log in because I removed the login block" questions is overwhelming. Especially on weekends.
On 05/20/2011 10:28 AM, Steve Yelvington wrote:
On 05/20/2011 09:05 AM, Earnie Boyd wrote:
NubianNattySeydi wrote:
Hi I am a newbie in drupal module developement, I have my website This list is for the development of Drupal. Your post belongs in support@drupal.org. Please also review http://drupal.org/support for more areas of support.
I hate seeing questions spiral into a debate about whether the question is proper. However... if the development list is only for discussion of Drupal core, and not for the discussion of development of Drupal modules, then perhaps http://lists.drupal.org/mailman/listinfo/development should say so. It does not, nor does http://drupal.org/support make such a distinction clear.
Let's just fix the problem: http://drupal.org/node/1163962 --Larry Garfield
Did you clear your cache after creating your hook_cron (in D7)? When writing modules that utilize hook_cron, I always find it easier to add a temporary menu path to the hook_cron (or even a hook_init) just to test it out. Just remember to remove that once you are done developing & testing. Jamie Holly http://www.intoxination.net http://www.hollyit.net On 5/20/2011 6:27 AM, NubianNattySeydi wrote:
Hi I am a newbie in drupal module developement, I have my website http://seydinet.com <http://seydinet.com/> made with Managing News and now I just want create a module who if I run my cron post automaticly a tweet with a message telling for exemple "4news item added in seydinet.com <http://seydinet.com>" So I create a module directory name seydi, I add both file seydi.info <http://seydi.info> and seydi.module. I have no problem with editing seydi.info <http://seydi.info> but the big deal is with seydi.module. I start by implementing hook_cron() then I have to implement the code who gonna post the tweet and I dont know how to do that Here is the begining of my code
<?php /* implementation de hook_cron */
function seydi_cron(){ //watchdog('seydi', 'my module just add something in cron', array(), WATCHDOG_DEBUG); // db stuff if (date('G', time()) == '19'){ //tweet } }
Thanks
-- Seydina Mouhamadou Ndiaye dit "Nattyseydi" Administrateur Réseaux Montage Vidéos, Etudiant en Java, Membres de DakarLug, Gtug-dakar Tel por: 77-512-35-00, fixe: 33-824-80-80 http://nattyseydi.blogspot.com http://twitter.com/NattySeydi http://www.facebook.com/nattyseydi
Any reason you're not using http://drupal.org/project/twitter ? On Fri, May 20, 2011 at 8:13 AM, Jamie Holly <hovercrafter@earthlink.net>wrote:
Did you clear your cache after creating your hook_cron (in D7)?
When writing modules that utilize hook_cron, I always find it easier to add a temporary menu path to the hook_cron (or even a hook_init) just to test it out. Just remember to remove that once you are done developing & testing.
Jamie Hollyhttp://www.intoxination.net http://www.hollyit.net
On 5/20/2011 6:27 AM, NubianNattySeydi wrote:
Hi I am a newbie in drupal module developement, I have my website http://seydinet.com made with Managing News and now I just want create a module who if I run my cron post automaticly a tweet with a message telling for exemple "4news item added in seydinet.com" So I create a module directory name seydi, I add both file seydi.info and seydi.module. I have no problem with editing seydi.info but the big deal is with seydi.module. I start by implementing hook_cron() then I have to implement the code who gonna post the tweet and I dont know how to do that Here is the begining of my code
<?php /* implementation de hook_cron */
function seydi_cron(){ //watchdog('seydi', 'my module just add something in cron', array(), WATCHDOG_DEBUG); // db stuff if (date('G', time()) == '19'){ //tweet } }
Thanks
-- Seydina Mouhamadou Ndiaye dit "Nattyseydi" Administrateur Réseaux Montage Vidéos, Etudiant en Java, Membres de DakarLug, Gtug-dakar Tel por: 77-512-35-00, fixe: 33-824-80-80 http://nattyseydi.blogspot.com http://twitter.com/NattySeydi http://www.facebook.com/nattyseydi
participants (6)
-
Carl Wiedemann -
Earnie Boyd -
Jamie Holly -
Larry Garfield -
NubianNattySeydi -
Steve Yelvington