We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31037
    • 358 Posts
    I love this new snippet! A few suggestions on the comming filter parameter:

    It would also be great if the new filter function could filter on what webgroup the user is in.

    And maybe the filter could find users that are logged in, then it’s possible to have a list of online users.

    When viewing a profile, it would be nice to see if the user is online.

    Would multiple lists on same page work?

    These are things that exists in PPP, if they would be implemented in WLPE it would be possible to migrate to WLPE for existing PPP-users. And I wouldn’t have to feel bad any more for not continuing working on PPP wink

    One question: I just started to test WLPE, but on the (instant) register page I get no warning messages, what have I missed? (Perhaps I should test this on e real server instead of Xampp.)
      • 26435
      • 1,193 Posts
      ScottyDelicious Reply #112, 19 years ago
      Quote from: Uncle68 at Sep 02, 2007, 12:20 PM

      I love this new snippet! A few suggestions on the comming filter parameter:
      It would also be great if the new filter function could filter on what webgroup the user is in.
      Tremendous idea! I haven’t worked out all the details in my head yet, but that suggestion sounds like a keeper.
      Quote from: Uncle68 at Sep 02, 2007, 12:20 PM

      And maybe the filter could find users that are logged in, then it’s possible to have a list of online users.
      When viewing a profile, it would be nice to see if the user is online.
      Hmmm. That is interesting. I will have to look into session handling to see if there is a quick way to determine if a user is still online without even querying the database. I might try to see how SMF does it.
      Quote from: Uncle68 at Sep 02, 2007, 12:20 PM

      Would multiple lists on same page work?
      That I am not sure of yet. Maybe a better method would be &list=`List Name:sortby:sortOrder:list,of,columns:` separated by double pipes.
      For example:
      &list=`With Websites:username:ASC:website||Full Contact Info:username:DESC:email,aim,msn,website`
      and have that output two lists on the same page.
      Quote from: Uncle68 at Sep 02, 2007, 12:20 PM

      These are things that exists in PPP, if they would be implemented in WLPE it would be possible to migrate to WLPE for existing PPP-users. And I wouldn’t have to feel bad any more for not continuing working on PPP wink

      One question: I just started to test WLPE, but on the (instant) register page I get no warning messages, what have I missed? (Perhaps I should test this on e real server instead of Xampp.)
      Sounds like you have missed the &regRequired parameter. This specifies the required fields. If you are using the default "instant" form, a suggestion would be to use &regRequired=`email,username,fullname,password,formcode,toc` in your snippet call.

      This should work just fine under XAMPP.

      I hope we can collaborate and merge some of these features.

      -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
        • 31037
        • 358 Posts
        In PPP I made the list function like this:

        Name of list : Custom table to use : name of template (chunk) : Order By : Limit to # rows (users) : Fields that must (or must not) be filled in by user : Users in web group : Extra options (; next list)

        In short: ListName:CustomTable:Tpl_name:OrderBy:Limit:WithFields:Groups:Extra; Next list

        The lists was then called by placeholders [+listname+].

        (More info on the options in ppp_instructions_part_2.txt in the first ppp post.)

        Perhaps not the best way of doing it, but maybe it can give you "inspiration" for the user lists feature...

        About error messages not showing up: I hade the &regRequired parameter in place, must be something else. But I’ll try it on another installation later.
          • 28033
          • 925 Posts
          Quote from: Dr. at Sep 02, 2007, 12:02 PM

          Quote from: Soshite at Sep 02, 2007, 08:48 AM

          I noticed in Uncle68’s PPP thread that he was reconmending PPP users to use WebLoginPE. I’d be willing to switch over to it, but I need to know a few things first...

          1) In PPP, there is the ability to have certain fields that only Admins can edit? As an example, on my website, I have Achievements for stuff like submitting graphics or game information. I need an easy way to add them for my users (going into phpMyAdmin could get annoying after a while, just to add an Achievement.
          By "Admins" are you referring to:

          • Managers, from the Backend.
          • Members of the webgroup "Admins"
          • or Members of a webgroup that was specified in the snippet call?

          Quote from: Soshite at Sep 02, 2007, 08:48 AM

          2) In PPP, people can "sort" users by those who have a website, or have an AIM account. This is basically done by adding a filter in the PPP snippet call, like website or aim. Can this be replicated in WebLoginPE?
          Intersting.
          I have been working on a parameter called &sortBy (and of course &sortOrder [ASC:DESC]) for the WebLoginPE &type=`users` call. This parameter will accept one argument, a table column name such as username, lastlogin, internalKey, etc..., and will sort the entire list of users by the value of that column.

          I love your idea and I will implement the &filter parameter for the users list which will accept a comma separated list of table column names to filter. If the user has data stored in all the columns specified, they would be shown in the list, else they would be excluded.

          So if you wanted to show all the users who entered their AIM account you would use &filter=`aim` (assuming the customField you used was "aim". If you wanted to show all the users who entered a website AND a phone number, then sort them by date of birth, you would use &filter=`website,phone` &sortBy=`dob` &sortOrder=`ASC`

          Just thinking out loud here, but... Yeah... I like that idea grin

          -sD-
          Dr. Scotty Delicious, Scientist.

          1) I created a Web User Group called Administrators. Then, I created a duplicate of the page webusers use for editing their account, and restrict it so only the "Administrators" group can access it. Then I just add the extra fields I need, like the Achievements, as checkboxes. Now, to be able to edit other people’s profiles, I would have to use this type of URL...

          http://tales.rpgplanet.gamespy.com/mysymphonic/account_admin.php?WEDIT=18


          ...and WEDIT is whatever user you need to edit, using their ID. I like having the Admin Web User group, simply because I don’t have to be logged into the Manager to do it, and with WebLoginPE, I’m always logged in, so I can edit profiles quickly on the fly.

          2) I like the &sortby option...that’s something that I don’t remember seeing in PPP. BTW, with WLPE’s custom tables, is that in the normal attributes table, or in a custom table that I need to create --- if so, then if we were able to specify which table it used, PPP users could very easily transfer over to WLPE with no problems (like for instance, IIRC, my custom table for PPP is web_user_mysymphonic).

          Small question, but I remember in PPP, with how it used EForm to input the data into the database, fields like textareas, checkboxes, and radio buttons wouldn’t show the data from the database, which made problems when someone edited their profile, which would wipe the data in a textarea (like a bio for the user). Oddly enough, this didn’t affect checkboxes and radio buttons. Does WLPE get affected by this issue, or is it immune since it doesn’t rely on EForm, IIRC?
            My Snippets
            -> PopUpChunk v1.0
            • 26435
            • 1,193 Posts
            ScottyDelicious Reply #115, 19 years ago
            Quote from: Soshite at Sep 02, 2007, 01:17 PM

            1) I created a Web User Group called Administrators. Then, I created a duplicate of the page webusers use for editing their account, and restrict it so only the "Administrators" group can access it. Then I just add the extra fields I need, like the Achievements, as checkboxes. Now, to be able to edit other people’s profiles, I would have to use this type of URL...

            http://tales.rpgplanet.gamespy.com/mysymphonic/account_admin.php?WEDIT=18


            ...and WEDIT is whatever user you need to edit, using their ID. I like having the Admin Web User group, simply because I don’t have to be logged into the Manager to do it, and with WebLoginPE, I’m always logged in, so I can edit profiles quickly on the fly.
            I will create a new WebloginPE type (&type=`manage`) It will create a page much like &type=`users` where all the users are listed (or sorted and filtered) and each user image/username would be a link to an area where those with permission to view the page could modify user settings. As with all views in WebLoginPE, this could use a custom template with form inputs for whatever database fields you want to manage.

            This page should have it’s "Access Permissions" in the manager set to "Administrators" so that not just anyone could view it and edit user profiles.
            Quote from: Soshite at Sep 02, 2007, 01:17 PM

            2) I like the &sortby option...that’s something that I don’t remember seeing in PPP. BTW, with WLPE’s custom tables, is that in the normal attributes table, or in a custom table that I need to create --- if so, then if we were able to specify which table it used, PPP users could very easily transfer over to WLPE with no problems (like for instance, IIRC, my custom table for PPP is web_user_mysymphonic).
            WebLoginPE does grab all the data from the "web_user_attributes" table, but you can also specify &customTable=`table_name` and WebLoginPE will automatically create the table for you if it is not already there.

            You do not need to specify the &customTable parameter as WebLoginPE will create a table called "web_user_attributes_extended" if no customTable is specified.

            If you have a WebLoginPE profile page and you want your users to be able to edit some custom fields like aim, msn, and website, you would put &customFields=`aim,msn,website` in the snippet call. WebLoginPE will check to see if those columns exist, and if not, it will create them.
            Quote from: Soshite at Sep 02, 2007, 01:17 PM

            Small question, but I remember in PPP, with how it used EForm to input the data into the database, fields like textareas, checkboxes, and radio buttons wouldn’t show the data from the database, which made problems when someone edited their profile, which would wipe the data in a textarea (like a bio for the user). Oddly enough, this didn’t affect checkboxes and radio buttons. Does WLPE get affected by this issue, or is it immune since it doesn’t rely on EForm, IIRC?
            WebLoginPE has a special method for handling inputs of type <select>, <select multiple>, <input type="radio"> and <input type="checkbox">.

            Using the &inputHandler parameter you can specify the options for the form element. WebLoginPE will loop over these form elements for each user and if the user had previously checked or selected an item, it would be pre-checked or pre-selected the next time they viewed it.

            I am not sure why eForm doesn’t do well with the <textarea>, but WebLoginPE handles it just fine.

            Take a look at the Working With Forms Documentation and read about the &inputHandler parameter (About halfway down the page).

            -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
              Ooh, very, VERY nice. I remember that trying to do this in PPP was a little tricky, since the value field had to have the value (i.e., having to give it a value instead of having the user input a value). I like how it’s very easy to alter the values with this syntax. Just one question, where does the &inputHandler call get put in --- I see the snippetish call, so I’m guessing that gets put in the call for WLPE’s profile editing page, and the HTMLish code gets put in whatever chunk that the profile editor HTML is drawn from? (If so, this is very much like how PPP does it, which will make things easier to migrate).

              EDIT: I noticed the parameters page just after posting this. I think I get it now, at least the inputHandler part. I’m guessing that the HTML code is in the custom chunk for the profile editor. I also like how certain fields can be made private --- that’s a really nitfy little feature. And being able to contact users is awsome --- I assume that’s via e-mail currently?

              Looks like you’ve coded this pretty darned well. Most everything I thought of you’ve already had coded, or in the process of doing so. smiley

              (One thing I noticed, in that Doc. URL you gave me, for some reason, the DIV/table/whatever that contains the text isn’t containing it right in Opera 9.23. But if I click Opera’s "Fit to Width" option, it will show up like it should. Nothing major, but it’s something worth noting.)

              EDIT 2: One thing I just thought of. Uncle68 created a snippet called EFreg, which was a modification EForm, but meant for PPP. This had the ability to have fields with the "hidden" attribute, which allowed certain fields to automatically be filled in when a user registered, such as having the ability to give a user a default avatar or an Achievement, in my case, without the admin(s) having to go into the "AdminCP" of PPP and manually editing their profile. Do you know if WLPE supports "hidden" input values?
                My Snippets
                -> PopUpChunk v1.0
                • 26435
                • 1,193 Posts
                ScottyDelicious Reply #117, 19 years ago
                To clarify how &inputHandler works...
                Lets say you have a WebLoginPE call that looks like this:

                [!WebLoginPE? &type=`profile` &profleTpl=`myProfileForm` &customFields=`vehicletype,favorite_colors,contact_time,emailprivate` &inputHandler=`Your Vehicle Type:userVehicle:vehicletype:select:Compact(compact),Van(van),Light Truck(light_truck),SUV(suv) ||Favorite Colors:userFavoriteColors:favorite_colors:select multiple:Red(ff0000),Orange(ff9900),Green(66ff00),Black(000000) ||Best time to contact you:userContactRadios:contact_time:radio:Morning(morning),Afternoon(afternoon),Evening(Evening) ||Keep my email private:userPrivateEmail:emailprivate:checkbox:()`!]

                Then in the chunk called {{myProfileForm}} where you would normally have code like this:

                <div id="wlpeUser">
                <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>

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

                <label for="userPrivateEmail" id="userPrivateEmailLabel">Keep my email private
                <input type="checkbox" name="emailprivate" id="userPrivateEmail" />
                </label>

                <label for="userVehicle" id="userVehicleLabel">Your Vehicle Type
                <select id="userVehicle" name="vehicletype">
                <option value="compact">Compact</option>
                <option value="van">Van</option>
                <option value="light_truck">Light Truck</option>
                <option value="suv">SUV</option>
                </select>
                </label>

                <label for="userFavoriteColors" id="userFavoriteColorsLabel">Favorite Colors
                <select multiple id="userFavoriteColors" name="favorite_colors">
                <option value="ff0000">Red</option>
                <option value="ff9900">Orange</option>
                <option value="66ff00">Green</option>
                <option value="000000">Black</option>
                </select>
                </label>

                <label for="userContactRadios" id="userContactRadiosLabel">Best time to contact you
                <div id="userContactRadiosDiv">
                <input type="radio" name="contact_time" id="userContactRadiosMorning" value="morning" />
                <span class="userContactRadiosSpan">Morning</span>
                <input type="radio" name="contact_time" id="userContactRadiosAfternoon" value="afternoon" />
                <span class="userContactRadiosSpan">Afternoon</span>
                <input type="radio" name="contact_time" id="userContactRadiosEvening" value="evening" />
                <span class="userContactRadiosSpan">Evening</span>
                </div>
                </label>

                </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>

                You would instead use the &inputHandler placeholders "[+form.whatever+]".

                <div id="wlpeUser">
                <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>

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

                [+form.emailprivate+]

                [+form.vehicletype+]

                [+form.favorite_colors+]

                [+form.contact_time+]

                </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>

                Using those form placeholders allows WebLoginPE to loop over the input first and check/select the users saved options before returning it to the page.

                -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
                  That makes much more sense now. Very streamlined...I like it. smiley
                    My Snippets
                    -> PopUpChunk v1.0
                    • 11975
                    • 2,542 Posts
                    Hi Scotty,

                    WebloginPE sounds really interesting and powerful.

                    Just a thougt about inputHandler.
                    What about writing the params in the chunkForm instead of the snippet params.

                    [+form.vehicletype:select:Compact(compact),Van(van),Light Truck(light_truck),SUV(suv)+]

                    And it Would be awesome to include the @BINDINGS support to fill the options list



                    :-)
                      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                      • 26435
                      • 1,193 Posts
                      ScottyDelicious Reply #120, 19 years ago
                      Quote from: heliotrope at Sep 02, 2007, 04:51 PM

                      Hi Scotty,

                      WebloginPE sounds really interesting and powerful.

                      Just a thougt about inputHandler.
                      What about writing the params in the chunkForm instead of the snippet params.

                      [+form.vehicletype:select:Compact(compact),Van(van),Light Truck(light_truck),SUV(suv)+]

                      And it Would be awesome to include the @BINDINGS support to fill the options list
                      Hmmm... huh
                      I think that would require a plugin set to OnBeforeParseDocument because by the time WebLoginPE is executed, the placeholders have already been parsed.
                      &inputHandler’s code is executed almost immediately after the WebLoginPE Class is instantiated. The reason it works right now is because it accepts a variable from the snippet call, explodes it into several arrays and then sets a placeholder based on the values in those arrays (which were exploded from a really, really long string).

                      I gotta say, I like that idea a lot. Now I just have to figure out a clever way to make it work!

                      What sort of @BINDINGS support were you interested in seeing?
                      Any direction from you would help me sort out a solution. 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