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 and Upgrade of civicrm
Pages: [1]

Author Topic: Customizing and Upgrade of civicrm  (Read 535 times)

sriraman.v

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 3.2.3
  • CMS version: Drupal
  • MySQL version: 5.5.8
  • PHP version: 5.2.9
Customizing and Upgrade of civicrm
March 09, 2012, 03:54:16 am
Hi ,

For Customizing the class in the Civicrm,normally we will be overridding the class in a Custom folder .For eg) i want to customize the CRM_Utils_Rule class,we have created the custom folder for civicrm  called  civicrm_custom\CRM\Utils and in the same folder we will be placing the Rule.php and we will overridding.

i have following questions.
a) Is this is the correct procedure for overridding the Core(existing) civicrm classes.
b) if so,while upgrading the civicrm from 3.x to 4.x we are facing the Backward compatability issue?

Can you help on this please ?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Customizing and Upgrade of civicrm
March 09, 2012, 05:05:11 am
It is correct and you might have problems in the upgrade. A better approach is to discuss the changes and see if you can contribute them to the core (you might have to write something a bit more generic, but will save you time in the long run, and good for the karma).

One more future proof approach if really custom needs is to write a module using hooks to modify what you need (but you can't change as much as overriding the class).

Otherwise, I use git and check in first an unmodified file, makes it easier if you have to patch a new version again
X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing and Upgrade of civicrm

This forum was archived on 2017-11-26.