Hot answers tagged

9

I see now that you are working on core code. But just for the record, if you were doing this in an extension you would proceed by implementing hook_civicrm_tabset.


9

I think I found the issue. If your CiviCRM is installed via buildkit there is a file ~/buildkit/app/civicrm.settings.d/100-mail.php which sets the CIVICRM_MAIL_LOG to /dev/null. This doesn't allow Civi to communicate to MTA (Mail Transfer Agent). The first solution is to comment out //if (!defined('CIVICRM_MAIL_LOG')) { // define('CIVICRM_MAIL_LOG', '/...


8

(Update) As of v4.7.0, the approaches below still work, but there's a better way to write to the log file using a PSR-3 logger, e.g.: Civi::log()->info('Hello, log!'); Civi::log()->error('I'm sorry, {name}. I'm afraid I can't do that.', array( 'name' => 'Stanley Kubrick', )); See also: https://civicrm.org/blog/totten/the-static-is-dead-long-live-...


7

You'll want to start with the civix generate:form command. Alter the generated code to have your form class extend CRM_Admin_Form_Setting instead of CRM_Core_Form and then follow the example of other such forms by declaring the settings that form is supposed to manage. You may also wish to insert a link to this form into the navigation menu.


6

Thanks for your interest. As one of the admin for this year, I'm going to try to explain a bit more the process. So right now, we are in the process of applying to be selected as one of the organisations Google supports, until this is done and if we are chosen again, you will then need to wait a bit more before being able to apply to the GSoC and propose ...


5

What I did for the sepa extension is a bit of a hack, but worked ok: write the xml schema files, as you have them on the (development version) core and run xml/phpGencode.php to generate the dao, that you then copy into the extension folders and voila, you got the tables ready to use (for a few more lines, you got the api files, worthwhile IMO) The process ...


5

I figured it out with the help of my mentor Kurund Jalmi. Make changes to the following files: 1) civicrm/CRM/Event/Form/ManageEvent/TabHeader.tpl 2) civicrm/CRM/Event/xml/Menu/Event.xml 3) Do a menu rebuild 4) Create the corresponding php and template files


4

The main difference is that the mails are sent "synchronously", when you save it, that sets a limit of max 50 emails, whilst the mailings are sent in the background via a cron (so you don't get any timeout and can send it to millions) The BAO/DAO for emails are into CRM/Core if you have installed civi from buildkit (or from git) you have a xml/schema ...


3

you can use hook_civicrm_postProcess or hook_civicrm_post which ever you need based on your requirement below is the link for more reference http://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference


3

Creating a form in an extension is mostly a matter of typing civix generate:form. It is documented here.


3

Typically your extension directory would contain subdirectories named css and js and resources of those types would go in there. To load them on-demand, use CRM_Core_Resources.


3

The event_queue_id points to a row in the event queue table which has a job id associated with it. The mailing job table is a join table which matches a job to a specific mailing. Check the civimail reports to give a better idea of the SQL used to construct the queries and extract useful info from the tables


3

Try the civicrm_mailing_recipients table - mailing_id tells you which Mailing they relate to. Is that what you are after?


2

This link will explain you about Email and Mailing in details http://book.civicrm.org/user/current/email/what-you-need-to-know/ give a quick read


2

What you're looking for is civix generate:entity. It's marked as "EXPERIMENTAL AND INCOMPLETE" on my copy of civix - though my version might be old. Either way, it should point you in the right direction. UPDATE: While you should still run civix generate:entity, at the time of this writing, it will create a BAO but NOT a DAO file for you. Use Xavier's ...


2

If your work is targeting versions 4.7+, you may not need to create a form like Coleman suggests. Check out the work done to overhaul the CiviCRM settings administration - it's referred to in this post as "Administer Settings improvements", and a team developed it during the Colorado sprint. You may want to ask a core team member the status of that work.


2

It's strongly recommended you use the navigationMenu hook in your extension.php file. function civisocial_civicrm_navigationMenu( &$params ) { $maxKey = ( max( array_keys($params) ) ); $params[$maxKey+1] = array ( 'attributes' => array ( 'label' => 'Civisocial', 'name' => 'Civisocial', ...


2

so using google smtp is fine for tests, but as bgm mentioned, it won't scale for production, as google doesn't allow you to send a lot of emails that way. if you have the popup, it means that civi could talk to the mail server successfully, so it's probably working and your set up is correct. What might be the issue is between gmail servers and your ...


2

You are right, we do need some templating system and we don't need to replace smarty. It's just that it's not the framework that seems to have a lot of traction these days and as generally, we are thinking of moving away from it, we might as well start with the mail feature Moreover, I do recall performances issues being mentioned for big mailings (smarty ...


1

We've worked this out to handle form creation for civicrm fields in the CiviCRM entity project. https://drupal.org/project/civicrm_entity We use the 'type' property returned from a getfields api call like so: This code here we determine what widget to use: checkout civicrm_entity.module civicrm_entity_get_field_widget() the section pertaining to dates: ...


1

A bit of terminology: Components in CiviCRM usually means CiviContribute, CiviEvent, CiviMembership, etc. I think you are referring to parts of an email template when you write about components. In general, when you are wanting to add something to the database in CiviCRM as part of the core code, you need to make sure it is added to the install tarball and ...


1

You can have several maintainers, as for the authorship, it's a single one indeed (top of my head) and it's customary to keep the initial one and explain the documentation (eg. README.md) that you are taking over. Does it solve your problem?


1

Alternatively, I tend to create the file in sql and then create a DAO in my extension with the few functions that are required. Check https://github.com/CiviCooP/no.maf.oppgavexml/blob/master/CRM/Oppgavexml/DAO/Oppgave.php for an example of a DAO I have copied and pasted into my extension for a table I created in the Upgrade class using $this->...


1

Part of the job is to try shaping more precisely what your project will be, and discuss it with your mentor and the community. Have you contacted directly the potential mentors? our irc channel is a good place to hang out and have more interactive discussions In general, the more active you are in the community (eg trying to ask or answer specific ...


1

you need to create an API in order to use schedule jobs look for table called civicrm_job and make an similar entry for the newly created API and this will create an entry in schedule jobs you can create an Extension first and then API in the Extension find the below link http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension if you ...


1

Can you use the superglobal? That is, $_SERVER['HTTP_REFERER']?


1

This sounds similar to a payment processor flow (especially the "button" style processors). In those, you typically pass a "return URL" to the remote site, and they would in turn direct your visitor back to the specified URL. If the return URL needs to be a separate callback (eg an IPN URL), then you might add additional parameters (&return=civicrm%...


1

This took me way longer than I anticipated, so I thought I'd pen a fuller answer for the most minimal settings form. It assumes you're building a modern extension, generated with civix. Step 1: define your settings Create a settings dir in your extension's base directory, and within that create a whateveryouwant.setting.php. Gotcha 1 is that while the ...


1

It is a foreign key to the civicrm_mailing_event_queue table. It is in lockstep since all your emails are being delivered etc and thence the two tables are in sync. However there is no guarantee of this and you cannot rely on it, hence the need of the foreign key.


1

Maybe the standard wrong suggestion :-) but did you try the generate:module whilst in a subfolder of your website root?


Only top voted, non community-wiki answers of a minimum length are eligible