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 CiviMail (Moderator: Piotr Szotkowski) »
  • Creating a CiviMail subscribe/unsubscribe block in Drupal
Pages: [1]

Author Topic: Creating a CiviMail subscribe/unsubscribe block in Drupal  (Read 426 times)

welly

  • I’m new here
  • *
  • Posts: 29
  • Karma: 2
  • CiviCRM version: 4.4
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.3
Creating a CiviMail subscribe/unsubscribe block in Drupal
January 13, 2014, 09:32:30 am
Hi all,

I'm trying to give a Civi/Drupal user a block on their home page to allow them to subscribe or unsubscribe from a mailing list.

I can't quite get my head around the connection between mailing lists, groups and unsubscribe/subscribe IDs.

Ideally, we would just have a URL the user can go to (via a link) and it'll subscribe or unsubscribe them but looking at the URL generated by the unsubscribe token - http://example/civicrm/mailing/optout?reset=1&jid=5&qid=6&h=7223113abb23eeb6 - this doesn't appear to relate to either a user or a group or a mailing. Which I'm sure is a good thing!

If anyone can give me any starting points, that would be much appreciated. I've looked at the API and again, I'm confused by the relationship between these three entities (users, groups and mailing lists - particularly mailing list unsubscribe IDs).

Thanks,

welly

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Creating a CiviMail subscribe/unsubscribe block in Drupal
January 13, 2014, 12:08:21 pm
hi welly - another option w Drupal is to make a webform and set it up for newsletter subs, then set the webform to be available as a block
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

welly

  • I’m new here
  • *
  • Posts: 29
  • Karma: 2
  • CiviCRM version: 4.4
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Creating a CiviMail subscribe/unsubscribe block in Drupal
January 14, 2014, 01:55:37 am
Hi Pete,

Thanks for your reply - will this work for unsubscribing as well? If so, that would be brilliant.

Cheers!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Creating a CiviMail subscribe/unsubscribe block in Drupal
January 14, 2014, 01:16:38 pm
yes because the form would prefill for logged in persons - so if you give them a checkbox then can just untick and submit
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Creating a CiviMail subscribe/unsubscribe block in Drupal

This forum was archived on 2017-11-26.