We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10487 MODX Staff
    • 1,535 Posts
    Hi all,

    By special request of Zi ... grin

    Here is a simple snippet (and module) for displaying a random selection of friend’s names that can be linked to their website addresses on your site. The main output is an unordered list that can be styled to your heart’s content wink

    Installation Instructions

    1. Copy the contents of friendslist_module.tpl into a new module and run (this will install the db table)
    2. Copy the contents of friendslist_snippet.tpl into a new snippet.
    3. Add/Update your friends names and web addresses using the module.

    Snippet Params

    &items - the number of friends you would like to be displayed in the list
    &link - whether to link the name to the website address.

    A ’friendslist’ class has been added to the <ul> so that you can style the output.

    Snippet Usage

    Demo URL: http://www.immerse.me.uk/ (right hand column)

    This will display a randomised list of all the names:
    [[FriendsListing]]

    This will display a randomised list limited to 5 names with no hyperlinking:
    [[FriendsListing? &items=5 &link=false]]

    So, there you go ... enjoy! smiley

    Cheers, Garry
      Garry Nutting
      Senior Developer
      MODX, LLC

      Email: [email protected]
      Twitter: @garryn
      Web: modx.com
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Nice!

      Seems to me this could be used for any kind of "links" you want. Now if it had categories...
        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
        • 6726
        • 7,075 Posts
        Reading my mind Susan ! Nice snippet, could be used as a randomized blogroll indeed smiley

        You mention categories, I’d add (if it’s not too complicated) why not let the user choose if it should be randomized or not ?

        Anyway, thanks Garry ! (and, thanks for the link to my blog laugh )
        very handy grin
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l&#39;outil id
          • 33337
          • 3,975 Posts
          The demo is on http://www.immerse.me.uk/ laugh

          Well.. original idea demo is on http://zidesigns.com grin

          *zi now going to automate his friend’s list wink *

          Much much thanks to Garry! Nice work!

          regards,

          zi
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 10487 MODX Staff
            • 1,535 Posts
            Quote from: sottwell at Apr 11, 2006, 11:53 PM
            Seems to me this could be used for any kind of "links" you want. Now if it had categories...
            Categories is something I’m working on as part of a very big update on the Autolink module - my aim is to get all the necessary functions into a Category class that can be used on other modules such as this.
            Quote from: davidm at Apr 12, 2006, 02:18 AM
            why not let the user choose if it should be randomized or not ?
            With a bit of tweaking this shouldn’t be too difficult to achieve - I’ll add it to my ’to do’ list smiley
            Quote from: zi at Apr 12, 2006, 05:00 AM
            Well.. original idea demo is on http://zidesigns.com grin
            Zi does deserve the credit for coming up with the original idea and suggestion for this - I just did the code grin

            Cheers, Garry
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 33337
              • 3,975 Posts
              Quote from: garryn at Apr 12, 2006, 03:06 PM

              Quote from: zi at Apr 12, 2006, 05:00 AM
              Well.. original idea demo is on http://zidesigns.com grin
              Zi does deserve the credit for coming up with the original idea and suggestion for this - I just did the code grin

              lol... Thanks man! You’ve done a great job.

              Keep up the good great work!

              best wishes,

              zi
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 28948
                • 42 Posts
                Thanks for this great module/snippet thingy - works perfectly, exactly what I needed!
                  --
                  cal wilson
                  oksushi.com