Questions tagged [developer]

A developer is a person with the technical IT skills to change the code base of CiviCRM. Preferably s/he knows about PHP, SQL, HTML and Javascript.

Filter by
Sorted by
Tagged with
18
votes
3answers
2k views

How do I get more than 25 records from the API?

I'm making a normal api call such as: $params = array( 'version' => 3, 'sequential' => 1, 'membership_type' => 1 ); $result = civicrm_api('Membership', 'get', $params); But I only get ...
11
votes
1answer
692 views

How would you anonymise (or redact) private data for developer stage?

Private information is confidential. However for developers to debug errors they need a copy of your data that's close enough to production to effectively debug. How can we redact, strip or remove ...
11
votes
2answers
92 views

How to communicate with the users of an extension?

We are discussing about which version(s) to maintain compatibility with, and would like to be able to discuss that with the users of that extension. Is there an easy way to do that? Eg. civicrm.org ...
10
votes
2answers
2k views

What are the different cache clearing mechanisms relevant when developing?

When doing developpment, i sometimes found it difficult to clear all the cache in a way i'm sure everything i have done is taken into account. Let's take some examples : in an extension, i do an ...
10
votes
3answers
779 views

How do I set up dev environment with buildkit?

I am new to the developer/code side of CiviCRM and attending the Dev training at CiviCON. I saw a post on StackOverflow about installing buildkit but haven't seen it re-posted here. I would appreciate ...
9
votes
1answer
260 views

How to develop extension that relies on libs brought in by composer

I'm wanting to (re)develop an extension and I'd like to use some 3rd party libraries, eg. guzzle, that I would normally manage via composer. So my github repo will contain a composer.json file, but ...
9
votes
1answer
83 views

How do I modify the new 4.6 CiviMail form?

I am the author of a CiviCRM extension that needs to disable, depending on configuration, the URL tracking and open tracking checkboxes of the mailing form. In version 4.4 this was accomplished using ...
9
votes
0answers
110 views

Can anybody volunteer to test my Android App: Cividroid - A CiviCRM companion on Android!? [closed]

I am working on an Android App for CiviCRM: Cividroid - A CiviCRM companion on Android! as a GSoC 2015 project. I am not a regular CiviCRM user and hence I don't have a live environment to test the ...
8
votes
1answer
526 views

How to print variable/debug data from your extension.php?

I am trying to add a menu entry in the navigation, but this is causing the navigation menu to disappear, I am trying to debug the code but could not find any particular file. I have checked the ...
7
votes
2answers
210 views

Find CiviCRM version programmatically?

Within a CiviCRM extension, what's the best way to determine the current CiviCRM version in versions 4.6.x and above?
7
votes
2answers
51 views

Are there up-to-date CiviCRM coding standards available?

I am using NetBeans 8.1 under Windows to develop/debug some CiviCRM code. Previous attempts at getting the contribution accepted ran into trouble as they failed to comply with the coding standards. ...
7
votes
1answer
158 views

Are we going to switch to angular 2?

Angular has a new shiny version that seems to offer several new features and a faster experience. https://angular.io/features.html https://medium.com/google-developer-experts/angular-2-introduction-...
6
votes
3answers
605 views

CiviCRM and Docker

Are any of the CiviCRM core team using docker? and is there a preferred installation? I note there are a few drupal docker projects, such as this but couldn't see anything for Civi.
6
votes
4answers
268 views

API: How do I delete a custom value?

I may be blind but I can't see any api call to delete a custom value?! CustomValue entity is missing a delete action. What am I missing?
6
votes
2answers
187 views

How could I use CiviCRM for sponsorship

We have a node called sponsorship that is a person, place, or thing. Person is likely a child, but it could be a teacher, nurse, etc. A person generally has one donor that pays a monthly amount. A ...
6
votes
3answers
594 views

What's the correct way to log debug info to log?

The "current" wiki says to use CRM_Core_Error::debug and says, "Most runtime errors are logged here, as well as data that you explicitly write to log using the CRM_Core_Error::debug log=true parameter....
6
votes
1answer
104 views

Moving Angular extension into /ang/

I'm attempting to move code from an angular extension into core. I've created an ang/crmModuleName and moved the ctrl and partials into it, and crmModuleName.css into the ang/ and crmModuleName.js ...
5
votes
2answers
547 views

CiviCRM integration with Eventbrite

I would like to create/update events in CiviEvent by using Eventbrite webhooks. One of the requirements is having an endpoint page that will receive data sent by Eventbrite API. How can I create that ...
5
votes
1answer
217 views

How can I use Xdebug with CiviCRM unit tests?

Ideally in conjunction with an IDE (I use Netbeans, but will fire up pretty much anything that gets this to work).
5
votes
1answer
62 views

How do I make the menubar a different color on my dev/staging sites

Wouldn't it be nice if I could visually distinguish my various dev/staging sites with a different menubar color for each one? Is this possible in CiviCRM and if so what version?
5
votes
4answers
310 views

Why is it important to define new Entities for new types of data?

The Developer Guide includes detailed instructions on declaring a new entity which begins with this: If you want your extension to store data in the database, then you will need to create a new ...
5
votes
1answer
142 views

How do I install an extension directly from git?

Now that I have found my extension directory, is installing an experimental (or developmental) extension as simple as cloning it into there? eg: # find extension directory DIR=$(cv ev --out=pretty '...
5
votes
1answer
142 views

What is the mechanism for tailoring an Angular form?

I want to modify the behaviour of an Angular form. The answer to question 4700 tells me 'how' to do it (add some JavaScript), but I'm interested in 'where' to do it. If it was a PHP form I could use ...
4
votes
3answers
187 views

How to create a hook in an extension?

I want to give others the chance to do something when certain events happen in my extension. So to be clear: I'm not wanting to use existing hooks in my extension, I'm wanting to create a new hook ...
4
votes
2answers
215 views

How to increase limits on activity attachments?

Current (4.6.7) limits say that an activity can have up to 3 attachments, each being less than 2MB. I need more, and a bigger file size limit. What are the obstacles to achieving this? I can't see ...
4
votes
4answers
261 views

What's the recommended way to handle redirection after quickform submissions?

I often find myself writing calls to CRM_Utils_Redirect in my postProcess methods. But in core code I don't see this. I see the use of methods like $session->replaceUserContext and postProcess ...
4
votes
3answers
143 views

hide profile title in Fieldset (legend)

Is there a way to hide the profile title. I have added a tracking profile which is being populated by values passed in the URL to the contribute page. The fields I have added are being hidden, so the ...
4
votes
1answer
72 views

Within an extension how can load a custom `Civi` name-spaced class?

Within my extension I can load classes from CiviCRM's core codebase like this: $foo = new \Civi\Core\AssetBuilder(); And I can also load custom classes that I've written in my extension like this: ...
4
votes
1answer
69 views

What does LExIM stand for?

I've heard a few developers refer to LExIM. What on earth is it? (Other than "Reading" in Albanian or an on-line learning company?)
4
votes
1answer
53 views

How do I make one hyperlink which shows its target page as a modal dialog when clicked?

There are lots of links in CiviCRM which will: (a) open an overlaid modal dialog when clicked, and (b) open the same content in a new page when Ctrl+clicked or middle-clicked. This is cool and I want ...
4
votes
1answer
138 views

Fetch data over the web: curl, file_get_contents or something else?

I've written quite a few extensions that need a way to fetch data from the web. Sometimes I've used file_get_contents sometimes cURL, other times I've sucked in (geddit!) Guzzle. Each of those has it'...
4
votes
3answers
532 views

How to set a default value for a custom field

EDIT: this is NOT working, at least in CiviCRM 5.24.2 EDIT: this is done automatically by CiviCRM from 5.18+ I have a custom fieldset on Contributions that uses an option list. The option list has a ...
4
votes
1answer
98 views

What character is VALUE_SEPARATOR?

I need to run a MySQL query to split the values in the fee_level field of the civicrm_participant table. I just can't determine what character to use as the delimiter. When I look at VALUE_SEPARATOR ...
4
votes
1answer
164 views

How can I use CiviCRM's cache table?

When developing an extension, I'd like to cache some data to avoid the expense of re-calculating it. Is there a civicrm version of the Drupal's caching interface for developers?
4
votes
1answer
33 views

How does in-line editing editing work in CiviCRM?

Is there a reference anywhere for the in-line editing, e.g., 'Click Here to Edit' in CiviCRM? I need something similar for my extension and want to reuse as much as I can.
4
votes
1answer
63 views

Is there a way to alternate between different outbound mail servers?

I would like to be able to use different mail servers to send different emails, for instance: all transactional emails (contribution receipt, event registration...) sent by our mail server, all mass ...
4
votes
1answer
50 views

What is the best way to change the intro on a Contribution page based on URL?

I have a contribution page that uses values passed via URL to track specific information about the source of the contribution. www.domain.org/civicrm/contribute/transact?reset=1&id=8&campaign=...
4
votes
1answer
33 views

How do I see which permissions are necessary to execute a given API call?

If I pick a random entity and action, what steps can I take (manually if necessary) to see which specific permissions are necessary for CiviCRM to execute an API call with check_permissions=1?
4
votes
1answer
57 views

How to manage AngularJS dependencies within an extension

I'm creating an extension and using AngularJS within it. I've found a 3rd party AngularJS library that I'd like to use in my extension (in this case ngInfiniteScroll). What is the proper way to make ...
4
votes
3answers
39 views

What's the best way to code for extensions to work for multiple civicrm versions?

For some extensions, we need to have a different behaviour for different civicrm versions. I can either manage two branches, but I'll have to backport some fixes and that seems a big overhead. For ...
4
votes
1answer
75 views

How do I set up PhpStorm for CiviCRM development?

I've acquired PhpStorm and I was wondering if there was any guidance on the best way to set it up for CiviCRM development. I saw there was a little information about coding style setup but there are a ...
4
votes
0answers
176 views

How can I put an AngularJS page inside a crm-popup modal window?

If I add class="crm-popup" to an internal hyperlink in CiviCRM, I can make CiviCRM open the target page inside a modal dialog. Cool! But if the target page is an AngularJS page (e.g. /civicrm/a/#/...
4
votes
0answers
50 views

Will unsupervised dedupe rules be used in API Contact create?

I want to import an old database using API Contact create. In the de-dupe rule documentation it mentions "They are also used when you Import contacts". I see in the API documentation that there exists ...
3
votes
3answers
294 views

ER diagram for the latest Civicrm , Foreign key in Structure, test cases/plans

Where can I get the ER diagram for the latest CiviCRM? I need it for internal reporting purposes in our organization. I am able to download the Table structure from phpMyAdmin. However, it does not ...
3
votes
1answer
108 views

How do I test a CiviCRM upgrade script?

I have a PR that adds a file CRM/Upgrade/Incremental/sql/4.7.alpha1.mysql.tpl. How should I go about testing this code?
3
votes
2answers
94 views

Create new contact sub-type when extension is installed

I'm building a new extension using civix and buildkit. I need to create a new ContactType (sub-type of individual) on install (if it doesn't already exist). I know how I would do it, but I'd prefer ...
3
votes
2answers
58 views

How to reset the headless test db?

I'm using headless phpunit tests. I noticed that the first time I do this it pauses and says about installing schema for xxxx - a test database. If you break stuff enough, you can end up with a ...
3
votes
3answers
47 views

At what line in a file should I add a new variable

I want to add a new variable to the variables.php file. Should I add it at the bottom of the file, or where it logically sits in the order of the variables, ie under the variable that will be above ...
3
votes
3answers
452 views

CiviCRM does not have full functionality support for refunds and partial payments so what is the current way to tackle this type of situation?

I have applied as a GSoC student to work on a project that would provide Refunds and / or Partial Payments functionality for CiviCRM. I am seeking current solution to do this when needed so I can ...
3
votes
1answer
51 views

How can I help review/test a Webform CiviCRM PR

Please describe the exact steps and requirements - of what I can do if I see a PR in https://github.com/colemanw/webform_civicrm/pulls - that I think would be useful to our organization.