We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2912
    • 315 Posts
    Nice work again Scotty.

    I had a little look at the date code and found that changing all instances of %G to %Y allowed the year to be pulled through on the profile date.

    It also stopped my end from creating a modx parse error if date was improperly formatted (ie missing year).

    I noticed you did put something up on the DoB thing.

    Hope it helps.. sorry if I step over any line. smiley
      BBloke
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      Sounds great! It was exactly along the lines I was thinking. I am excited to see some of the progress and even help test it out!
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 26435
        • 1,193 Posts
        Quote from: BBloke at Aug 25, 2007, 05:18 PM

        Nice work again Scotty.

        I had a little look at the date code and found that changing all instances of %G to %Y allowed the year to be pulled through on the profile date.
        Duly noted, I will change that in the script. Nice catch. Thanks.

        Quote from: BBloke at Aug 25, 2007, 05:18 PM

        It also stopped my end from creating a modx parse error if date was improperly formatted (ie missing year).

        I noticed you did put something up on the DoB thing.

        Hope it helps.. sorry if I step over any line. smiley
        Not too sure about the DOB thing, I have to do some more testing, but I broke it trying to catch the default unix epoch, so I reverted.

        I will get back at it asap, but I have some other BIG things cooking for it right now.
        Please don’t ever worry about crossing any imaginary lines or hurting my feelings by pointing out mistakes in my code. That is what makes free, open source software so great... Peer review.

        Plus, If I ever cop an attitude about a suggestion, you have my permission to promptly tell me to f*** off tongue.
        I will say it again because I think it is worth repeating.
        What makes free, open source software so great is peer review.

        I may not implement every suggestion laid out on the table, but WebLoginPE is GPL. If you don’t like something about it you have every right to customize it to work how you want! laugh

        -sD-
        Dr. Scotty Delicious, Scientist DFPA.
          Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
          All of the above... in no specific order.


          I send pointless little messages
          • 2912
          • 315 Posts
          Its a great snippet and opens a lot of doors to the backend profile.

          The parse error is because an array is not populated. I noticed your function uses creates the date based on three populated arrays. If one is empty then the function creates an error.

          The profile page displayed month and date only when the parameter was set to %G. If you never change the DOB thats where the error would occur. Once the dates in its ok but there would always be a concern if the user entered a really duff date!! smiley

          I have an error occur on the mailer which I think is due to my configuration and the mailserver I’m using. The normal WebLogin script is fine so I’ll take a look at both and see where its throwing the error for me and if it could be cured easily.

            BBloke
            • 2912
            • 315 Posts
            I found my mail error and it was me in the php.ini file. Forgot to set the senmail_from field with a valid email account which can access my smtp server.... DOH! smiley
              BBloke
              • 20289
              • 958 Posts
              Username fıeld ıs case sensıtıve, perhaps it’ll be nice to let the users choose what to be displayed regardless of what their username text string is. For instanse i have MotSmart screen name on these forums but i can login even if i had entered my user name as motsmart or MOTSMART ... but i’ve got the error msg in the demo site when i tried the same way as i do in forums ;-)
                [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                [td][Wiki] [Persian support forum]
                [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
                • 26435
                • 1,193 Posts
                Quote from: MotSmart at Aug 26, 2007, 01:40 PM

                Username fıeld ıs case sensıtıve, perhaps it’ll be nice to let the users choose what to be displayed regardless of what their username text string is. For instanse i have MotSmart screen name on these forums but i can login even if i had entered my user name as motsmart or MOTSMART ... but i’ve got the error msg in the demo site when i tried the same way as i do in forums ;-)
                So you would like to see a case insensitive login?

                I could do
                 if (strtolower($username) == strtolower($this->User[’username’]))

                instead of
                 if ($username == $this->User[’username’])

                I will give that a test and see if it works.
                Thanks for the suggestion.

                -sD-
                Dr. Scotty Delicious, Scientist DFPA.
                  Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                  All of the above... in no specific order.


                  I send pointless little messages
                  • 2912
                  • 315 Posts
                  Hi Scotty,

                  I was just playing around with the snippet and thought I’d have a look at the terms of service agreement.

                  I’m thinking that this is only applicable to instant registering.

                  I’m thinking of using verify registration and would still like to use the TOS.

                  I’ve looked at the code but its late in the evening in the UK and my head is getting fuzzy.

                  Would it be possible to allow the TOS to be used in a placeholder on any form?

                  Something like:

                  <div id="wlpeRegister">
                  <form id="wlpeRegisterForm" name="wlpeRegisterForm" action="[~[*id*]~]" method="POST">
                  <fieldset id="wlpeRegisterFieldset">
                  <p class="wlpeRegisterInfo">Enter your email address, your name, and your desired username in the fields below.</p>
                  <p class="wlpeRegisterInfo">A password will be emailed to you with instructions on how to activate Your account.</p>

                  <label for="wlpeRegisterEmail">Your Email Address
                  <input type="text" id="wlpeRegisterEmail" name="email" />
                  </label>

                  <label for="wlpeRegisterFullName">Your Full Name
                  <input type="text" id="wlpeRegisterFullName" name="fullname" />
                  </label>

                  <label for="wlpeRegisterUserName">Your desired username
                  <input type="text" id="wlpeRegisterUserName" name="username" />
                  </label>

                  </fieldset>
                  <fieldset id="wlpeRegisterButtonFieldset">
                  <button type="submit" id="wlpeRegisterButton" name="service" value="register">Register</button>
                  <button type="submit" id="wlpeRegisterCancelButton" name="service" value="cancel">Cancel</button>
                  </fieldset>
                  </form>
                  </div>
                  By Registering you are accepting our terms and conditions as detailed below:
                  <div id="wlpeTermsOfService">[+tos+]</div>


                  I think I may be doing something wrong as I cannot get the TOS to show up on an Instant register standard form. It looks like the placeholder doesn’t want to populate.

                    BBloke
                    • 26435
                    • 1,193 Posts
                    BBloke,
                    I cannot recreate this?
                    I put the template you posted above in a chunk called reg2, I put my terms of service in a chunk called TOS and then I called WebLoginPE on my page like this:
                    [!WebLoginPE? &type=`register` &tosChunk=`TOS` &registerTpl=`reg2`!]

                    I also called it like this as a test:
                    [!WebLoginPE? &type=`register` &regType=`verify` &tosChunk=`TOS` &registerTpl=`reg2`!]


                    Both snippet calls correctly showed the TOS chunk.
                    How are you calling WebLoginPE?
                    Also, what is the caching set as on your page? (not that it should make a difference.)

                    -sD-
                    Dr. Scotty Delicious, Scientist DFPA.
                      Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                      All of the above... in no specific order.


                      I send pointless little messages
                      • 2912
                      • 315 Posts
                      This is weird so I started from scratch. I replaced all my files in the snippet folder for webloginpe and made the amendment on line 56.

                      I started with your lines of snippet code which are called uncached and my page settings are set to uncached.

                      Nada.

                      My own call was: [!WebLoginPE? &registerTpl=`RegisterPE` &regType=`verify` &type=`register` &groups=`Registered Users` &regRequired=`email,fullname,username` &notifySubject=`A new user has registered to your website` &tosChunk=`TOS` !]

                      I re-ran you first call and removed the &tosChunk and &registerTpl parameter and I got the default instant registration form with the Terms of Service header and check box but no populated TOS code.

                      I’m sure I have something very wrong at my end as the default standard forms just wont populate that TOS and yet I’m sure I have had this working on another site.

                      I’m miffed and lost but will continue to look further.

                      Thanks again Scotty

                      UPDATE: I have a modx site at work and it runs on v0.9.5 and I can see the TOS on the default instant registration form. When I try the same on Modx 0.9.6 it just doesn’t show.

                      One other main difference is the php version. I run 5.1.6 and work run 5.2.0.

                      As I’m only displaying the TOS I opted to use the chunk directly: {{TOS}} in the regsiterTpl chunk. Its a saving grace for the time being.. I did play around with the order of things in the template.php which didn’t come to anything regarding the default stuff. If I get more info I’ll post up but I have seen this work but not really where I would like it sad

                      Second UPDATE

                      I’ve narrowed it down which may give you more help.

                      Here’s how I’ve been using it in its entirety. I have the login form on a side bar menu in my template.
                      Registration takes me to a new page which shows the registration details in the main content of the page.

                      Now when the login form AND the registration form are displayed at the same time the TOS does NOT populate.

                      So, I removed the [!webloginPE?!] code from the template and revisited the registration page and voila. The TOS populates perfectly. I found it when I removed the &regHomeId parameter and allowed my registration form to populate in the side bar and saw the TOS.

                      I hope it helps on having the login form used in a side bar and the registration form in the content.

                      Sorry for rambling on with it. smiley
                        BBloke