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) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Image crop extension
Pages: [1]

Author Topic: Image crop extension  (Read 1574 times)

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Image crop extension
July 29, 2013, 09:13:09 am
I did a quick test (read: incomplete / unstable extension) to integrate Jcrop and CiviCRM.

For now, the main use-case is to make it easy to crop  the main "contact image", but could be extended to profiles and custom files too:
http://www.bidon.ca/files/civicrm-imagecrop-example.jpg

The main part, and probably the most risky (security), is still missing: saving the cropped result on the server. So far, just wanted to get a prototype working, so that the client funds the work.

Code so far is available here:
https://github.com/mlutfy/ca.bidon.imagecrop

I searched a bit on the topic, and it seems to come up now and then, but I haven't seen any published solution for it. If there are any, or if you have any suggestions/ideas, please let me know!

For more information on Jcrop:
http://deepliquid.com/content/Jcrop.html

Mathieu
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Image crop extension
July 29, 2013, 05:34:34 pm
This seems like a good idea!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Image crop extension
July 31, 2013, 07:24:07 am
If anyone wants to extend the extension to Drupal, jcrop is in this module:

https://drupal.org/project/imagefield_crop

And for WordPress, jcrop.js actually ships with core WP. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Image crop extension
July 31, 2013, 07:35:20 am
Good point! I will add a check to avoid loading the JS library if it's already loaded by the CMS. :)

I received a green light from my client, so I should have something a bit more usable in a few days.
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Image crop extension
August 07, 2013, 01:35:11 pm
For those following, there is now a usable version available:
https://github.com/mlutfy/ca.bidon.imagecrop

It has a settings page (/civicrm/admin/imagecrop) and works mostly on the contact image, but it does crop, and the UI is usable. More technical information in the readme file for those interested, and I also opened a few issues for short-term goals.
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Image crop extension

This forum was archived on 2017-11-26.