We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27226
    • 186 Posts
    Hi,
    I just wrote a Snippet which returns a list of those words, which meet two conditions:
    1. appear in the document’s content (including TVs!)
    (the number of times they have to appear to be returned can be configured - that’s the only param of this one laugh)
    2. appear in a match-list of words, being specified either in a chunk named "cloudwords" or directly in the code

    Purpose:
    Automatic generation of page-specific meta-keywords or setting categories for (blog-) posts.

    If you like to test it, I’d be happy to hear your comments!
    Maybe it’ll make it into the repo...
      • 25663 MODX Staff
      • 12,272 Posts
      Very cool idea and great way to build a set of tags.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 27226
        • 186 Posts
        Thanks!
        NOTE TO SELF: I should upgrade the TagCloudInc snippet so that it parses TVOutput too...
          • 31654
          • 238 Posts
          I’ve added the snippet ad tried it cached and uncached
          <meta name="Keywords" content="[!PageKeywords?min=`2`!]" />
          <meta name="Keywords" content="[[PageKeywords?min=`2`]]" />

          I don’t have a "cloudwords" so from my understanding it should pick out word automatically.

          The output I get always has the last letter of the last word missing. The only words it picks out of my home page is the words that are in the snippet:
          $include = array(’blog’,’method’,’edit’,’content’,’design’,’links’,’quickedit’,’MODx’,’customize’);

          This the the output on my web site home page
          <meta name="Keywords" content="MODx,content,desig" />

          hope this helps the development!
            Web Development, Web Hosting & Search Engine Marketing by:

            Vitalized | UK
            w. www.vitalized.co.uk

            Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

            Vitalized | Australia
            w. www.vitalized-australia.com.au

            Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible
            • 27226
            • 186 Posts
            Yes, you’ve found a bug: there’s a truncation taking place which not only deletes spaces but the last character of the last word too. I’m going to fix this asap.

            Looking at your results it seems to work fine. But the "cloudwords" chunk is important, since it determines WHICH words to look for. Just considering ALL the words and select those which have the highest frequence wouldn’t do the job. So, to make any senseful use of this snippet, you should either create this chunk with all the words you can even think of they might be of relevance for the site, or type them directly into the snippet’s source.
            I recommend the first method, since it’s far more comfortable!
              • 31654
              • 238 Posts
              I thought auto calculating the words from the page might be to good to be true at this stage!

              In the snippet documentation it says:
              "if a chunk named "cloudwords" exists, the snippet will take the content of it for building the cloud"

              It’s the IF at the beginning that made me think that you may have added the auto calculating feature!
              I still think a stop word list along with the customised word repetition count feature (set to a default minimum of four rep’s) that’s already built in to snippet will work!.. hint, hint wink
                Web Development, Web Hosting & Search Engine Marketing by:

                Vitalized | UK
                w. www.vitalized.co.uk

                Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

                Vitalized | Australia
                w. www.vitalized-australia.com.au

                Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible
                • 27226
                • 186 Posts
                As soon as you give me a clear (i.e. computable) description of what "auto calculation" means - I’ll do my best to realize it. wink
                For now, I only have the truncation-fix attached:
                  • 7923
                  • 4,213 Posts
                  @silent
                  Please attatch the file to the first post, many users just take the fist attachment they see and many do not have the time nor the energy to read through the whole thread (unfortunently). Also, why not put it to the resource repository?

                  And thank you alot for your contributing! Excellent work. smiley


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 27226
                    • 186 Posts
                    Quote from: doze at Aug 18, 2006, 03:05 PM

                    @silent
                    Please attatch the file to the first post, many users just take the fist attachment they see and many do not have the time nor the energy to read through the whole thread (unfortunently). Also, why not put it to the resource repository?

                    And thank you alot for your contributing! Excellent work. smiley
                    I just was a little bit shy to "publish" it in the repo. I’ll do so asap!
                      • 27226
                      • 186 Posts
                      Done: PageKeyWorder: http://modxcms.com/Page-Keyworder-903.html
                      Hope the other readers will follow this link!
                      Greetings, doze!

                      EDIT: what’s the trick to replace the first, or even any, attachment??