Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-16479: Support for image styles #364

Merged
merged 3 commits into from
Oct 12, 2016

Conversation

JKingsnorth
Copy link
Contributor

@JKingsnorth JKingsnorth changed the title [WIP] CRM-16479: Support for image styles (proof of concept) CRM-16479: Support for image styles May 9, 2016
@nganivet
Copy link
Collaborator

Joe - I can review this PR since will need to merge it for one of my customers.

@JKingsnorth
Copy link
Contributor Author

Hi @nganivet did you get the chance to review this PR?

@nganivet
Copy link
Collaborator

nganivet commented Jul 6, 2016

John, yes reviewed the code and all seems good. It is also installed on
one of my production websites and all works well.

------ Original Message ------
From: "John Kingsnorth" [email protected]
To: "civicrm/civicrm-drupal" [email protected]
Cc: "nganivet" [email protected]; "Mention"
[email protected]
Sent: 7/6/2016 7:21:49 AM
Subject: Re: [civicrm/civicrm-drupal] CRM-16479: Support for image
styles (#364)

Hi @nganivet did you get the chance to review this PR?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@JKingsnorth
Copy link
Contributor Author

Great news, thanks for testing. Can you comment on the JIRA issue too with
the steps you took to test. Hopefully we can get this merged into the next
release then :)
On 6 Jul 2016 19:34, "nganivet" [email protected] wrote:

John, yes reviewed the code and all seems good. It is also installed on
one of my production websites and all works well.

------ Original Message ------
From: "John Kingsnorth" [email protected]
To: "civicrm/civicrm-drupal" [email protected]
Cc: "nganivet" [email protected]; "Mention"
[email protected]
Sent: 7/6/2016 7:21:49 AM
Subject: Re: [civicrm/civicrm-drupal] CRM-16479: Support for image
styles (#364)

Hi @nganivet did you get the chance to review this PR?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#364 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AE-JuWWpQZYb2kI7ibwWOHvRXdsPESsOks5qS_VSgaJpZM4Hz0uS
.

@houblon
Copy link

houblon commented Nov 16, 2016

Is there supposed to be an interface for this in Views? The code looks like it provides one, but I'm not seeing it. I'm using Drupal 7.52 and CiviCRM 4.7.13, and have installed both the CiviCRM Entities (CiviCRM Entity Views Extras is enabled) and Picture modules. Attached is a screenshot of the Views dialog I get for the CiviCRM Contacts: Contact Image field. Please advise.

If there's a better place to post a question about this, let me know where. Thanks.

civicrm_contact_image_views_dialog

@JKingsnorth
Copy link
Contributor Author

Hi @houblon . The 'Image' module will also need to be enabled. And the CiviCRM images will need to be in the 'public://' files directory in Drupal. The functionality is enabled if 'Image' is enabled, and it can find the right directory (which is handled by this function: https://github.com/civicrm/civicrm-drupal/pull/364/files#diff-141bb1408c66b6d40a72bf7ad9fba3ecR145)

@houblon
Copy link

houblon commented Nov 18, 2016

Hi @JKingsnorth . Thanks for the quick reply.

I verified that the Image module is enabled (it is; the Picture module requires it), and changed the path settings in the Upload Directories settings of CiviCRM (see attached screenshot), unfortunately with no effect on the Views dialog for the CiviCRM Contacts: Contact Image field. I verified that images uploaded through the CiviCRM contact edit form are uploaded to Drupal's 'public://' files directory.

I also tried changing the CiviCRM Resource URLs path for Image Upload URL to the 'public://' files directory path, but that also didn't have a noticeable effect, and I got an warning that this path shouldn't publicly accessible, so I figure this isn't the path to change.

Is there something else I need to do? Also, for CiviCRM images, is it possible to specify a subdirectory of Drupal's 'public://' files directory?

civicrm_upload_directories_settings

@magnolia61
Copy link
Contributor

Works for me using the patched civicrm_handler_field_contact_image.inc
Our configuration: CivCRM 4.7.12 Drupal 7.5.2
civicrm_entity_views_extras: enabled
Image Directory: /home/xyz/domains/ourdomain.nl/public_html/prod/sites/default/files/civicrm/persist/contribute/
Thanks your for this! Will this be included in the 4.7.14 release?

@houblon
Copy link

houblon commented Nov 29, 2016

@JKingsnorth, I figured it out. I'm using the "CiviCRM 4.7.13 for Drupal 7.x" download from https://civicrm.org/download/list and didn't realize it doesn't include the latest updates for file civicrm_handler_field_contact_image.inc (thanks, @magnolia61, for mentioning that it's currently a patch) . Thanks very much for this functionality; it's working now on my site. As @magnolia61 asked, will this be included in the 4.7.14 release, or should I plan to patch this file for that release?

@colemanw
Copy link
Member

If you're asking about the patch from this PR, yes it has been merged and will be included in the next release.
If you're talking about a different patch, please advise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants