We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I don’t see why you couldn’t just make up a template to display the info using the placeholders, in the same way the eForm report template does it. The placeholders don’t care what kind of container they are put in.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 2762
      • 1,198 Posts
      Quote from: sottwell at Oct 03, 2006, 11:00 AM

      I don’t see why you couldn’t just make up a template to display the info using the placeholders, in the same way the eForm report template does it. The placeholders don’t care what kind of container they are put in.
      Quote from: banzai at Oct 03, 2006, 10:57 AM


      Quote from: banzai at Sep 26, 2006, 10:28 AM

      Sorry Susan for this stupid request grin I only need a new chunck without input form laugh

      wink
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 2762
        • 1,198 Posts
        There are available placeholders for Gender, Comment and User Photo in the user profile?
          Free MODx Graphic resources and Templates www.tattoocms.it
          -----------------------------------------------------

          MODx IT  www.modx.it
          -----------------------------------------------------

          bubuna.com - Web & Multimedia Design
        • Ah, sorry. No, this was made to reflect the Websignup snippet.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 24997
            • 12 Posts
            Hi there,

            I’m trying to use this script. When I call it from within my document by:

            [[webeditprofile? &tpl=`WebEditProfileForm`]]

            I get an error saying:

            Parse error: parse error, unexpected ’<’ in D:\xampp\htdocs\modx\manager\includes\document.parser.class.inc.php(705) : eval()’d code on line 1
            Also when you say:

            The snippet has a default template in the webeditprofile.inc.php file; edit the form and the postback processing section of the file to suit your web user data configuration.

            Do you need to paste the form contents to a separate document or just call it from there?

            thanks for your help

            Richard
              • 7923
              • 4,213 Posts
              Quote from: richardjjj at Oct 10, 2006, 01:06 PM

              Parse error: parse error, unexpected ’<’ in D:\xampp\htdocs\modx\manager\includes\document.parser.class.inc.php(705) : eval()’d code on line 1
              remove <?php from the start of the snippet code and ?> from the end if there is one.

              Quote from: richardjjj at Oct 10, 2006, 01:06 PM

              The snippet has a default template in the webeditprofile.inc.php file; edit the form and the postback processing section of the file to suit your web user data configuration.

              Do you need to paste the form contents to a separate document or just call it from there?
              It means that by default, if you don’t supply any template in the snippet call, it will use that file as a template. So you can either edit that file directly to do any modifications to the template or copy paste it’s contents as a new chunk and define it in the snippet call.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 22221
                • 283 Posts
                I’ve tried to use the snippet but I have the following 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 `db181447689`.modx_web_user_attributes WHERE internalKey = ;
                [Copy SQL to ClipBoard]

                Parser timing
                MySQL: 0.0043 s (0 Requests)
                PHP: 0.0403 s
                Total: 0.0446 s

                Any Idea ?
                  • 22221
                  • 283 Posts
                  Quote from: OncleBen31 at Oct 21, 2006, 09:58 PM

                  I’ve tried to use the snippet but I have the following 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 `db181447689`.modx_web_user_attributes WHERE internalKey = ;
                  [Copy SQL to ClipBoard]

                  Parser timing
                  MySQL: 0.0043 s (0 Requests)
                  PHP: 0.0403 s
                  Total: 0.0446 s

                  Any Idea ?
                  The error have disappear huh No explanation.
                  But I notice a buggy behavior. When you update the password and logout I have the following 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 `db181447689`.modx_web_user_attributes WHERE internalKey = ;
                  [Copy SQL to ClipBoard]

                  Parser timing
                  MySQL: 0,0052 s (2 Requests)
                  PHP: 0,0793 s
                  Total: 0,0845 s
                  It seem to be the same error as in the former post huh
                    • 33033
                    • 43 Posts
                    Quote from: banzai at Oct 03, 2006, 11:09 AM

                    There are available placeholders for Gender, Comment and User Photo in the user profile?
                    Not sure if you are still looking for this, but I modified the snippet to include other fields.

                    In webeditprofile.inc.php

                    Line 29
                      $tpl = str_replace("[+zip+]",$userdata['zip'],$tpl);
                    

                    Add after
                      $tpl = str_replace("[+comment+]",$userdata['comment'],$tpl);
                    



                    Line 80
                      $zip = $_POST['zip'];
                    

                    Add after
                      $comment = $_POST['comment'];
                    



                    Line 86
                                      "zip"=>$modx->db->escape($zip)
                    

                    Add after
                                      "comment"=>$modx->db->escape($comment)
                    

                    Be sure to put a , after all but the last one.

                    Line 395-399
                    <tr>
                    <td>Zip:</td>
                    <td>
                    <input type="text" name="zip" class="inputBox" style="width:300px" maxlength="50" size="20" value="[+zip+]"></td>
                    </tr>
                    


                    Add after
                    <tr>
                    <td>Zip:</td>
                    <td>
                    <input type="text" name="comment" class="inputBox" style="width:300px" maxlength="75" size="20" value="[+comment+]"></td>
                    </tr>
                    


                    For other fields just replace comments with the field name, i.e. phone, zip, fax, etc.

                    I added comments, photo, and user IM’s (added into DB myself) and it works great, not sure about getting gender to work, should be similar to country flag with 1=male 2=female
                    	<script language="javascript" type="text/javascript"> 
                    		var id = "[+country+]";
                    		var f = document.webprofilefrm;
                    		var i = parseInt(id);	
                    		if (!isNaN(i)) f.country.options[i].selected = true;
                    	</script>
                    

                    but haven’t played with it yet.


                    Attached is the webeditprofile.inc.php that I am using.
                      • 2762
                      • 1,198 Posts
                      Thank you very much YankeeDeuce smiley i’ll test it very soon wink
                        Free MODx Graphic resources and Templates www.tattoocms.it
                        -----------------------------------------------------

                        MODx IT  www.modx.it
                        -----------------------------------------------------

                        bubuna.com - Web & Multimedia Design