We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24068
    • 4 Posts
    Hello,

    don’t laught, but i did it: An Extra that generates random Resources filled with LoremIpsums (incl randomly appending them to a parent)

    https://github.com/oleics/LoremIpsum

    Currently you can only specify the number of resources to create. There are other parameters to controll the generation that will be implemented fully in a later version.

    I attached a package of it.

    Have Fun and Good Night.
      • 25663 MODX Staff
      • 12,272 Posts
      Absolutely cool Add-on idea. Was just thinking about something like this the other night in fact.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 24068
        • 4 Posts
        Quote from: rthrash at May 31, 2011, 09:39 PM

        Absolutely cool Add-on idea. Was just thinking about something like this the other night in fact.

        Thank you, good to know.

        I’ve added more parameters to the CMP, like the probability of isfolder or the number of words for the content.

        Package is attached to this post, feedback is welcome.
          • 26016
          • 561 Posts
          Very clever... I like that! I tend to go here all the time....

          http://www.lorem.biz/loremipsum.asp

          but maybe I won’t need to if I use your plugin. Thanks!

          Dave
            MODx and Wordpress development
            Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            I love it! laugh

            This is just what I need when developing and am in need of some content. Few clicks and one.

            Love that 0.6 update as well, all the options are amazing laugh
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 24068
              • 4 Posts
              Hello Mark H.,

              Quote from: Mark at Jun 10, 2011, 12:11 PM

              I love it! laugh

              Thank you so much smiley

              Quote from: Mark at Jun 10, 2011, 12:11 PM

              This is just what I need when developing and am in need of some content. Few clicks and done.

              Thats was too a reason for me to start it. For the development
              of another extension called Statiker i need massive amounts
              of content for testing. (http://modx.com/extras/package/statiker)

              Then there was that post form Dino Dini about Randomness in game-ai
              http://dinodini.wordpress.com/2011/03/29/randomness/
              Anybody remembers Dino Dini and its GOAL! game?

              And to tell you the whole story, the first line of code started
              with the need to know how the resource-menu behaves when there is
              a massive number of resources. Result: Try yourself and you’ll see lipsrsealed

              Quote from: Mark at Jun 10, 2011, 12:11 PM

              Love that 0.6 update as well, all the options are amazing laugh

              LoremIpsum 0.6.1-alpha1 is now downloadable via Package Manager.

              Have fun and thank you smiley

              EDIT: LoremIpsum 0.6.1-alpha1 allows for the parent-id to be 0
                • 10208 ☆ A M B ☆
                • 1,780 Posts
                I'm not sure this is working in 2.2.0-pl2.

                I tried it first as a child. No resource appeared (forgot to download the text file).

                Tried again with the parent set to 0. I saw that it created resource ID 53, which should have been the ID of the first try. However, no such resource exists in the tree.

                Here's the output of the second try:

                /*
                * MODX Console Output
                *
                * @date 2012-01-27 10:11:15
                */
                Resource 53 created.
                
                
                /* EOF */


                I then created a test page to see what ID it would have. This test page is ID 55. Somehow, between creating the second missing loremipsum resource as ID 53 and the regular test page, ID 54 was skipped.

                The reality is, the first loremipsum generation is probably ID 53 but since I can't locate it or the second one, I can't verify this.



                  Frogabog- MODX Websites in Portland Oregon
                  "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                  Having server issues? These guys have MODX Hosting perfected - SkyToaster