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
    Don’t know how this can be fixed though.. Maybe if the text would be in a textarea, it would not copy like that to the clipboard.. not sure though.. if not, maybe there has to be some button to do the copying to clipboard through javascript what would take those html comment tags away..?
    I’ve been thinking about this as well and there doesn’t appear to be any quick solutions to this problem ... even placing the snippet calls and code in a textarea would still require the commenting to prevent the document parser picking up the calls.

    The JS function would work but we need a way of uniquely identifying each snippet call/piece of code so that the function can pick out the correct information ... this is made slightly more difficult because of the possibility of nested tags within code etc. The only thing I can think of is that the bbcode parser is completely revised to be more like a tokeniser and that each main snippet call/code block is given a unique ID in order that it can be extracted by the JS function. (the button could also be dynamically inserted at the correct places with this method)

    This is by no means a small piece of work so if anybody is willing to assist with this, it would be great. smiley

    Speaking of these, can we exempt these from the most popular downloads, or probably better should we just bump the download count for past resources? On that same note, can we easily add the past distributions after the fact and modify the download count to reflect the current status?
    I think we need to add a TV checkbox to allow for resources to be exempted from the ’most downloaded’ listing - this would allow for easier admin going forward. We can update any download counts retrospectively, so all core distributions can be easily updated with their existing download counts as required.

    @Ryan: I am still working on getting the test repository up and running - I’m being extremely careful to make sure that there is no crossover between the test repository and the main repository, especially with the various chunk calls etc. I am not far off now having a setup for you to start work on the layout changes.
      Garry Nutting
      Senior Developer
      MODX, LLC

      Email: [email protected]
      Twitter: @garryn
      Web: modx.com
      • 7923
      • 4,213 Posts
      Quote from: garryn at Jul 23, 2006, 09:36 AM

      The JS function would work but we need a way of uniquely identifying each snippet call/piece of code so that the function can pick out the correct information ... this is made slightly more difficult because of the possibility of nested tags within code etc. The only thing I can think of is that the bbcode parser is completely revised to be more like a tokeniser and that each main snippet call/code block is given a unique ID in order that it can be extracted by the JS function. (the button could also be dynamically inserted at the correct places with this method)
      Yes.. I guess easiest way would be to make it generate unique id’s to the <pre> tags where snippet calls are, then with javascript strip the comments out and copy to users clipboard. I did some research on this and it seems that atleast mozilla browsers have a security setting that doesn’t allow copying to clipboard by default. But you can use flash to get around it.

      I made a small example to show what I mean, view here or download the attachment. It seems to do the copying to clipboard just fine in IE, FF and Opera. I don’t have other browsers to test. I found the sfw from net and it’s GPL.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 10487 MODX Staff
        • 1,535 Posts
        I made a small example to show what I mean, view here or download the attachment. It seems to do the copying to clipboard just fine in IE, FF and Opera. I don’t have other browsers to test. I found the sfw from net and it’s GPL.
        Looks very cool, Doze smiley Could somebody be kind enough to give it test on the Mac-based browsers so we know if this can be used or not.
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 25663 MODX Staff
          • 12,272 Posts
          Works perfectly in Safari! laugh
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 18397
            • 3,250 Posts
            Ditto
              • 10487 MODX Staff
              • 1,535 Posts
              Thanks for testing Ryan and Mark! Much appreciated smiley One day, I will have enough money to buy my own Mac ... :sigh:

              Anyway, I’ve started work on the bbcode tokeniser, it’s looking good so far but I’ve still got a long way to go for it to be completed. As I was doing my research, I found this little beauty.

              I’m having to rewrite the underlying bbcode parsing because of our particular needs but I think the frontend would be cool for the Repository. Any thoughts? Once I get the bbcode tokeniser working, I can start to look into this.
                Garry Nutting
                Senior Developer
                MODX, LLC

                Email: [email protected]
                Twitter: @garryn
                Web: modx.com
                • 22815
                • 1,097 Posts
                Please please please add the ability for moderators to edit entries - particularly to add tags to a snippet, and possibly remove some.

                Somehow, "Addbookmark" qualifies as blogging, but "NewsManager" doesn’t.

                And it would be nice to be able to tidy up horrendous mis-spellings.

                I always thought this was likely to be needed, but some of the resource descriptions are just horrid.

                It would also be nice to have a mini reviews section - possibly like the Firefox extensions site. When I see that a snippet has a rating of 3.abit/5 it would be nice to know why.

                On the subject, it would be nice to have a number shown on hover-over, as it is not all that easy to distinguish 3.75 from 4.
                  No, I don&#39;t know what OpenGeek&#39;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!
                  • 10487 MODX Staff
                  • 1,535 Posts
                  Please please please add the ability for moderators to edit entries - particularly to add tags to a snippet, and possibly remove some.
                  Moderation has been in place since the repository went live. If Ryan is happy for you to be added (can’t see why not), then I will get you added to the list of moderators.

                  It would also be nice to have a mini reviews section - possibly like the Firefox extensions site. When I see that a snippet has a rating of 3.abit/5 it would be nice to know why.
                  User commenting/reviews was something that was discussed between myself, Kyle, and Ryan in the early stages of the repository development and we decided that it would be best to keep commenting within the forums. There is the risk that this kind of commenting functionality could turn very quickly into a support thread as opposed to a set of reviews.

                  On the subject, it would be nice to have a number shown on hover-over, as it is not all that easy to distinguish 3.75 from 4.
                  I have just added a title to the star rating which will pop up when the star rating is hovered over (only when the star rating is read-only mode though). I will look at perhaps including the rating value underneath the star rating, to the left of the ’number of votes’ text.
                    Garry Nutting
                    Senior Developer
                    MODX, LLC

                    Email: [email protected]
                    Twitter: @garryn
                    Web: modx.com
                    • 25663 MODX Staff
                    • 12,272 Posts
                    Add him Garry!

                    How’s the playground for me coming? (And Paul, care to collaborate on cleaning up the wording?)
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 10487 MODX Staff
                      • 1,535 Posts
                      How’s the playground for me coming?
                      Been tied up last few days but I just need to give it a final once-over then it’s all yours. I will have a look now ...

                      @Paul - You are now added as a moderator, you should be able to edit any item in the repository.
                        Garry Nutting
                        Senior Developer
                        MODX, LLC

                        Email: [email protected]
                        Twitter: @garryn
                        Web: modx.com