We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15001
    • 697 Posts
    Answer to elz64:

    There’s something very puzzling : &lang=`fr` is suppose to do what ?
    There’s a lang folder, right and a fr.php, ok again but looking at the strings in fr.php I see it seams to concern only the registration process.
    The &lang=`fr` parameter indicates to use "webloginpe.fr.php".
    (See also http://sottwell.com/assets/snippets/webloginpe/docs/parameters.html
    although the how &lang is used is a little bit too restrictive in the official documentation.)

    Do I have to rebuild the webloginpe.templates.php and ALL the file in \Default Forms
    Yes and no. Yes if you need all templates. No if you only need some of them.
    More exactly, you can either translate the whole webloginpe.templates.xx.php file OR the templates located in the Default Forms. The second approach gives you more flexibility.

    When you don’t specify custom templates by passing parameters, those located in webloginpe.en.php or webloginpe.fr.php are used. The files in "Default Forms" are a copy of the default templates from webloginpe.xx.php.

    However, you’ll probably need to use your own templates rather than those provided by default.
    Each template in webloginpe.xx.php has it’s copy in the "Default Forms" folder.
    The easier is to specify you templates explicitely using the parameters.
    For each template you need, make a copy of the default one, remove the placeholders that you don’t need, style it, translate it, and pass it as parameter of WebloginPE.

    I provide WebloginPE integration service in French/English/German/Greek and XHTML/CSS template design if you’re interested.
    My mothertongue is French.

    Edit:
    @Sottwell (next message): Sorry. Yes, the documentation comes when you download the snippet.
    • It’s not really a good idea to be linking to that on my site; I’m liable to drop it at any time. You can access the same files on your own sites when you install the 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
        • 8790
        • 526 Posts
        Thank you


        However I read this doc already as, as Suzan told, this is the one embeded within the archive.
        I just regret their’s strictly no indication about "&templates" parameters in it (afaik). But, yes, looking at the code of the snippet I can understand many of such param actually exist.

        But when jul says :
        you can either translate the whole webloginpe.templates.xx.php
        I just can’t see which file you’re talking about.
        I can see only webloginpe.templates.php but nothing else.

        Do you mean I can write a webloginpe.templates.fr.php huh and it will be used if I call the snippet with &lang=`fr` ?
          Schtroumpf Grognon - Grouchy Smurf
          ---------------------------------
          Faites pas attention.. - Don't pay attention
          http://www.dzi-neo.net
          • 10076
          • 1,024 Posts
          Hi,

          Has anyone ever tried the lang parameter successfully?
          • Yes, but it was a while ago and I don’t remember any problems with it at all. I haven’t used it for a while, although I’m actually going to be installing it on a site today; I’ll check it out when I do and get back to you on what I find.
              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
              • 8790
              • 526 Posts
              ok great!

              I really ’d like to understand stuff about my previous question
              Do you mean I can write a webloginpe.templates.fr.php Huh and it will be used if I call the snippet with &lang=`fr` ?


              Thank you
                Schtroumpf Grognon - Grouchy Smurf
                ---------------------------------
                Faites pas attention.. - Don't pay attention
                http://www.dzi-neo.net
                • 15001
                • 697 Posts

                @Frank: Yes.
                @elz64: Yes. I redirect to the other thread you created: http://modxcms.com/forums/index.php/topic,59301.0.html
                  • 31601
                  • 57 Posts
                  Hope someone will hear this, anyways-

                  OK, I’m building a multi-page signup system with invitation codes, and I’m at the final stage of development where I need to use winloginPE to register users with custom fields, etc.
                  I have been performing my own validation of various fields to register with and setting a session variable with values from the fields through the registration process.
                  My intention was to create a form that would contain all the appropriate values for the user registration and set the values from the session variable array through string replacement. This is all working out well, and I’ve made the form fields hidden as the user has already input all this data. I’m calling webloginPE through a snippet (using runSnippet), and I’m setting the template to the output of a process of getChunk->str_replace. Again, this is all happy. However, I do not have the placeholders in the template that webloginPE calls as I’m replacing values directly in the form data.

                  The upshot is that winloginPE doesn’t even try to register the user: it just flips right back to the page with no output.

                  I’m wondering if this is possible? I know I can use the API and do all of this, but I was hoping it would be fairly straight forward this way.

                  I’ll be happy to post code examples if need be!

                  Virgil Rockford
                    • 31601
                    • 57 Posts
                    Never mind, it works a charm. Just had to push the final use of winloginPE to a different document and write a separate snippet to do the final processing (I was trying with a postback and it wasn’t working out so well. Not the end of the world, and makes the client happy).
                      • 27107
                      • 4 Posts
                      I have a problem that I suppose only affects a relatively small amount of users. Where I live (NJ, USA) our zip codes all start with a 0 (example: 08757) but when they get saved to the db, the leading 0 gets removed. How/where can I fix this?