We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10647
    • 36 Posts
    Hi guys, once again I have no idea if this is the place to find the feature I’m looking for, but google searches have turned up not much so far.

    I’m looking for a way for my users to vote for stories ala Digg but have the main page display the top most "digged" items only. I have seem the pligg cms, but am wondering if there is such a way to use such a function inside the modx system. Thanks!
      • 22815
      • 1,097 Posts
      This would be fairly trivial if the votes are stored in TVs; you could just sort by votes and show the top 10. However, there’s presumably some other time factor involved. What exactly would the formula be for displaying stories on the home page?
        No, I don't know what OpenGeek's saying half the time either.
        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
        Forum: Where to post threads about add-ons | Forum Rules
        Like MODx? donate (and/or share your resources)
        Like me? See my Amazon wishlist
        MODx "Most Promising CMS" - so appropriate!
        • 10647
        • 36 Posts
        Just simply the largest number of votes, nothing else. grin

        This is trivial? Yay! grin
          • 727
          • 502 Posts
          Can Ditto sort documents for display based on the value of a TV? That would be cool...

          Andy
            • 10647
            • 36 Posts
            Can somebody explain what Paul meant? Thanks
              • 10647
              • 36 Posts
              I hate to bumpmyself, but... grin
                • 727
                • 502 Posts
                Do you understand Template Variables (TVs)? It’s like adding a property to each document.

                Create a template for the documents that will be voted on.

                Create a template variable called "votes" and add it to the template. Default value is zero.

                Create documents based on the template.

                Create a snippet called "vote" that when clicked increments the value in the template variable. However you will have to add flood control so someone can’t spam the voting system. So only let a specific IP address vote once per document.

                To show the top 10 documents, use Ditto and pass:

                &sortBy=`votes`


                I hope this helps.

                Andy