We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26435
    • 1,193 Posts
    Excellent suggestion pixelchutes.

    I think we should really look closely at the class and see where it could be more modular. I have a bit of duplication in there (Bad!.. naughty me tongue) and as you mentioned above, there are bits of code like the setting of cookies that would also be better suited for an individual method. This is going to mean more methods to document, but I think it will make a more modular API for WebLoginPE.

    Thoughts?

    <sidenote>
    I actually have a client!!!
    I have been working on his site, but it does not require user logins, so I appologize, but WebLoginPE has not been in the front of my todo list lately. I will get back on it ASAP.
    </sidenote>

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


      I send pointless little messages
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      Life happens cool
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 33175
        • 711 Posts
        Hi,

        I would like to delete a photo from a profil of one user. Maybe a button or a checkbox...
        Is it thinkable ?

        Thanks
          Sorry for my english. I&#39;m french... My dictionary is near me, but it&#39;s only a dictionary !
          • 23383
          • 138 Posts
          Hello,

          Do you think it’s possible to delete the custom rows for a webuser deleted in MODx manager ?

          Edit : Sorry It was already asked in another topic.
          Really nice snippet. Good work !
            • 23383
            • 138 Posts
            Other maybe useful thing : changing this snippet to handle locales.
            I’ve customized myself by adding (for example, french) in my (fr)lang file :
            setlocale(LC_ALL,"fr");
            $wlpe_lang['dobFormat']='%d/%m/%Y';	
            $wlpe_lang['commaseparator']=',';
            


            and changing in the class the way the dob is managed :
            $age = substr($ageDecimal, 0, strpos($ageDecimal, "."));
            $modx->setPlaceholder('view.dob', strftime('%m-%d-%Y', $viewUser['dob']));
            $modx->setPlaceholder('view.age', $age);
            

            changed to this :
            $age = substr($ageDecimal, 0, strpos($ageDecimal,$this->LanguageArray['commaseparator']));
            $modx->setPlaceholder('view.dob', strftime($this->LanguageArray['dobFormat'], $viewUser['dob']));
            $modx->setPlaceholder('view.age', $age);
            


            Of course, you may want to change it at some other places in the snippet, just look for the appropriate strftime wink
              • 32699 ☆ A M B ☆
              • 427 Posts
              I just had a shocked wonderful shocked time a few weeks ago trying to convert a 100 character database text field using spaces, random formats, and strange characters into unix time stamp that Modx uses. I thought I would share my method as WebloginPe can use this also.

              First your idea of drop downs is doable and / or separated text fields. If they were named something like dobYear, dobMonth, dobDay we could easily accomplish getting the strings separated into an order so we can manage it in the backend without their intervention. Make a [+dob+] template out of the dob request.

              <?php
              	/* $dob reassembles the date in an order and format we can use to convert to unix time 
              	    Basically we take the $date array and piece it back together in a format strtotime likes.
                      */
              $dob = strtotime($dobMonth."/".$dobDay."/".$dobYear);
              	/* Once this is assembled correctly and PHP creates the time stamp for us then we can 
                          save the string to the int 10 field in the modx table.
                      */
              ?>


              The WebloginPe &dateFormat=`%d-%m-%Y` can then be used only for display purposes and not input purposes. I believe this should help the date issue mentioned at various points in the threads and keep modx and webloginpe consistent with the date formats.
                Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

                Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
                • 13736
                • 345 Posts
                I would like to see a new parameter added to WebLoginPE named &groupStatus or groupStatusChange or something along those lines.

                
                [!WebLoginPE? &type=`register` &groupStatus=`Cadets,New Applicants,Limited`!]
                
                



                • When called with &type=`register` it would show checkboxes for each "optional" group that we let them be a part of.
                • When used with &type=`user` it would show the specified groups and preload the checked or or empty status, allowing the user to add or remove themselves from a web user group.
                • When used with &type=`manager` it would be nice to have an `*all*` group to show every available web user group for managers to add or remove a user from any group. Or just automatically include it into the manager interface with no switches.

                It might also be handy to have a wildcard option where you could specify groups like `subscriber-*all*` which might then show a list of user groups that started with "subscriber-"  ie. subscriber-technews, subscriber-electronics, subscriber-magazine , etc.

                  • 23383
                  • 138 Posts
                  I agree with groups in manager mode, great idea smiley
                    • 32699 ☆ A M B ☆
                    • 427 Posts
                    This is a very simple feature quest.

                    How about editing the snippet page in the repo to point to Weblogin sub form: http://modxcms.com/forums/index.php/board,275.0.html

                    AND

                    editing the first topic in the forum page auto created to point to http://modxcms.com/forums/index.php/board,275.0.html

                    People are still there posting looking for help when everyone else is over here rolleyes
                      Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

                      Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
                      • 13736
                      • 345 Posts
                      http://openid.net/

                      If WebLoginPE could interface with OpenID or was compatible as a provider, that would be cool to.