Skip to main content

GROWING AND SUSTAINING RELATIONSHIPS

GROWING AND SUSTAINING RELATIONSHIPS
Close
Michael McAndrew

Implementor, Trainer, Documentator and Developer.

Third Sector Design

http://www.thirdsectordesign.org

CiviCRM helps us help non profits to do fantastic things with their data.
Being closely involved with the developers and documentation team on a daily basis ensures that we can give our clients the best and most up to date advice on how they can use CiviCRM to meet their needs.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Yashodha Chaku

CORE TEAM MEMBER

WEB ACCESS INDIA PVT. LTD.

http://webaccessglobal.com

Its great to work on a project that has a profound impact on non profits. I am very excited about the work we do on CiviCRM which involves building on each other's ideas to create best of breed solutions for non profits. The fact that CiviCRM is an open source project with an amazing community and dedicated developers is an icing on the cake.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Jake Martin White

Implementor, Developer

PeaceWorks Technology Solutions

http://www.peaceworks.ca

PeaceWorks provides technology solutions for not-for-profit organizations. CiviCRM fills an important niche among our clients who need a flexible, comprehensive, user-friendly, web-integrated CRM solution.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Kellie Brownell

End-user

EFF

https://www.eff.org

The CiviCRM community has been a tremendous resource for new ideas and helping us solve problems. We are excited to contribute customizations EFF makes back to core and support new features such as batch entry for offline donations or multiple payment processors on one donation form.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Alice Aguilar

Implementor

Progressive Technology Project

http://progressivetech.org

The organizations we work with are experiencing the benefits of a robust tool that is
easy to use, supports their work, and allows them to collect and track data from various parts of their organization, such as membership, fundraising, communications, and organizing into a centralized database. CiviCRM as an open-source solution also allows us to nurture and build a user community to share and create a common vision of future features that would be useful to the community organizing field. Just two years after our pilot project, we're currently supporting 30 community organizing groups to use CiviCRM, and the community is steadily growing.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Kasia Wakarecy

Administrator, Implementator, Developer, End-user

Freeform Solutions

http://www.freeformsolutions.ca

Freeform Solutions uses CiviCRM for our internal CRM. We are also a NFP IT support organization and we implement CiviCRM for NFP organizations we work for because we find that CiviCRM is the best open source CRM out there.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Kelley Graham

Implementator End User

Green Geeks

http://green-geeks.com

Civi is the best! All my non-profit and community outreach activities are well supported by the platform. I love to help others benefit.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Amy Bucaida

Administrator

Missouri Credit Union Association

http://www.mcua.org

We are a full CiviCRM install with Drupal.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Leena Nangia

Consultant

nfpservices

http://www.nfpservices.co.uk/

We use CiviCRM for our own business functions. Nfpservices participate in the development of CiviCRM and contribute enhanced functionality to the community.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Jamie McClelland

DEVELOPER AND IMPLEMENTER

PROGRESSIVE TECHNOLOGY PROJECT

http://progressivetech.org
GROWING AND SUSTAINING RELATIONSHIPS
Close
Ken Moire

Implementor

Spry Digital LLC

http://sprydigital.com

Appreciate the shared resources on the CiviCRM website. We continually refer to it for updates and knowledge.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Merlise Clyde

End-user, administrator

International Society of Bayesian Analysis

http://bayesian.org

ISBA is an international non-profit society with members from all over the world. We have sections that represent different scientific areas and chapters that represent different regions of the world. Civi Member powers our membership system! We use CiviEvent for Conference and Workship registration, and utilize CiviPetition for creating new sections to our society through member petitions. We are epxloring how CiviGrants can be used to track our travel awards and look forward to features for integrating accounting and finance. As a growing non-profit CiviCRM plays a major role in managing our membership system!

LOGIN | REGISTER
  • Create new account
  • Request new password

Search form

  • BLOG
  • DEMO
  • Find An Expert
  • NEED HELP
  • SUPPORT US
  • DEVELOPER RESOURCES
CiviCRM Community Site logo CiviCRM Community Site
  • WHAT IS CIVICRM
    • Community
    • Case Studies
    • Experts
    • Contributors
    • Core Team
    • Licensing
    • Contact Us
  • WILL CIVICRM MEET YOUR NEEDS?
    • Contacts
    • Contributions
    • Communications
    • Peer-To-Peer Fundraisers
    • Advocacy Campaigns
    • Events
    • Members
    • Reports
    • Case Management
  • GET STARTED
    • Evaluate Your CRM Needs
    • Evaluate CiviCRM Features
    • Read Books
    • Contact an Ambassador
    • Demo CiviCRM
    • Download CiviCRM
    • Download Extensions
    • Find An Expert
  • PARTICIPATE
    • Join the community
    • Make it happen
    • Support CiviCRM
    • Meet ups
    • Document CiviCRM
    • Translate CiviCRM
    • Developer resources

You are here

Home » Blogs » andrewhunt's blog

Blog

  • API
  • Architecture Series
  • CiviCampaign
  • CiviCase
  • CiviCon
  • CiviContribute
  • CiviCRM
  • CiviCRM v4.1
  • CiviEvent
  • CiviMail
  • CiviMember
  • CiviMobile
  • CiviPledge
  • CiviReport
  • Documentation
  • Drupal
  • Extensions
  • Finance and Accounting
  • Interface Design and Layout Standards
  • Internationalization and Localization
  • Joomla
  • Make it happen
  • Marketing and Promotion
  • Meetups
  • Older Versions
  • Release
  • Schools
  • Solutions (case studies and user stories)
  • Sprints
  • Teams
  • Training
  • v1.6
  • v1.7
  • v1.8
  • v1.9
  • v2.0
  • v2.1
  • v2.2
  • v2.3
  • v3.0
  • v3.1
  • v3.2
  • v3.3
  • v3.4 and v4.0
  • v4.2
  • v4.3
  • WordPress

Quick Tool for Upgrading Custom Templates

Submitted by andrewhunt on December 3, 2012 - 16:21

Do you modify template files for your site?  If so, you ought to know the tedious process of updating all the overridden template files every time you upgrade.  (If you don't know that pain, either you've never upgraded or you should quit reading and go check your customized files.)

The method of using .extra.tpl files is helpful for tacking some jQuery on the end, but if you're altering parts of the page or adding to the middle, you've got to copy the whole template file and modify it.

At AGH Strategies, a number of clients have lots of customized templates, and when we run upgrades for them, we need a reliable and efficient way to separate the customizations from the rest of the file that's just copied from CiviCRM.  We'll then apply the changes to new versions of the template files.

One command will take care of generating a diff of everything, but it's tricky to get all the inputs right, so I saved it as a bash script and shared it on GitHub so it's easy to modify for different types of installations.  Here's the core of it:

diff -r -u yourcivicrmcodebase/templates yourcustomtemplatesdirectory | sed '/^Only in/d' > outputfile

It's basically a straightforward diff command, but the vast majority of template files won't have a corresponding custom template file.  Using sed will prevent the output from being overwhelmed by the list of files that are only in the regular templates directory.

Once you generate the patch of your changes, you can apply it to the templates that come with the new version of CiviCRM.

The script will copy your custom templates to a temporary directory and overwrite them there with the corresponding templates from a new version of CiviCRM that you point it to.  You can then try applying the patch of all your changes.  Once all the changes are made, you can simply replace the contents of your custom templates folder with those in the temporary directory.

Let me know what you think in the comments, and please share any improvements or alternate approaches.

  • andrewhunt's blog
  • Log in or register to post comments

Comments

Interesting

Permalink Submitted by xavier on December 3, 2012 - 22:46

What we do is to use git:

copy first the standard template and commit it with something explicit ("unmodified version 4.2.1"), then do the changes.

Then we do the modif and commit them

When there is a new release, we create a new branch and do the initial check in.

We either generate the diff and apply it directy (I'm sure there are some magic commands in git to do it directy but my gitfu isn't at the level)  or more often than not end up modifying manually because the template has changed too much.

Finally, we still use a lot of .extra to generate the html, and a onliner of jquery we need into the right place in the template. That's becoming more and more our solution.

 

 

  • Log in or register to post comments

.xtra html & jquery oneliner

Permalink Submitted by fen on December 4, 2012 - 09:00

Hi Xavier,

I think I know what you are suggesting, but could you give an example of this technique?

(And thanks, Andrew, for starting this discussion!)

=Fen

  • Log in or register to post comments

KDiff3

Permalink Submitted by jgowing on December 4, 2012 - 16:37

We use a great tool open source tool http://kdiff3.sourceforge.net/

It allows you to do a visual merge of 3 source directories and save the output to a fourth location.

By settting the three source directories to .../old/templates, .../old/custom_templates, and .../new/templates and setting the output to new/custom_templates it allows us to (fairly) painlessly upgrade.

I recommend giving it a try.

 

  • Log in or register to post comments

I also add a snippet at the

Permalink Submitted by dalin on December 6, 2012 - 11:59

I also add a snippet at the top of each .tpl override:


{*
What has changed:
- moved x below y
- foo
- bar
*}

Also take pause before you override a tpl to see if you can't just make the change with CSS or a hook.  Both of those methods is more maintainable.

Url: 

http://advomatic.com
  • Log in or register to post comments

For 4.2 and later start using crmRegion

Permalink Submitted by lobo on December 6, 2012 - 12:28

 

Check:

http://wiki.civicrm.org/confluence/display/CRMDOC42/Region+Reference

If you are just making a few adds/remove to the template.This is a lot more granular and hence can potentially work across major version changes

note that we have not annotated most of the templates, but we should do this incrementally as folks start using this functionality

lobo

 

Url: 

http://civicrm.org/
  • Log in or register to post comments

CIVICRM


GROWING AND SUSTAINING RELATIONSHIPS

WHAT IS CIVICRM
  • Community
  • Case Studies
  • Experts
  • Contributors
  • Core Team
  • Licensing
  • Contact Us
WILL CIVICRM MEET YOUR NEEDS?
  • Contacts
  • Contributions
  • Communications
  • Peer-To-Peer Fundraisers
  • Advocacy Campaigns
  • Events
  • Members
  • Reports
  • Case Management
GET STARTED
  • Evaluate Your CRM Needs
  • Evaluate CiviCRM Features
  • Read Books
  • Documentation
  • Demo CiviCRM
  • Download CiviCRM
  • Download Extensions
  • Find An Expert
PARTICIPATE
  • Join the CiviCRM Community
  • Read Our Blog
  • Community Forum
  • Attend a Training or Meetup
  • Make It Happen
  • Become A CiviCRM Developer
  • Issue Tracker
  • Help with Documentation
  • Translate