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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • 'Communication preferrences' not in edit form but remain in contact summary.
Pages: [1]

Author Topic: 'Communication preferrences' not in edit form but remain in contact summary.  (Read 4007 times)

Durruti

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 1
    • The Kindling Trust
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.2.17
'Communication preferrences' not in edit form but remain in contact summary.
July 29, 2010, 08:21:53 am
Hello all,
We don't register 'communication preferences' as part of our installation and therefore I've disabled it in the edit page of 'site preferences'. However I still have the 4 unwanted fields on my contact summary page. Looking at the CRM/Contact/Page/View/Summary.php page, the
only reference I see is as follows;

//Show blocks only if they are visible in edit form
        require_once 'CRM/Core/BAO/Preferences.php';
        $this->_editOptions  = CRM_Core_BAO_Preferences::valueOptions( 'contact_edit_options' );
        $configItems = array( 'CommBlock'     => 'Communication Preferences',
                              'Demographics'  => 'Demographics',
                              'TagsAndGroups' => 'Tags and Groups',
                              'Notes'         => 'Notes' );

Which I guess should mean that I don't see them? Could it be because 1 of the fields is populated (Email format: both) that I'm still seeing this? I'm not sure where this setting has come from but I could go through the database and remove it if it would help.
Many thanks for any ideas.
Durruti
« Last Edit: July 29, 2010, 08:24:48 am by Durruti »
http://feedingmanchester.org.uk

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: 'Communication preferrences' not in edit form but remain in contact summary.
July 29, 2010, 10:37:12 am
I would recommend customizing Summary.tpl and use custom templates rather than modifying php code.

Kurund
Found this reply helpful? Support CiviCRM

Durruti

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 1
    • The Kindling Trust
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.2.17
Re: 'Communication preferrences' not in edit form but remain in contact summary.
July 30, 2010, 05:38:48 am
Hi Kurund,
Thanks for the quick response. It's my first time using custom templates, so following the documentation here's what I've done.
  • Created a 'civicrm_templates' directory in my sites/all folder and made it writable
  • Created the following directory structure within the above folder 'CRM\Contact\Page\View' and copied the Summary.tpl file to it.
  • added the following to civicrm.settings.php "define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/vhosts/<mysite>/httpdocs/sites/all/civicrm_templates/' );"
  • Removed the following from Summary.tpl
Code: [Select]
<div class="contact_panel">
                        <div class="contactCardLeft">
                            <table>
                                <tr><td class="label">{ts}Privacy{/ts}</td>
                                    <td><span class="font-red upper">
                                        {foreach from=$privacy item=priv key=index}
                                            {if $priv}{$privacy_values.$index}<br />{/if}
                                        {/foreach}
                                        {if $is_opt_out}{ts}No Bulk Emails (User Opt Out){/ts}{/if}
                                    </span></td>
                                </tr>
                                <tr>
                                    <td class="label">{ts}Preferred Method(s){/ts}</td><td>{$preferred_communication_method_display}</td>
                                </tr>
                                <tr>
                                    <td class="label">{ts}Preferred Language{/ts}</td><td>{$preferred_language}</td>
                                </tr>
                                <tr>
                                    <td class="label">{ts}Email Format{/ts}</td><td>{$preferred_mail_format}</td>
                                </tr>
                            </table>
                        </div>
    [/li]
When I refresh a directory has been created in my custom templates directory alongside CRM called en_US containing lots of sub-directories called %%02 to %%F0, but might changes to the template are not getting picked up.
What am I doing wrong?
Many thanks for any suggestions.
Durruti


http://feedingmanchester.org.uk

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: 'Communication preferrences' not in edit form but remain in contact summary.
July 30, 2010, 05:50:56 am
You don't need to add anything in civicrm.settings.php. You should check this: http://en.flossmanuals.net/CiviCRM/DevelopTemplates

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • 'Communication preferrences' not in edit form but remain in contact summary.

This forum was archived on 2017-11-26.