We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 436 ☆ A M B ☆
    • 265 Posts
    Hi,

    I’ve been redirected to this thread by Dimmy from a post i made: How I want to use MODx, is it possible? - lots of the the ideas I brought up in my thread have already been worked on here! and the work that’s already been done is really good!!

    I’ve signed up to the testing site, this project is defiantly something I’d be using on my sites - I hope my other ideas and questions from that thread give you something to think about smiley

    Do you have plans to implement this into the current MODx Manager instead of its own front end admin page? would it perhaps be possible to have these fields such as ’music’ and ’eye colour’ go besides the default fields like ’fax number’ and ’zip code’?
      MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.
      • 25663 MODX Staff
      • 12,272 Posts
      This will not be integrated into the manager until after such time the manager is rewritten. And at that time it still likely won’t be a core distribution as many sites don’t require much more than just name / email / password. That’s not to say that this isn’t great code indeed though!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 26182
        • 164 Posts
        Hey Uncle,

        When I attempt to edit fields (i.e. add information to them) in the table I get this error:

        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’’ at line 1 »
        SQL: SELECT * FROM `modx`.modx_web_user_test WHERE webuser = ;
        [Copy SQL to ClipBoard]

        Parser timing
        MySQL: 0.0278 s (19 Requests)
        PHP: 0.0531 s
        Total: 0.0808 s

        Any help you could provide would be absolutely priceless. The snippet’s great by the way.

        Sarah
          • 21475
          • 80 Posts
          Hi Sarah,
          The id of the webuser is missing.
          Have you try this :
          Quote from: Uncle68 at Jan 10, 2007, 10:48 AM

          First, sorry for waisting your time with this unnecessary problem in ppp 0.3. Nothing is wrong in the code, it’s my instructions that are bad.

          This was causing the error:
          For the new version to work you must add a line in the eForm template for the editing page. This information comes in part 3 of the documentation. But that’s too late as you need to add this line earlier. Also this line is needed to be added in eForm template regardless if the template is for editing users own profile, or an admin editing another user. That is not very clear in the instructions.

          Solution:
          This line should be added to any eForm template for editing users:

          <input style="display:none;" type="text" name="wuid" value="[+id+]" />
          (For some reason "type=hidden" does not work for me, that’s why I use "display=none".)

          Testers needed:
          Before I change the instructions it would be great if someone could confirm that this solves the problem.

          One last thing: When designing the code I didn’t expect that this line would be needed in the eForm template for editing own user data. I must check the code again to see that this will not make it less secure. If that’s the case I’ll post an update of ppp.
          But please go ahead and test if the solution above works for you.


          EDIT: This doesn’t affect security, ppp is as secure (or unsecure) as before.

          Thanks!

          /Uncle68


          nicpan
            • 26182
            • 164 Posts
            awesome! thanks so much for that. it works now laugh
              • 26482
              • 138 Posts
              Hi,

              Great script! I’ve gotten pretty far with this. However, still some issues remain. F.e., see below. I want to create a list of all webusers that have a fullname entered. For each webuser, I want to show a custom field.

              Snippet call in document
              [[ppp? &useTable=`web_user_ppp` &listUsersAdv=`LaatstIngelogd:web_user_ppp:ppp_tpl_row:thislogin DESC::fullname::`]]
              <b>Laatst Ingelogd</b>
              <ul id="UsersTable">
              [+LaatstIngelogd+]
              </ul>
              <div id="targetArea"><br /></div>



              ppp_tpl_row
              <li>Naam: <a href="[~104~]?WID=[+webuser+]">[+fullname+]</a> <a href="/test/knltb-profiel.php?request=profiel&bondsnummer=[+KNLTBNR+]" class="loadinto-targetArea">Ranking</a> </li>


              Now, I get a list of webusers. However, the custom field (KNLTBNR) is the same for all users, namely the KNTBNR of the webuser currently logged in. On http://www.learningmodx.com/list-users/ you are showing lists with different custom fields, so this *should* be possible. What am I missing here?

              Thanks.
                • 26482
                • 138 Posts
                Bump laugh
                  • 26482
                  • 138 Posts
                  Anyone?
                    • 31037
                    • 358 Posts
                    sderuiter, I had a quick look at your problem, but sorry to say, I have forgotten how PPP works tongue

                    To be able to help you I must spend some time updating me on how PPP works, at this moment I don’t have that time. I’ll try to find some time later.

                    But try to make another list as simple as possible, without any links or so, perhaps doing it exactly as in the example in the instructions. If you can get that small test working you could compare is with your non working example.

                    Sorry for not being able to help you atm, I’ll try to dig in to it as soon as I get some time!

                    /Uncle68
                      • 14050
                      • 788 Posts
                      Uncle68,

                      That made me smile, because when I went back to one of the snippets I authored, I had the same problem about remembered how it worked exactly :-D
                        Jesse R.
                        Consider trying something new and extraordinary.
                        Illinois Wine

                        Have you considered donating to MODx lately?
                        Donate now. Every contribution helps.