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
    ScottyDelicious Reply #341, 19 years ago
    Quote from: tuatara at Sep 16, 2007, 01:08 AM

    This is a small patch for webloginpe.class.php that will resize an uploaded image to fit *within* the desired height and width without skewing the pic. So if you want an 1000x800 pixel image to be resized within 100x100, it will generate a 100x80 image. I prefer this to a distorted 100x100 pic. If you want the pic to keep its proportions, pass a true value (like 1) as a fourth argument to the &userImage parameter, e.g. &userImage=`524288, 120, 300, 1`.

    I hope this could be included in the next version; and if it’s already possible without a patch, please let me know!
    Excellent, I love it!
    Send me a PM with how you would like to be credited (Name? nickname? email address?)

    Quote from: tuatara at Sep 16, 2007, 01:08 AM

    As an aside ... I too would really like to see auto-login on registration. And isn’t it time that WebLoginPE had its own subforum? This thread is getting a bit unwieldy ...

    Cheers
    Matt
    I agree that it has become a little difficult to keep track of feature requests, bug reports, and help/support questions. A sub forum would be nice.

    -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
      • 28033
      • 925 Posts
      The Gender issue is easily fixed by just having images to stand for 0, 1, and 2. I’m guessing that maybe WLPE doesn’t have the code in that area to convert 0=Unknown, 1=Male, etc.

      The "Private" issue I still can’t solve...in the database, what text should be in the field for emailprivate, so I can see if something is going wrong there?
        My Snippets
        -> PopUpChunk v1.0
        • 26435
        • 1,193 Posts
        ScottyDelicious Reply #343, 19 years ago
        Quote from: Soshite at Sep 16, 2007, 09:31 AM

        The "Private" issue I still can’t solve...in the database, what text should be in the field for emailprivate, so I can see if something is going wrong there?
        "on"

        -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
          • 28033
          • 925 Posts
          Hmm...it shows "on" in the database, I dunno what’s causing this issue...the fields are all done right. Is it supposed to be userPrivateEmail or userProfilePrivateEmail?

          For some reason, it seems like the checkbox is working, because it’s setting the value to "on" in the database. But it’s not reaching the lang file which would give it the value of "Private". Does WLPE have any sort of debug option that would show what the script is doing and we might be able to debug it that way.

          (This has nothing to do with this issue, but when I started working on the Userlist section of my website, I noticed that all of the &customFields need to be repeated for &usersList. Would it be possible to allow WLPE to have a chunk in that, so WLPE admins would only need to edit one file for their custom fields (instead of having to go into phpMyAdmin/MODx Manager to edit each and every one the next time they need to add a new field, due to most people having links to profiles in the User Lists. I already tried putting a chunk in there, but it didn’t work --- I’m guessing WLPE doesn’t parse chunks inside of there.)
            My Snippets
            -> PopUpChunk v1.0
            • 26435
            • 1,193 Posts
            ScottyDelicious Reply #345, 19 years ago
            Quote from: Soshite at Sep 16, 2007, 10:52 AM

            Hmm...it shows "on" in the database, I dunno what’s causing this issue...the fields are all done right. Is it supposed to be userPrivateEmail or userProfilePrivateEmail?
            Is what supposed to be that?
            If you have ANY field stored in `web_users`, `web_user_attributes`, or the WebLoginPE custom table that you want to keep private you MUST use &customFields to create and manage a new field with the same name as the field you want to hide from viewers but with "private" on the end of it and then represent it in your form with a checkbox

            Example:
            FIELD TO HIDE NAME of CHECKBOX
            email emailprivate
            website websiteprivate
            martial_art martial_artprivate
            nick_name nick_nameprivate

            It looks like in your post you are talking about input "id" tags which have nothing to do with form processing or data retrieval. They are just DOM id’s. You can id or class them whatever you want.

            Quote from: Soshite at Sep 16, 2007, 10:52 AM

            For some reason, it seems like the checkbox is working, because it’s setting the value to "on" in the database. But it’s not reaching the lang file which would give it the value of "Private". Does WLPE have any sort of debug option that would show what the script is doing and we might be able to debug it that way.
            Just post the entire snippet call please.

            -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
              • 28033
              • 925 Posts
              http://modxcms.com/forums/index.php/topic,17359.msg114290.html#msg114290

              The actual code for the page and the snippet call, both for the Account Info Edit page, is there.

              As for the Userlist page, here’s the custom chunk I have for showing the user’s information...

              [+wlpe.message+]
              
              {{heading}} <div align="center"><img src="/mysymphonic/gender/[+view.gender+].png" alt="[+view.gender+]"  hspace="5" /> [+view.fullname+] ([+view.email+])</div> {{/heading}}
              {{content}}
              
              <table width="99%">
               <tr>
                <td width="10%"><img src="[+view.photo+]" alt="[+view.photo+]" title="[+view.fullname+]" vspace="5" hspace="5" /></td>
                <td width="90%"><div class="mysh_signature_profile">[+view.comment+]</div></td>
               </tr>
              </table>
              
              {{/content}}
              
              {{heading}} myBasicInformation {{/heading}}
              {{content}}
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="100%" class="tab2">Birthdate</td>
               </tr>
               <tr>
                <td align="left" width="100%" class="tab3">[+view.dob+] ([+view.age+] Years Old)</td>
               </tr>
              </table>
              <p></p>
              
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="33%" class="tab2">Country</td>
                <td align="left" width="33%" class="tab2">State</td>
                <td align="left" width="33%" class="tab2">ZIP Code</td>
               </tr>
               <tr>
                <td align="left" width="33%" class="tab3">[+view.country+]</td>
                <td align="left" width="33%" class="tab3">[+view.state+]</td>
                <td align="left" width="33%" class="tab3">[+view.zip+]</td>
               </tr>
              </table>
              <p></p>
              
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="50%" class="tab2">Phone #</td>
                <td align="left" width="50%" class="tab2">Cell Phone #</td>
               </tr>
               <tr>
                <td align="left" width="50%" class="tab3">[+view.phone+]</td>
                <td align="left" width="50%" class="tab3">[+view.mobilephone+]</label></td>
               </tr>
              </table>
              {{/content}}
              
              {{heading}} myFavorites {{/heading}}
              {{content}}
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="50%" class="tab2">Favorite Tales Game</td>
                <td align="left" width="50%" class="tab2">Favorite Tales Anime</td>
               </tr>
               <tr>
                <td align="left" width="50%" class="tab3">[+view.favtalesgame+]</td>
                <td align="left" width="50%" class="tab3">[+view.favtalesanime+]</td>
               </tr>
              </table>
              <p></p>
              
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="50%" class="tab2">Other Favorite Game</td>
                <td align="left" width="50%" class="tab2">Other Favorite Anime</td>
               </tr>
               <tr>
                <td align="left" width="50%" class="tab3">[+view.otherfavgame+]</td>
                <td align="left" width="50%" class="tab3">[+view.otherfavanime+]</td>
               </tr>
              </table>
              {{/content}}
              
              {{heading}} myIdentity {{/heading}}
              {{content}}
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="25%" class="tab2"><img src="/mysymphonic/im/aim.png" align="absmiddle" vspace="3"  /> AIM</td>
                <td align="left" width="25%" class="tab2"><img src="/mysymphonic/im/icq.png" align="absmiddle" vspace="3"  /> ICQ</td>
                <td align="left" width="25%" class="tab2"><img src="/mysymphonic/im/skype.png" align="absmiddle" vspace="3"  /> Skype</td>
                <td align="left" width="25%" class="tab2"><img src="/mysymphonic/im/wlm.png" align="absmiddle" vspace="3"  /> WLM / MSN</td>
               </tr>
               <tr>
                <td align="left" width="25%" class="tab3"><a href="aim:goim?screenname=[+view.aim+]&message=Hi.+Are+you+there?">[+view.aim+]</a></td>
                <td align="left" width="25%" class="tab3">[+view.icq+]</td>
                <td align="left" width="25%" class="tab3">[+view.skype+]</td>
                <td align="left" width="25%" class="tab3">[+view.wlm+]</td>
               </tr>
              </table>
              <p></p>
              
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="100%" class="tab2"><img src="/mysymphonic/im/yim.png" align="absmiddle" vspace="3"  /> YIM</td>
               </tr>
               <tr>
                <td align="left" width="100%" class="tab3">[+view.yim+]</td>
               </tr>
              </table>
              <p></p>
              
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="33%" class="tab2"><img src="/mysymphonic/interactive/forum.png" align="absmiddle" vspace="3"  /> Forum / <img src="/mysymphonic/interactive/gallery.png" align="absmiddle" vspace="3"  /> Gallery</td>
                <td align="left" width="33%" class="tab2"><img src="/mysymphonic/interactive/oekaki.png" align="absmiddle" vspace="3"  /> Oekaki</td>
                <td align="left" width="33%" class="tab2"><img src="/mysymphonic/interactive/blog.png" align="absmiddle" vspace="3"  /> Blog</td>
               </tr>
               <tr>
                <td align="left" width="33%" class="tab3"><a href="http://forum.symphonicheaven.com/member.php?action=profile&username=[+view.forumgallery+]">[+view.forumgallery+]</a></td>
                <td align="left" width="33%" class="tab3"><a href="http://oekaki.symphonicheaven.com/profile.php?user=[+view.oekaki+]">[+view.oekaki+]</a></td>
                <td align="left" width="33%" class="tab3"><a href="http://blog.symphonicheaven.com/[+view.blog+]">[+view.blog+]</a></td>
               </tr>
              </table>
              <p></p>
              
              <table width="99%" cellspacing="3" cellpadding="3" class="tab1">
               <tr>
                <td align="left" width="50%" class="tab2">Website Name</td>
                <td align="left" width="50%" class="tab2">Website URL</td>
               </tr>
               <tr>
                <td align="left" width="50%" class="tab3">[+view.websitename+]</label></td>
                <td align="left" width="50%" class="tab3"><a href="[+view.websiteurl+]">[+view.websiteurl+]</a></label></td>
               </tr>
              </table>
              <p></p>
              {{/content}}


              ...with a snippet call of...

              [!WebLoginPE? &type=`users` &usersOuterTpl=`UsersOuterPE` &usersTpl=`UsersPE` &viewProfileTpl=`ProfilePE` &customFields=`websitename,websiteurl,favtalesgame,otherfavgame,aim,icq,wlm,yim,skype,forumgallery,oekaki,blog,emailprivate`!]


              I think that’s everything.
                My Snippets
                -> PopUpChunk v1.0
                • 26435
                • 1,193 Posts
                ScottyDelicious Reply #347, 19 years ago
                Here is the WebLoginPE call for the profile page at my demo site.
                [!WebLoginPE? &type=`profile` &profileTpl=`customProfile` &pruneDays=`10` &customFields=`website,aim,msn,address1,city,favorite_color,demographic,emailprivate,aimprivate,msnprivate` &inputHandler=`Favorite Colors:userProfileFavoriteColor:favorite_color:select multiple:Red(red),Blue(blue),Green(green),Black(black),Orange(orange),Yellow(yellow)||Age Group:userDemographic:demographic:radio:Less than 13(1),14 - 18(2),19 - 30(3),31 - 40(4),41-50(5),51-65(6),65 or older(7)||Keep my email private:userProfileEmailPrivate:emailprivate:checkbox:()||Keep my AIM account private:userProfileAIMPrivate:aimprivate:checkbox:()||Keep my MSN account private:userProfileMSNPrivate:msnprivate:checkbox:()` !]

                And here is the custom chunk known as `customProfile`.
                [+wlpe.message+]
                <div id="wlpeUser">
                <fieldset id="profileTplInfo">
                <p>This page uses a cusutom profile form and many WebLoginPE options. To see the WebLoginPE call and the custom profile chunk <a href="assets/snippets/webloginpe/customProfile.txt">click here</a></p>
                </fieldset>
                <form enctype="multipart/form-data" id="wlpeUserProfileForm" action="[~[*id*]~]" method="POST">
                <fieldset id="wlpeUserProfileInput">
                <div id="wlpeUserInfo">
                <h3 id="wlpeProfileWelcome">Hello [+user.fullname+] ([+user.username+])!</h3>
                <p id="wlpeProfileInfo" class="info">Use this form to update your profile information</p>
                </div>

                <legend>Your User Profile</legend>

                <label for="wlpeUserProfileFullName">Full Name
                <input id="wlpeUserProfileFullName" type="text" name="fullname" value="[+user.fullname+]" />
                </label>

                [+form.emailprivate+]
                <label for="wlpeUserProfileEmail">Email
                <input id="wlpeUserProfileEmail" type="text" name="email" value="[+user.email+]" />
                </label>

                <label for="wlpeUserProfileWebsite">Website
                <input id="wlpeUserProfileWebsite" type="text" name="website" value="[+user.website+]" />
                </label>

                [+form.aimprivate+]
                <label for="wlpeUserProfileAIM">AIM
                <input id="wlpeUserProfileAIM" type="text" name="aim" value="[+user.aim+]" />
                </label>

                [+form.msnprivate+]
                <label for="wlpeUserProfileMSN">MSN
                <input id="wlpeUserProfileMSN" type="text" name="msn" value="[+user.msn+]" />
                </label>

                [+form.demographic+]

                [+form.favorite_color+]

                [+form.country+]

                <label for="wlpeUserProfileDob">Date of birth <span class="info">(DD-MM-YYYY)</span>
                <input id="wlpeUserProfileDob" type="text" name="dob" value="[+user.dob+]" />
                </label>

                [+form.gender+]

                <label for="wlpeUserProfileComment">Comment/Signature
                <textarea id="wlpeUserProfileComment" name="comment">[+user.comment+]</textarea>
                </label>

                <img id="wlpeUserProfilePhotoImg" src="[+user.photo+]" alt="[+user.username+]" title="[+user.fullname+]" height="100" width="100" />

                <label for="wlpeUserProfilePhoto" id="wlpeUserPhotoLabel">User Photo
                <input type="hidden" id="wlpeUserHiddenPhoto" name="userphoto" value="[+user.photo+]" />
                <input id="wlpeUserProfilePhoto" type="file" name="photo" value="" />
                </label>

                <p id="wlpeUserProfilePhotoInfo" class="info">No bigger than 100kb. will be resized to 100 x 100.</p>

                <fieldset id="wlpeNewPasswordArea">
                <legend id="wlpeNewPasswordAreaLegend">Change your password</legend>
                <p id="wlpeNewPasswordInfo">Change your password
                <span class="info">(leave blank if you do not want a new password).</span></p>

                <label for="wlpeUserProfilePassword">New Password
                <input id="wlpeUserProfilePassword" type="password" name="password" value="" />
                </label>

                <label for="wlpeUserProfilePasswordConfirm">New Password (confirm)
                <input id="wlpeUserProfilePasswordConfirm" type="password" name="password.confirm" value="" />
                </label>
                </fieldset>
                </fieldset>
                <fieldset id="wlpeUserProfileButtons">
                <button type="submit" id="wlpeSaveProfileButton" name="service" value="saveprofile">Save</button>
                <button type="submit" id="wlpeProfileDoneButton" name="service" value="cancel">Done</button>
                <button type="submit" id="wlpeProfileLogoutButton" name="service" value="logout">Logout</button>
                <button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteprofile">Delete My Profile</button>
                </fieldset>
                </form>
                </div>

                Compare that to yours to see what went wrong in your implementation. I am sure you are just missing something simple.

                Otherwise, just start over. Using the default form the placeholders should work fine. If not, you have something more f***ed than just WebLoginPE. I have a feeling it is just something that should be simple that you think you understand, but you are using it incorrectly.

                Keep trying, you’ll get it.

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


                  I send pointless little messages
                  • 8619
                  • 229 Posts
                  Scotty,

                  WOW! All I can say is WOW! This snippet is simply amazing. I do have a couple of questions.

                  I am developing a site with XAMPP locally, and on the profile editing page, on the portion that allows you to change your password, the first line of the new password is populated. I’m not sure with what as it comes up **** but didn’t know if anyone else was having this issue.

                  Second question, can I disable the registration process for users that aren’t authorized. What I am envisioning here is to create the basic webuser info in the admin section, which would create the basic info for the authorized users, so that if someone that is not authorized comes across the "registration is required" section, and they aren’t authorized, then it lets them know that and kicks them out? Or am I just confused from lack of sleep and MODxing all day and night and simple way is just to disable the registration process?

                  (*mumbles and crawls into the corner*)
                    • 28033
                    • 925 Posts
                    Hmm...everything seems to be alright. But peaking into the en.php lang file, I noticed something. There’s a message for saying "Your account was updated..." (something close to that). If I’m not seeing that when I update my account, is that an issue (and might be why I’m not getting Private from the lang file array)?
                      My Snippets
                      -> PopUpChunk v1.0
                      • 26435
                      • 1,193 Posts
                      ScottyDelicious Reply #350, 19 years ago
                      Quote from: ejcross at Sep 16, 2007, 05:05 PM

                      [...]I am developing a site with XAMPP locally, and on the profile editing page, on the portion that allows you to change your password, the first line of the new password is populated. I’m not sure with what as it comes up **** but didn’t know if anyone else was having this issue.
                      I assume you are using FireFox?
                      This is not something with XAMPP, but I have seen the same thing using FireFox. It "sees" the name attribute "password" and tries to auto-fill to be helpful.

                      I am sure you can turn it off in the preferences.

                      Quote from: ejcross at Sep 16, 2007, 05:05 PM

                      Second question, can I disable the registration process for users that aren’t authorized. What I am envisioning here is to create the basic webuser info in the admin section, which would create the basic info for the authorized users, so that if someone that is not authorized comes across the "registration is required" section, and they aren’t authorized, then it lets them know that and kicks them out? Or am I just confused from lack of sleep and MODxing all day and night and simple way is just to disable the registration process?

                      (*mumbles and crawls into the corner*)
                      See &disableServices.
                      I think what you want to use is:
                      &disableServices=`register`


                      -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