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) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Add photo to contact?
Pages: [1] 2

Author Topic: Add photo to contact?  (Read 9315 times)

bradjensen68

  • Guest
Add photo to contact?
April 24, 2007, 10:56:51 am
I have a terrible time putting names to faces.  It would be great if there was a way to add a small photo to the contact summary page.  Thanks for a great product!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add photo to contact?
April 24, 2007, 01:28:16 pm

1. create a custom 'File' field

2. add this custom group as inline to Contact

3. You can now upload and see the picture

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Add photo to contact?
April 27, 2007, 06:25:49 am
Really valuable information! 

Can such information be exposed to registered users only on the front end of Joomla?
Lead Developer, C3 Design.
Twitter: @FatherShawn

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Add photo to contact?
April 27, 2007, 07:59:14 am
I guess it would require to create a custom block with a few lines of code - but shouldn't be really complicated.

General algorithm would be:

if user is registered:
  if custom field with photo not empty:
     display photo;

From what I remember, the API v1 call to get photo patch information is: crm_get_contact, but you might want to verify this in API documentation.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

aszalos

  • Guest
Re: Add photo to contact?
May 05, 2007, 01:19:57 pm
For me just the name of the file is there as at the case of other files.(Clicking on it, the picture comes up.) I do not know, whether it is what the system can do, or I missed something.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add photo to contact?
May 05, 2007, 02:13:53 pm

If the file ends with .gif / .jpg we assume its an image and we display it online. if the file ends with some other extensions, we display the name of the file

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kncosta

  • I’m new here
  • *
  • Posts: 9
  • Karma: 1
Re: Add photo to contact?
February 10, 2008, 06:16:27 pm
Same for me, I have created the file custom field, as inline... when I view the contact, the photo doesnt appear, only the link for the file.

Am I doing something wrong?

Thanks,
K

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add photo to contact?
February 10, 2008, 08:19:09 pm

can u recreate what you did on our sandbox server at http://sandbox.civicrm.org/. Please post instructions here after you have done so and give us the url's etc

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

afatac

  • Guest
Re: Add photo to contact?
June 20, 2008, 01:57:53 am
I also just see the link only.

I uploaded an image file image-2.jpg and only a link is shown

image-2_1632c7cadfc46bbd5322c40f8305e1d2.jpg

I also hope that the image will be displayed for the printout.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Add photo to contact?
June 20, 2008, 03:10:09 pm
Can u recreate what you did on our sandbox server at http://sandbox.civicrm.org/. Please post instructions here after you have done so and give us the url's etc.
Protect your investment in CiviCRM by  becoming a Member!

afatac

  • Guest
Re: Add photo to contact?
June 20, 2008, 06:03:32 pm
OK, tested. It is the same.

Under Constituent Information group, I created a Field Label: Photo, Data Type: File.

Result can be seen at

http://sandbox.civicrm.org/civicrm/contact/view?reset=1&cid=59

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Add photo to contact?
June 21, 2008, 07:26:12 am
There is something about the properties of the image file that seem to cause it to work, or NOT work. I just did a test with a jpg on the sandbox and it worked as expected (image is displayed).

I've posted an bug on the issue tracker and attached your file (displays link only) and my file (displays the image).

http://issues.civicrm.org/jira/browse/CRM-3226

You can see my "working example" at http://sandbox.civicrm.org/civicrm/contact/view?reset=1&cid=104

If anyone out there has immediate clues as to what might be causing this inconsistent behavior - please chime in!
« Last Edit: June 21, 2008, 07:28:30 am by Dave Greenberg »
Protect your investment in CiviCRM by  becoming a Member!

afatac

  • Guest
Re: Add photo to contact?
June 21, 2008, 08:45:29 am
I downloaded your image and upload to my test site.

Only the file link is displayed.

Looks like it has nothing to do with the image itself.

Also, at your site, though I can see the photo, it is not shown in the printout.
« Last Edit: June 21, 2008, 08:56:44 am by afatac »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add photo to contact?
June 22, 2008, 12:30:35 am

this is now fixed in trunk, u can get the patch here:

http://fisheye.civicrm.org/changelog/CiviCRM/trunk?cs=15268

Not sure what u mean by, "it is now shown in the printout"

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

afatac

  • Guest
Re: Add photo to contact?
June 22, 2008, 01:27:31 am
>Not sure what u mean by, "it is now shown in the printout

I printed the contact summary page by using the Print button on the same page.

On the printout, the dog photo was not shown. Instead, only a box with a cross at a corner was printed at the Photo field.


Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Add photo to contact?

This forum was archived on 2017-11-26.