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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing New Event page
Pages: 1 [2]

Author Topic: Customizing New Event page  (Read 4335 times)

pwnedulongtime

  • Guest
Re: Customizing New Event page
June 24, 2008, 03:52:14 pm
Well it appears I made a typo, as you can see from some of the code i pasted earlier "recuring" ...2 Rs, fail!

And thanks to Lobo for going through my code and pointing out other problems.

Works now woohoo!

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: Customizing New Event page
June 24, 2008, 03:59:27 pm

so now that we've gotten past the errors, do u want to describe how the recurring event stuff will work by the addition of a recurring date

i'm more interested in the plan / thoughts than actual code :)

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

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Re: Customizing New Event page
June 25, 2008, 12:40:52 am
I've written a Drupal 5.x module to approach this problem from a different angle. It doesn't change any database structure. Instead, it clones an event based on a repeat pattern like 'every other week' or 'every third thursday.' Cloned events are almost entirely independent of one another. (excepting location data & Tell-a-friend settings.)

You can get the beta version here:

http://www.ninjitsuhosting.com/files/civirepeat-1.0-beta.tar.gz

Provided with No Warranty and ambiguous licensing, so redistribution is not advised at this time, but you're welcome to use & modify it all you want.

Note that the install hook (which modifies FK's in you civiCRM database) is not widely tested, so you may need to run the contained SQL manually. It should report success or failure on install.

There is minimal dependency on date_api module. I'm working on removing that, but you'll probably still need it.
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Re: Customizing New Event page
June 25, 2008, 11:31:50 am
To clarify the licensing, this currently contains GPL code, so the beta version is GPL'd by infection. I may or may not remove all GPL code & release a final version under a more free license.
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

pwnedulongtime

  • Guest
Re: Customizing New Event page
June 25, 2008, 11:34:17 am
What needs to be done to restore the DB on uninstall?

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Re: Customizing New Event page
June 25, 2008, 04:22:01 pm
Technically, nothing. I think your database is better off now, as the default behavior was to err on the side of DELETING data that you may want to keep. I consider the install SQL to be a bug fix.

If you really want to revert, run this SQL:

ALTER TABLE civicrm_event DROP FOREIGN KEY FK_civicrm_event_loc_block_id;
ALTER TABLE civicrm_event ADD CONSTRAINT FK_civicrm_event_loc_block_id FOREIGN KEY (loc_block_id) REFERENCES civicrm_loc_block(id) ON DELETE CASCADE;

(Lobo can correct if I'm wrong; he provided the SQL that is run on install.)

Basically, the choices are: When two events share a location, if one event is deleted, should I delete the other events also? CiviCRM says, "yes, delete them all" by default. CiviRepeat changes this to say, "No, only delete the event I've chosen."
« Last Edit: June 25, 2008, 04:24:23 pm by Matt2000 »
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing New Event page

This forum was archived on 2017-11-26.