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) »
  • Custom search - how to allow emails but protect privacy
Pages: [1]

Author Topic: Custom search - how to allow emails but protect privacy  (Read 1094 times)

cleit

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
Custom search - how to allow emails but protect privacy
June 29, 2009, 12:09:54 pm
I'm working with a membership site and want members to be able to list others that live nearby. I then want the member to be able to send an email to those in the search results, but at no time reveal their exact locations or email addresses.

I've started by adapting the existing custom Proximity search and have got as far as producing the search results (hiding all personal details other than names).What I'm wanting to do now is:
  • adjust the results template to prevent the names of the matching members being active links to their membership details
  • suppress the list of recipients' email addresses when the member chooses the 'email selected contacts' action

I've tried playing with Email.tpl and can remove the 'To:' addresses, but then the email can't be sent because the recipient addresses aren't being sent to the email procedure. I'm also not sure which file invokes Email.tpl  - I want to use a custom template rather than the standard one, but can't see where to do this.

Any pointers on where to look next or how to progress would be great.

Thanks in advance

ian

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom search - how to allow emails but protect privacy
June 29, 2009, 04:34:10 pm
Fixing part one s/b easy. You can make a copy of the results template used by that search (Sample.tpl) - and modify the code near line 77 which adds the link to contact/view. The templateFile() function in Proximity.php control the template used - so change that to point to your new one.

I'm pretty sure part two will require some substantive changes to the PHP code (not just template changes). I think you'll want to start with reviewing:

CRM/Contact/Form/Task/EmailCommon.php
Protect your investment in CiviCRM by  becoming a Member!

cleit

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
Re: Custom search - how to allow emails but protect privacy
June 30, 2009, 04:23:53 am
OK, thanks. I had a nasty feeling it might involve substantive php changes...!

Ian

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Custom search - how to allow emails but protect privacy

This forum was archived on 2017-11-26.