We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    Quote from: Dimmy at Jun 11, 2008, 12:28 AM

    the snippet only shows something when you are logged in as a webuser AND when you have a loggedinhomeid set in webuser settings.
    I tested it myself and it worked

    its a snippet

    Hi Dimmy, sorry to bother you with this again but I just can’t get it working.

    I literally copied your code

    <?php
    if($modx->config[login_home]){
    return "<a href='[~".$modx->config[login_home]."~]' title='to your own page'>personal homepage</a>";
    }
    ?>


    Made the snipper and called it clientHome and in my template I put it under the menu using [[clientHome]] and nothing is showing up.

    My login call is

    [!WebLoginPE? &loginFormTpl=`loginTpl` &resetTpl=`passwordTpl` &successTpl=`loginsuccessTpl` &groups=`Registered Users` &liHomeId=`58` &regHomeId=`3` &profileHomeId=`11`!]

    Have I misunderstood something?

    Sorry!

    Ross undecided
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 7455
      • 2,204 Posts
      did you login as webuser?
      and did you set the loginstartid in the websettings for that user?

      I tryed it and it worked fine
        follow me on twitter: @dimmy01
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        Quote from: Dimmy at Jun 13, 2008, 01:19 PM

        did you login as webuser?
        and did you set the loginstartid in the websettings for that user?

        I tryed it and it worked fine

        Sorry Dimmy, I didn’t realise I had to go in to the MODx manager and set that manually. I’m guessing there’s no way to make that automatic like the creation of the pages? If it’s a lot of hassle it’s fine. I really appreciate all your time.

        Ross
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 7455
          • 2,204 Posts
          its possible to set that in the plug-in
          I will have a look
            follow me on twitter: @dimmy01
            • 7455
            • 2,204 Posts
            ok this will create the setting from the parent. so that the home is the parent document.
            if that is not good let me know it could be made that it uses the first doc in the parent as home.

            insert this code below: $parent= $modx->db->getInsertId();
            and before: //start of page creation, copy this...

            $settings_table = $modx->getFullTableName( 'web_user_settings' ); //set the table to use
            $fields2 = array('webuser' =>  $user['internalKey'],'setting_name' => 'login_home','setting_value' => $parent); //set the parameters to insert
            $modx->db->insert( $fields2, $settings_table); // insert the parameters in the right table.
            


            let me know if this works

            Dimmy
              follow me on twitter: @dimmy01
              • 25551 ☆ A M B ☆
              • 1,231 Posts
              You have surpassed yourself Dimmy! That worked first time.... the webuser is created, documents are created with the redirect in place, the homepage link appears in the menu to their private pages and the Webuser homepage ID in the manager is set to the auto generated pages Parent.

              Excellent! 80+ posts of help for one issue, you won’t find that at other CMS sites!

              On a side note, MODx was used in my first year project to structure my website and I passed. grin

              Ross
                Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                AugmentBLU - MODX Partner

                BLUcart - MODX Revolution E-Commerce & Shopping Cart
                • 25551 ☆ A M B ☆
                • 1,231 Posts
                One tiny problem.... the clientHompage link shows up in the menu of all pages but not the home page of the site. Would there be a reason it wouldn’t show up in the home page but the others?

                tongue

                Never mind, I cleared the cache of the site and it’s appeared now! grin
                  Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                  AugmentBLU - MODX Partner

                  BLUcart - MODX Revolution E-Commerce & Shopping Cart
                  • 7455
                  • 2,204 Posts
                  Great!
                  could yoiu change yout title to somthing like [SOLVED]-how I could have a page auto created when someone registers? (Are my ideas possible?)
                  so that people know what this treat is about.

                  maybe you can post your working code in a txt files here for others to use? (plugin and snippets)
                  maybe with a small explanation and webloginPE call

                  Greets Dimmy
                    follow me on twitter: @dimmy01
                    • 25551 ☆ A M B ☆
                    • 1,231 Posts
                    Yeah I’ll change the title and type up a tut on how this all worked out. Sounds like a great idea...

                    Thanks Dimmy, I appreciate all the time you spent helping.

                    Ross.
                      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                      AugmentBLU - MODX Partner

                      BLUcart - MODX Revolution E-Commerce & Shopping Cart
                      • 25551 ☆ A M B ☆
                      • 1,231 Posts
                      For those who wish to know...


                      I have typed up a basic walk through guide on how to generate pages automatically when a user signs up using WebLoginPE.

                      It can be found in the first post of this thread.

                      If there’s anything missing or you do not understand what I have type up, check through this thread first and then post a question. I’m a relative novice with MODx so most who wish to use this should manage to get it working with the guide.

                      Ross
                        Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                        AugmentBLU - MODX Partner

                        BLUcart - MODX Revolution E-Commerce & Shopping Cart