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 and a great snippet.

    I’ve tried it with the dreaded IE7 and it flops. Is it still a use with FF snippet or will IE come round in time!?
      BBloke
      • 26435
      • 1,193 Posts
      Quote from: BBloke at Aug 22, 2007, 11:27 AM

      Nice work and a great snippet.

      I’ve tried it with the dreaded IE7 and it flops. Is it still a use with FF snippet or will IE come round in time!?
      What do you mean IT flops?, the snippet or my crappy attempt at javascripting an CSS on the demo site.
      I checked the demo site in IE6 at work, and the CSS was all messed up (my CSS, not WebLoginPE) and the AJAX login buttons did not work as expected because I didn’t define a function for each button, I think it needs an onclick handler for each one, but that is just the JavaScript.

      Did you install this and, using the standard login/logout/register/profile features find that it "flopped" in IE?
      That would be a huge problem for me! grin

      -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
        It works great in FF but in IE7 clicking any of the buttons results in nothing happening.

        I’ve set up a profile page and changed some input text and clicked the button but sadly nothing happens. sad

        I’ve just quickly tested it on FF and the DOB is being problematic. Entering my date and saving returns ’01-01’ and to save anything in the form requires DOB to be amending due to parse errors.

        This error occured whislt updating a telephone number:

        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « PHP Parse Error »

        PHP error debug
        Error: mktime() expects parameter 6 to be long, string given
        Error type/ Nr.: Warning - 2
        File: D:\ApacheWebServer\montydan\assets\snippets\webloginpe\webloginpe.class.php
        Line: 1282
        Line 1282 source: $timestamp = mktime(0, 0, 0, $dateArray[0], $dateArray[1], $dateArray[2]);

        Parser timing
        MySQL: 0.0643 s (8 Requests)
        PHP: 0.4973 s
        Total: 0.5617 s
          BBloke
          • 26435
          • 1,193 Posts
          Quote from: BBloke at Aug 22, 2007, 03:43 PM

          It works great in FF but in IE7 clicking any of the buttons results in nothing happening.

          I’ve set up a profile page and changed some input text and clicked the button but sadly nothing happens. sad

          I’ve just quickly tested it on FF and the DOB is being problematic. Entering my date and saving returns ’01-01’ and to save anything in the form requires DOB to be amending due to parse errors.

          This error occured whislt updating a telephone number:

          « MODx Parse Error »
          MODx encountered the following error while attempting to parse the requested resource:
          « PHP Parse Error »
          The $timestamp variable is in a method to convert a date format like MM-DD-YYYY into a UNIX timestamp. It actually has nothing to do with the phone number. I can’t recreate the error right now because I am working on a version with a lot of changes, but I have a feeling it is a problem with the DOB handler. I tried to check the value before setting a placeholder so it doesn’t default to 12-31-1969, but it was just screwing things up. I think that is what you are experiencing.

          I don’t own a windows PC, so I couldn’t test it for function ( I use browsershots.org) to get a screen shot, but that doesn’t show me if it works or not. I wonder if it is the use of <button type="submit"></button> instead of <input type="submit" /> could be the problem?

          Any one know about this on IE? is it picky about submitting forms with <button>s?

          I might have to refactor the snippet to use <input type="submit" /> but that sucks because the value attribute set’s the text on the button and I am using the value of the button to determine what code to execute. That sort of shoots multi lingual!

          Any hints are appreciated.

          -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
            IE has picky built in at the core. Hate to think what they will butcher when CSS 3 is up and running.

            I doubt its the buttons as such. I looked at your demo and when I hit register the panel scrolls up and removes the username and password and then scrolls down but only leaves the buttons. There’s no fields to use for registering.

            There is little wrong with it in FF field save but the DOB is just plain stiffing everything!!! I’m leaning towards javascript.

            I will do some digging and see if I can come up with something..

            Thanks for all your work in this.
              BBloke
              • 26435
              • 1,193 Posts
              Quote from: BBloke at Aug 22, 2007, 04:33 PM

              IE has picky built in at the core. Hate to think what they will butcher when CSS 3 is up and running.

              I doubt its the buttons as such.

              It IS, in fact, the <button> tags and IE.
              http://www.peterbe.com/plog/button-tag-in-IE
              I might have to use some conditional comment scripting to fix IE, I don’t know yet, still working on the details.

              -sD-

                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
                I was just working through some things and was going to post:

                This is what is sent back to the page when POST is changed to GET:

                FF2 - : ?username=&password=&stayloggedin=&service=registernew
                IE6 - : ?username=&password=&stayloggedin=&service=Login&service=Forgot+Password&service=Register

                It sees and registers each buttons state on pressing the click button so it doesn’t know what to do!

                Which is confirmed by your link.. down with IE..
                  BBloke
                  • 28033
                  • 925 Posts
                  Is this script stable enough to use if I just need a login form that can keep a user logged in for X amount of time?

                  I already use PPP for my user interface, so I don’t need the extras of this snippet.
                    My Snippets
                    -> PopUpChunk v1.0
                    • 26435
                    • 1,193 Posts
                    Quote from: BBloke at Aug 22, 2007, 05:04 PM

                    I was just working through some things and was going to post:

                    This is what is sent back to the page when POST is changed to GET:

                    FF2 - : ?username=&password=&stayloggedin=&service=registernew
                    IE6 - : ?username=&password=&stayloggedin=&service=Login&service=Forgot+Password&service=Register

                    It sees and registers each buttons state on pressing the click button so it doesn’t know what to do!

                    Which is confirmed by your link.. down with IE..
                    I fixed it with this simple javascript:
                    function init()
                    {
                    	var buttons = document.getElementsByTagName('button');
                    	for(i=0; i<buttons.length; i++)
                    	{
                    		buttons[i].setAttribute('onClick', 'ieButton(this.value)');
                    	}
                    }
                    function ieButton(value)
                    {
                    	document.getElementById('IEfix').value = value;
                    }
                    window.onload = init;

                    and then I put this in the forms
                    <input type="hidden" id="IEfix" name="ieservice" value="" />


                    then in the WebLoginPE snippet, I check to see if the post value for "ieservice" is set and use it if it is, else fall back to post value for "service" (in case javascript is off, it will work fine except in IE!)

                    What do you think?

                    Quote from: Soshite at Aug 22, 2007, 05:44 PM

                    Is this script stable enough to use if I just need a login form that can keep a user logged in for X amount of time?

                    I already use PPP for my user interface, so I don’t need the extras of this snippet.
                    Should be. I haven’t seen PPP, but I don’t think it would interfere with WebLoginPE. I have had WebLoginPE and the original weblogin snippet on the same page without problems.

                    -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
                      • 26435
                      • 1,193 Posts
                      Another new release in the MODx Repository.

                      Lots of updates this time... not the least of which is I HOPE it is working with IE now, if someone can verify, that would be terrific.
                      08/23/2007 v. 1.1
                      1. Added parameter &pruneDays to specify number of days to wait before deleting non-activated user accounts (users who have registered but never logged in).
                      2. Modified &regRequired to eliminate the need for the &captcha parameter.
                      3. &captcha is now depreciated.
                      4. Added extended user profile fields with the parameter &customFields.
                      5. Extended profile table defaults to `web_user_attributes_extended`, but can be overridden with the &customTable parameter.
                      6. Added parameter &regSuccessId to redirect after successful registration.
                      7. Added parameter &regSuccessPause to specify a delay (in seconds) before redirecting. Defaults to 5 seconds to give the user time to read the confirmation message.
                      8. Added parameter &registerSuccessTpl to display a custom chunk instead of redirecting. (only works if &regSuccessId is not set).
                      9. Added new service "viewprofile" for &type=`profile` to allow users to view the profile of other users.
                      (?service=viewprofile&username=Scotty%20Delicious)
                      10. Added parameter &viewProfileTpl to specify a template for the new "viewprofile" service.
                      11. Added a simple JavaScript file to force IE compliance with HTML element <button>
                      12. I think there is more that I am forgetting.

                      -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