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 (Moderator: Dave Greenberg) »
  • hook_civicrm_summaryActions
Pages: [1]

Author Topic: hook_civicrm_summaryActions  (Read 1130 times)

mcternan

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.10
  • MySQL version: 5.1.58
  • PHP version: 5.3
hook_civicrm_summaryActions
March 22, 2012, 01:38:45 am
I'm not sure if I'm mis-understanding something or if I'm encountering a bug but I cannot seem to get the 'hook_civicrm_summaryActions' hook working in my install.

I want to remove some items from the Action list on the Summary pages, and I have assumed that  'hook_civicrm_summaryActions' would enable me to do this.

I have followed the example from the wiki and it will not work for me. It will remove some of the items, but it is inconsistent. If I follow the exact example from the wiki it will remove some of the actions, but then also remove the backgrounds from some of the other action elements.

When I try to extend the example and remove some other Actions they will not be removed. Namely I wish to hide the email action, but I have been unable to do this.

Has anyone successfully used the summaryActions hook? Is there something I am missing?

Any directions are much appreciated.

Conor

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: hook_civicrm_summaryActions
March 22, 2012, 02:08:56 am
Could you post your code somewhere (paste2.org, github...) so we can see it?

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

mcternan

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.10
  • MySQL version: 5.1.58
  • PHP version: 5.3
Re: hook_civicrm_summaryActions
March 22, 2012, 02:13:12 am
I've posted the hook here: http://paste2.org/p/1948828


xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: hook_civicrm_summaryActions
March 22, 2012, 02:30:00 am
Hi,

Btw, I'm assuming that the info on your profile is incorrect and that you have upgraded from 4.0.7 to 4.1.x (it's a new hook on 4.1)

could you print_r($actions); at the top of the function?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

mcternan

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.10
  • MySQL version: 5.1.58
  • PHP version: 5.3
Re: hook_civicrm_summaryActions
March 22, 2012, 05:36:16 pm
Xavier,

I can call print_r on the variable. I've pasted the output here: http://paste2.org/p/1949467

Sorry, I need to update my profile, I have upgraded to 4.1.

Conor

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • hook_civicrm_summaryActions

This forum was archived on 2017-11-26.