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) »
  • Unable to add new label or change label name
Pages: [1]

Author Topic: Unable to add new label or change label name  (Read 2608 times)

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Unable to add new label or change label name
August 25, 2010, 02:03:23 pm
I would like to add a new label type.  So I added the new label to the label.php file, but the label does not display in the "select label" drop down list.  

I then tried editing the label name of one of the existing labels (5161); the new name was not displayed (5161 was still displayed) and when choosing the 5161 label and clicking on the "make mailing labels" button, Civi returns an empty page.

What do I need to do to change a label name or add a new label?  Thanks.....

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Unable to add new label or change label name
August 25, 2010, 02:20:38 pm
You will have to modify the code and add new label.

Kurund
Found this reply helpful? Support CiviCRM

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Re: Unable to add new label or change label name
August 25, 2010, 05:11:58 pm
I figured it was hard coded, can you save me some time and tell me where in the code I might find it. 

Thanks

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: Unable to add new label or change label name
August 25, 2010, 08:44:57 pm

1. Edit CRM/Contact/Form/Task/Label.php

2. Add a new entry to the $label array (line 68 or so)

3. Edit CRM/Utils/PDF/Label.php

4. Add an entry to the $averyLabels matching the entry in pt 2 above

that should be it :)

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

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Re: Unable to add new label or change label name
August 25, 2010, 09:16:25 pm
Thank you! that worked

I had found the second label.php file, but not the first.  Thanks for saving me a lot of time!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Unable to add new label or change label name

This forum was archived on 2017-11-26.