Results 1 to 8 of 8

Thread: Newsletter ##LINK##

  1. #1
    New user
    Join Date
    07-24-09.
    Location
    Belgium
    Posts
    9

    Default Newsletter ##LINK##

    Hello

    In the newsletter confirmation email, one can implement a ##LINK## wildcard.

    Unfortunately, the wildcard contains a link to the page where the subscribe module is implemented or in case where the subscribe module is in the sidebar, the actual page where the subscribe took place.

    Is it possible to have a wildcard to a fixed page?
    I would like to have a dedicated "thank you" page where the user is navigated too when he/she clicks the link in the confirmation email. A ##LINKTOKEN## would be very handy, as i can implement it in any url i want :D


    Thank you for your help

    Cheers

    Zambi
    Cheers

    Zambi

  2. #2
    Core developer
    Official Contao Team
    leo's Avatar
    Join Date
    06-04-09.
    Location
    Wuppertal, Germany
    Posts
    201

    Default Re: Newsletter ##LINK##

    Why don't you just enter the fixed URL then? A wildcard is usually required for dynamic values only.

  3. #3
    New user
    Join Date
    07-24-09.
    Location
    Belgium
    Posts
    9

    Default Re: Newsletter ##LINK##

    Because the ##link## comes with token in it ..
    I guess the link (with token) goes to the page where the subscribe module is nested and the subscribe module picks up the token and activates the subscription.

    So in order to have the activation take place on another page than the original subscription took place i need the token separately, not including the complete URL.

    I browsed around a bit and added following line:

    system/modules/newsletter/ModuleSubscribe.php
    line 242
    $strText = str_replace('##linktoken##', 'token=' . $strToken, $strText);

    Now I can use the ##linktoken## to create my own URL with a separate activation page.

    The only thing i have to do is make an activation page not showing up in the menu tree and add a subscribe module there too. This seems to work perfectly.

    The only thing i still have to check is if i can modify the template so that the subscribe form itself is never shown (only the activation success or failure message) in case the user tinkers with the url itself.

    Cheers

    Zambi
    Cheers

    Zambi

  4. #4
    Core developer
    Official Contao Team
    leo's Avatar
    Join Date
    06-04-09.
    Location
    Wuppertal, Germany
    Posts
    201

    Default Re: Newsletter ##LINK##


  5. #5
    User
    Join Date
    06-27-09.
    Location
    Ljusne, Sweden
    Posts
    59

    Default Re: Newsletter ##LINK##

    Tried the new ##token## thingie today but I newer got it working...
    I added it to the Subscription message in the Subscribe module but it's newer replaced by the real token in the resulting mail. Is it just me, my TL-installation or is it the moon? :shock:

  6. #6
    Core developer
    Official Contao Team
    leo's Avatar
    Join Date
    06-04-09.
    Location
    Wuppertal, Germany
    Posts
    201

    Default Re: Newsletter ##LINK##

    Hm, it should be

    Code:
    $strText = str_replace('##token##', $strToken, $this->nl_subscribe);
    $strText = str_replace('##domain##', $this->Environment->host, $strText);

  7. #7
    User
    Join Date
    06-27-09.
    Location
    Ljusne, Sweden
    Posts
    59

    Default Re: Newsletter ##LINK##

    Yes, I also found the bug...
    I don't need to write a bugreport then.

  8. #8
    Core developer
    Official Contao Team
    leo's Avatar
    Join Date
    06-04-09.
    Location
    Wuppertal, Germany
    Posts
    201

    Default Re: Newsletter ##LINK##

    It has been fixed in r312 already.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •