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 Profiles (Moderator: Dave Greenberg) »
  • Is there a way to display the Drupal profile photo on CiviCRM contact summary?
Pages: [1]

Author Topic: Is there a way to display the Drupal profile photo on CiviCRM contact summary?  (Read 800 times)

daveatkins

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
  • CiviCRM version: 4.1.6
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.41
  • PHP version: 5.2.10
Is there a way to display the Drupal profile photo on CiviCRM contact summary?
February 08, 2013, 10:30:15 am
I've been tweaking a customized  Summary.tpl and see this promising code:

                {if !empty($imageURL)}
                    <div id="crm-contact-thumbnail">
                        {include file="CRM/Contact/Page/ContactImage.tpl"}
                    </div>
                {/if}

Now how do I hook that up with Drupal so the profile photos that users have uploaded to Drupal display on the Civi contact page?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is there a way to display the Drupal profile photo on CiviCRM contact summary?
February 10, 2013, 05:04:41 am
As far as I know, you would have to use PHP code to fetch the URL of the image from Drupal. The image is associated with the user in Drupal and this code is part of CiviCRM, which doesn't have direct access to that image.
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.

daveatkins

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
  • CiviCRM version: 4.1.6
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.41
  • PHP version: 5.2.10
Re: Is there a way to display the Drupal profile photo on CiviCRM contact summary?
February 12, 2013, 11:57:35 am
for what it's worth, the Drupal url of a user's photo follows a pattern like
/sites/default/files/pictures/users/picture-uid.jpg
where uid is the Drupal user ID (which we have in Civi)
but of course you cannot assume every user has a photo, so you still need to do some kind of lookup before just substituting the uid into an image tag.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Is there a way to display the Drupal profile photo on CiviCRM contact summary?

This forum was archived on 2017-11-26.