We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18436
    • 135 Posts
    Now we’re really talking the shizz man!!! Ditto and wayfinder are both excellent but do seem to do similar things, however ditto using wayfinder’s amazing templating capabilities would truely rock the boat!!!

    If at all possible, I’m totally sold on the idea!!! shocked
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      RE: Number Limits and Randomization, whould/should actually be pretty easy to do via SQL. I wouldn’t anticipate very much coding/change required at all.

      Account for the parameters, then change this:

      ' ORDER BY '.$sort.' '.$dir.';';
      


      To something like this:

      $sort = 'RAND()';
      $dir = '';
      ...
      
      ' ORDER BY '.$sort.' ' . $dir 
      . 'LIMIT 0, '.$wfLimit.';';
      


      Or alter in a similar manner. In short, if randomization is selected, it would probably have to go in front, with others to follow. (e.g. Random 5, then sorted by menu index...)
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 15987
        • 786 Posts
        yeah, I already have the limit going on my test setup. I am working on the random part.
          • 23491 ☆ A M B ☆
          • 1,056 Posts
          Quote from: kylej at Oct 24, 2006, 12:14 PM

          yeah, I already have the limit going on my test setup. I am working on the random part.

          Sweet! I was just about to mod Wayfinder so that I could use the limit, but depending on how soon you get done, I might not have to! Maybe you could post the names of the params/"beta-code" so that I won’t have to change references in my snippet call and can continue working in the interim?

          This is awesome news, Kyle!
            Mike Reid - www.pixelchutes.com
            MODx Ambassador / Contributor
            [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
            ________________________________
            Where every pixel matters.
            • 15987
            • 786 Posts
            @pixelchutes

            I have completed the mods and the updated version is in the repository.

            I added the parameter &limit for limiting the result set.

            For the random part, I added the option of ’random’ to the sortBy parameter.

            So if you want 5 random links you would use:

            [!Wayfinder? &startId=`0` &limit=`5` &sortBy=`random`!]
              • 23491 ☆ A M B ☆
              • 1,056 Posts
              Quote from: kylej at Oct 24, 2006, 01:08 PM

              @pixelchutes

              I have completed the mods and the updated version is in the repository.

              I added the parameter &limit for limiting the result set.

              For the random part, I added the option of ’random’ to the sortBy parameter.

              So if you want 5 random links you would use:

              [!Wayfinder? &startId=`0` &limit=`5` &sortBy=`random`!]


              :D Now talk about service! Huge thanks, and glad that others will also find a use for my suggestion/your work. I’ll test it out right now!
                Mike Reid - www.pixelchutes.com
                MODx Ambassador / Contributor
                [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                ________________________________
                Where every pixel matters.
                • 25663 MODX Staff
                • 12,272 Posts
                Nice addition indeed guys. Great work (and so fast, too!). smiley
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 23491 ☆ A M B ☆
                  • 1,056 Posts
                  Quote from: rthrash at Oct 24, 2006, 01:28 PM

                  Nice addition indeed guys. Great work (and so fast, too!). smiley
                  Works great! Think of the new possibilities! Good job, Kyle.
                    Mike Reid - www.pixelchutes.com
                    MODx Ambassador / Contributor
                    [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                    ________________________________
                    Where every pixel matters.
                    • 15987
                    • 786 Posts
                    Cool, thanks for the tips in getting it implemented. Hopefully it will fill everyones needs for now wink
                      • 26435
                      • 1,193 Posts
                      I also updated the MODx Resource Wizard package in the extras section.

                      -sD-

                      *** EDIT ***
                      scratch that, for some reason the Repository is not accepting any of my updates right now. it is attached below for now. When I click "Submit" it just reloads the edit page and nothing gets updated. Sorry.
                        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                        All of the above... in no specific order.


                        I send pointless little messages

                      This discussion is closed to further replies. Keep calm and carry on.