CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord.php --> CiviMember Status Update Module (Drupal)
Pages: [1]

Author Topic: UpdateMembershipRecord.php --> CiviMember Status Update Module (Drupal)  (Read 989 times)

rjlang

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 1
  • CiviCRM version: 4.2.8
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3.19
UpdateMembershipRecord.php --> CiviMember Status Update Module (Drupal)
July 22, 2011, 11:39:07 am
Hi,

We've been using CiviCRM for a few years, but about a year ago started offering members-only content on our site and so needed to run the UpdateMembershipRecord.php script regularly to update membership status when memberships expire. But our shared host didn't permit setting up a cron task, so we wrapped the script in a module that attached it to the Drupal cron run (which was then fired by the Drupal Poormanscron module). Then we started running into timeout issues during the script execution (we have a couple thousand members), and again, our shared host wouldn't let us try to tune PHP/MySQL, so we hacked the script a bit to spread updates out over a settable number of runs, rather than trying to update them all at once. And then our local administration didn't want the automatic sending of renewal emails, so we added an option to turn renewal emails on/off independently of everything else. And for assorted troubleshooting, it would be nice to be able to fire a manual synchronization and to see when the last one was fired and how long it took, so we added that to the module, too.

We recently upgraded Civi to 3.4 and went back and upgraded our pet module (which we call CiviMember Status Update) to use the 3.4-vintage UpdateMembershipRecord.php script, and it's now running on our site. (The old module did its thing properly for a year or two prior to the upgrade. New version has been purring along for a few days.) It occurs to us that others might find this module useful, particularly as a companion to the CiviMember Roles Sync module (which also attaches its functionality to Drupal cron, and which we also use). So we'd like to make it more generally available (yay open source), but are not entirely sure about the best way to do that. Creating a project page on Drupal.org looks like a possibility. Any further suggestions/recommendations?

Thanks,

Robert

P.S. Prior to any more formal release, if anyone would like to try it out, contact me and I'll email it to you.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: UpdateMembershipRecord.php --> CiviMember Status Update Module (Drupal)
July 22, 2011, 11:58:56 am

cool. thanx for sharing.

You should definitely create a project page on drupal git and submit your code there with releases for the various drupal/civi versions (that you have). that would definitely help a few other folks :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

rjlang

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 1
  • CiviCRM version: 4.2.8
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3.19
Re: UpdateMembershipRecord.php --> CiviMember Status Update Module (Drupal)
July 22, 2011, 12:04:40 pm
OK. We've never done that before (and we're all part-timers here), so it will be a learning experience, I'm sure!

Robert

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord.php --> CiviMember Status Update Module (Drupal)

This forum was archived on 2017-11-26.