We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    bs,
    I’d done a typo on `Registered Users`! after checking 10 times.
    I do get a js error :
    	if ( == 1 && 0 == 1) { b.style.display="inline"; } else { a.style.display="inline"; }

    Is this normal?
    It doesn’t seem to cause a problem.
    Thanks for a great snippet
    Regards
    David
      • 4195
      • 398 Posts
      Fix
      to get rid of the javascript error goto chunk.subscribe.inc.html:

      replace:
      if ([+jot.subscription.status+] == 1 && [+jot.subscription.enabled+] == 1) { b.style.display="inline"; } else { a.style.display="inline"; }
      


      with:
      if ('[+jot.subscription.status+]' == '1' && '[+jot.subscription.enabled+]' == '1') { b.style.display="inline"; } else { a.style.display="inline"; }
      
        Armand Pondman
        MODx Coding Team
        :: Jot :: PHx
        • 4310
        • 2,310 Posts
        bs,
        Thanks for the js fix, now no page errors warning in IE
        But it is now is showing ’subscribe’ on the page even if I have &subscribe`0` in the call or if I don’t have anything in the call!
        Many thanks
        David
          • 4195
          • 398 Posts
          Quote from: bunk58 at Oct 08, 2006, 04:53 PM

          bs,
          Thanks for the js fix, now no page errors warning in IE
          But it is now is showing ’subscribe’ on the page even if I have &subscribe`0` in the call or if I don’t have anything in the call!
          Many thanks
          David

          make sure it says: &subscribe=`0`
            Armand Pondman
            MODx Coding Team
            :: Jot :: PHx
            • 4310
            • 2,310 Posts
            bs,
            I have it as &subscribe`0` in the call but it’s still showing subscribe on the page.
            This only happened after I changed the JS code from your post.
            If I use the old code there is no subscribe on the page but the JS error warning.
            It must be the new JS code!
            David
              • 4195
              • 398 Posts
              does this help?

              if (('[+jot.subscription.status+]' == '1') && ('[+jot.subscription.enabled+]' == '1')) { b.style.display="inline"; } else { a.style.display="inline"; }
              
                Armand Pondman
                MODx Coding Team
                :: Jot :: PHx
                • 7923
                • 4,213 Posts
                @bunk58

                Just to make sure, do you have that = char there? so &subscribe=`0` not &subscribe`0`.

                Because with the fix, that javascript started to work what it didn’t before and now it shows the subscribing because it can’t get your setting from the snippet call if you don’t have that = there..


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 4310
                  • 2,310 Posts
                  bs,
                  No it is still showing subscribe.
                  This is my call.
                  [!Jot? &subscribe=`0` &canpost=`Registered Users` &pagination=`8` &customfields=`linkurl,linktitle` &canmoderate=`Registered Users`!]

                  David
                    • 4195
                    • 398 Posts
                    Jot Beta 8 is now available!

                    Addressed many issues reported in this support topic.

                    - code cleanup
                    - changed: default templates
                    * xhtml validated
                    * removed javascript
                    * using phx conditionals for cleaner templates
                    * merged moderate comment template into comment template
                    - added: comment info to notify messages
                    - updated chunkie/phx
                    - changed: moderation views
                    * added mixed view (default)
                    * added CSS style for unpublished comments

                    Get it here: http://modxcms.com/Jot-1.0-Beta-8-1063.html

                    important! because of the significant changes in the default templates you should edit your custom templates accordingly if any when updating.

                    note:
                    if you click on Jot in the repository it shows Beta 7 as latest release, but if you check under previous releases you can see beta 8.. I guess this is a bug in the repository.
                      Armand Pondman
                      MODx Coding Team
                      :: Jot :: PHx
                      • 4310
                      • 2,310 Posts
                      Armand,
                      Just upgraded to Beta 8.
                      Excellent, no errors, works first time with subscribe turned either on or off.
                      Looks a lot cleaner code as well.
                      Well done and thanks for the help,
                      David

                      This discussion is closed to further replies. Keep calm and carry on.