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 CiviEvent (Moderator: Yashodha Chaku) »
  • Adding images to events with a File field
Pages: [1]

Author Topic: Adding images to events with a File field  (Read 1491 times)

joachim

  • Guest
Adding images to events with a File field
July 14, 2008, 09:36:35 am
I've added a File field and made it show on Events.
I can upload images with that, but the display of them isn't quite right -- I get an out-of-proportion thumbnail, and clicking on it makes the browser download the file rather than show it.

Is there a better way to add images to events?
I've found some old forum threads where using external images and IMG tags in the event description is suggested -- but that's going to be way above the skill level of the users of the site I'm creating.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Adding images to events with a File field
July 15, 2008, 03:21:06 am
You can create a custom template, where you can put the images you want.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

joachim

  • Guest
Re: Adding images to events with a File field
July 15, 2008, 07:35:21 am
I'm not sure that'll do what I'm after...
I can see how to edit the template that shows the event, but how would that show different  images for each event?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Adding images to events with a File field
July 15, 2008, 08:31:10 am
Hi,

I know you can have different custom templates for each profile, not sure if you can do that for the events too.

Otherwise, you could walk around by using css:

eg : <div id="event-{event_id}" >

and in your css

#event-42 {background:url('thethingyouwant.gif')...}

A bit of a hack, I know....


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

joachim

  • Guest
Re: Adding images to events with a File field
July 15, 2008, 09:00:19 am
Yeah, pretty hacky...  ;D
Each event is going to need images specific to it (such as the performers), and the users creating the events won't have FTP access...

What I'm thinking so far is this approach:
- create a Drupal content type with CCK fields to hold the media
- use a CCK numerical field to reference the CiviEvent id
- load in the right node at the template level, either in Civi's template or Drupal's page.tpl.php

That's pretty hacky too... can anyone see a better approach?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Adding images to events with a File field

This forum was archived on 2017-11-26.