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) »
  • View photo of contact
Pages: [1]

Author Topic: View photo of contact  (Read 612 times)

beso

  • Guest
View photo of contact
October 14, 2010, 03:29:21 am
Hello civicrm community ,

For a association, i'm doing a directory of artists in my region and i choose CIVICRM for this task.
and this is my first drupal project too... so i'm "lost in code" with a little problem.

I would like to customise the view for the artist contact and i need to show a photo of his work.

I have created a customised "View.tpl" then  i put in the file :
 
Code: [Select]
<p> {$profileFields_8.custom_8.value}</p>
the image is visible (100x100 with a popup link). So it works.

But as these are "paintings" and to follow the organisation design guideline i would like to control the "resize" option and just output the file normally (they have the right format).

I have tried to do this :

Code: [Select]
<img src="/cms/civicrm/file?reset=1&id=1&eid={$cid}" width="350" />

and it works but only for 1 contact ! because the &id parameter is different in each contact.

i have tried this too but it doesn't work..:

Code: [Select]
<img src="/cms/civicrm/file?reset=1&eid={$cid}" width="350" />

in smartyDebug i didn't find a matching variable to use..

Anyone has a solution ?

Should i hire a custom dev for that ? if so can someone guide me where in the code to look ?

Thank you !

beso

  • Guest
Re: View photo of contact
October 18, 2010, 09:23:39 pm
anyone knows what's the best way to change photo behaviour ? (no more popup)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: View photo of contact
October 18, 2010, 11:26:06 pm
Hi,

Haven't seen the code, but likely only the html blob is assigned as variable and not the file id, that you would need to reconstruct the url yourself.

Shouldn't be too complicated to modify the code and add the id.

http://en.flossmanuals.net/CiviCRM/DevelopIntro
Would be a good starting point to help you find your way in the code.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

beso

  • Guest
Re: View photo of contact
October 19, 2010, 01:00:04 am
solution found here : http://forum.civicrm.org/index.php/topic,9448.msg40848.html#msg40848
 ;D

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

This forum was archived on 2017-11-26.