This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

Name Badge Administration, Customization

Aller directement à la fin des métadonnées
Aller au début des métadonnées

This page refers to outdated version of CiviCRM. Check current version of documentation.


Documentation Search


CiviCRM 3.2 Documentation

Support and Participation

Developer Resources


CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

The simpliest, and easiest, configuration on the badges is to change the background image (by default, it's a civicrm logo).

To do that, you simply have to set up a custom template directory, and add a logo (png format) in the directory templates/CRM/Event/Badge/CRM_Event_Badge_Logo.png or /CRM/Event/Badge/CRM_Event_Badge_NameTent.png (respectively for the Logo or name tent format).

You can also set a specific logo for a specific event by putting the logo into templates/CRM/Event/Badge/[event id]/[class name].png

eg for the Logo format of the event number 42, simply put the image  templates/CRM/Event/Badge/42/CRM_Event_Badge_Logo.png

You might want to create a new format, simply go to the admin (http://sandbox.civicrm.org/civicrm/admin/options/event_badge?group=event_badge&reset=1) and create a new event badge.

You will have to provide a class that formats each badge. For instance, the Logo template CRM/Event/Badge/Logo.php contains two methods: the constuctor, that mostly sets the format of the page (how many badges per page), and generateLabels, that format each label.

$participant contains the datas about the participant (name, oganization, role...)

If you create a new format, please share it with the community and add it as a sub page below.

In theory, you can use a jpg or gif format. It did work much better with png in my case, YMMV.

Community Submitted Name Badge Formats

The following is a list of community submitted name badge format files which can be implemented using the directions above.

4"x3" 6-up Badges

Download the format file .

Constructs participant name badges with following dimensions: 4"x3" badges 6 per page 1" top margin 0.25" left/right margin 0" bottom margin letter size page
Constructs participant name badges with following dimensions:

  • 4"x3" badges
  • 6 per page
  • 1" top margin
  • 0.25" left/right margin
  • 0" bottom margin
  • letter size page

Badge contains display name, job title, and organization on three lines. The font size is set based on the length of each string (four tiers). Display name has leading/trailing/double spaces removed. You can swap out the display name for the full name (first + last) by replacing $display_name with $full_name in lines 60-64. You will need to register the class in the system using the directions above (CRM_Event_Badge_NameTitleOrg4x3).

Étiquette
  • Aucun

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.