We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36924 ☆ A M B ☆
    • 298 Posts
    Continuing with the conversation I started here: https://forums.modx.com/thread/?thread=84920&page=1

    I've read throught your tutorial: http://bobsguides.com/subscribe-tutorial.html

    How do I achieve this with Subscribe:

    A. A user registers (no subscribe message at this point).

    B. Based on the content (documents) they access they may decide to subscribe to future correspondence or not. This decision will be based on their wiliness or capacity to handle project requirements (contained in the documents they accessed previously).

    C. So I would want the request-to-subscribe message or link to be seen only when

    1) In the activation email (probably just an advise on they can subscribe when they log in)

    2) whenever the user logs in, the request-to-subscribe message or link will be on their member pages (calling them to take action)

    Any possibilities on how to achieve will be greatly appreciated. Thanks
      • 3749
      • 24,544 Posts
      When a use registers with Subscribe, they'll get an email message so that they can opt in and you can verify their email and the fact that they're human. You can put anything you want in the email.

      Keeping track of which documents the user accesses is outside the scope of Subscribe, so you'd have to create your own tracking system and your own "SubscribeRequest" snippet that displayed the request to subscribe on the login page or a member page when appropriate. That snippet, or a separate one, could also email the user with a subscribe request.

      To not show Subscribe's subscribe request, just don't put the SubscribeRequest snippet tag in your template.

      You could also use Notify, which works well with Subscribe, to send the email requests to subscribe or other short notes to the users. It's very easy create and send quick email messages (based on a Tpl chunk, or starting from scratch) with Notify.

      BTW, it seems to me that your biggest problem will be how to handle subscribing users who are already registered and unsubscribing users without "unregistering" them.

      Usually, the registration is the subscription and you know people are subscribed because they are in the Subscribers user group, where they got placed when they registered. It may not work for you, but if you can make it so registration == subscription, IOW, let uses be anonymous until they register/subscribe, it will make the project somewhat easier.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36924 ☆ A M B ☆
        • 298 Posts
        Thank you as always Bob. I think combining Subscribe with Notify creatively is the way.

        1.) Is it possible to change the name of the default user group "Subscribers" to something else like "Registered Vendors"?

        2.) Can subscribe take a postHook? I have one that send an email to Admin once a new Vendor signs up.

        3.) Since I have the log in and register working the way I want already with the Login snippet, right now the main thing I require from Subscribe is the Manage Preferences form (i.e. adding to the Vendors' Prefofile page) and the aligning with Notify or EmailResource.

        Can I use the Manager Preferences as describe?

        Appreciated.
          • 36924 ☆ A M B ☆
          • 298 Posts
          if I can change the name of the default user group "Subscribers" to something else like "Registered Vendors" then I can easily reconfigure the registration process to use subscribe. I will just use provide a request to subscribe chunk message that is control by isLoggedIn
            • 3749
            • 24,544 Posts
            I think all you'd need to do is change the content of the sbsGroupListTpl chunk. If there is an existing Subscribers group with members, you'd have to change its name. Important: Don't delete it if there are existing members because the link between each user and the Subscribe Group's ID is already stored in the DB.


            Here is one way to go. This would leave the group name as Subscribers, but Display Registered Vendors in the forms.

            Registered Vendors==Subscribers



            These would (I think) change the name of the group used:


            Registered Vendors==RegisteredVendors


            or

            Registered Vendors==Vendors


            The part after the == is will be the name of the actual User Group. I'd recommend not have any spaces in it.


            None of this has been tested extensively because I've always used Subscribers.

            --------------------------

            Notify and Subscribe work very well together. They were designed together, and in fact, when I last updated Notify most of the changes went into Subscribe. Manage Preferences should work for you as well. I use it all the time.

            If you're a Subscriber at Bob's Guides (and why wouldn't you be -- wink ), you've received regular emails from Notify. The emails contain an encrypted link to unsubscribe or Manage Your Preferences. Notify actually asks Subscribe for the link and inserts it into the email. The link points to a page that Subscribe manages.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 36924 ☆ A M B ☆
              • 298 Posts
              Funny I never noticed the Become a Subscriber link. I just registered now.

              Yes from your comments before the last, I went, spent the whole evening of Thursday reading the documentation on Bobguides, followed the instruction to just install and try as it is before customizing. I noticed if I read the docs I wouldn't have bothered you with all the questions above. Most importantly I notice the things you sighted about groups (last comment).

              All the client care is to have a recognizable group name, they wouldn't know whether it's Registered Vendor or Subscribers.

              I'm pleased to say it works for me and I can say this is by far the most (after wayfinder) well tested MODx snippet of all time.

              I hope I can come again on the next steps: Notify, EmailResource, and User Activity Report.


                • 3749
                • 24,544 Posts
                Thanks for the kind words.

                I should warn you that EmailResource is fairly old and has a pretty clunky user interface, though people are using it successfully for large mailings and it does send well-crafted emails.

                Someday, it will be refactored with the UI from Notify and it will (hopefully) have the option to use Mandrill/MailChimp to do the mailings, but not any time soon.

                I use Notify all the time and it's very solid and easy to use.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 36924 ☆ A M B ☆
                  • 298 Posts
                  I'll test EmailResource and see if I can customize the UI asap.

                  I disabled the CSS and JS of Subscribe and the onsubmit="return checkform(this); return false;" section of the form, now the form does not display error messages (though it reloads once there is any error) and neither does it submit (even when the property is set to login-register-btn and the submit button has property name and id set to login-register-btn. What do you think might be missing? [ed. note: ojchris last edited this post 13 years, 2 months ago.]
                    • 3749
                    • 24,544 Posts
                    TBH, I'm not sure the form works properly without the JS. I don't think I've ever tested that.

                    As for the submission, did you remove the submit button's onClick event? If that's still there, it might prevent it from submitting. Another possibility is that the actual submit action is in the JavaScript.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 36924 ☆ A M B ☆
                      • 298 Posts
                      I see. Yes, I removed the onClick event as I wanted instead to have the errors shown inline without javascript. Maybe you should consider the option of running the form without javascript (just like the standard behaviour in the LogIn snippet.)

                      If I cannot get it to work without JS then I'll use as is. [ed. note: ojchris last edited this post 13 years, 2 months ago.]