We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26931
    • 2,314 Posts
    The multi image uploaded TV you previewed earlier on this thread ...
    something like this would bring MODx to a whole new level ... one of the things that’s been asked on the forums over and over again smiley
      • 436 ☆ A M B ☆
      • 265 Posts
      Quote from: sharkbait at Jun 03, 2010, 12:46 AM

      The multi image uploaded TV you previewed earlier on this thread ...
      something like this would bring MODx to a whole new level ... one of the things that’s been asked on the forums over and over again. having this would be just beyond awesome smiley
      I really cannot agree with you more.

      My more technical clients who prefer to get involved with the MODx side of things have all shown interest in MODx supporting this or there being a plugin out there. They can see adding docs for images or lots of static TVs is the only current option but would hire me to implement a multi image upload TV without any hesitation smiley
        MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.
        • 22897 ☆ A M B ☆
        • 209 Posts
        Quote from: Adam at Jun 02, 2010, 11:30 PM

        (on a completely unrelated note, I checked out your website, Maple Design, seems you’re based not too far from me! I’m in Southsea; if you’re interested in meeting up and discussing web dev and MODx drop me a line: [email protected])
        Yes it would be good to meet up sometime. I’d like to hear your experience with Foxy Cart and where the experience can be improved.

        Ah, I see. So this plugin/version of MODx is only the the bare bones, the foundations for other programmers to then go and make custom TVs?
        Yes, it’s the programming framework to go and let you do great things. I will release an introductory tutorial soon (it’s half written), but I won’t be releasing the custom TVs shown in the video at this time. All these widgets have a lot of Javascript involved, and this makes it difficult to instruct people in how to write them because it’s very specific to the widget’s usage.

        In the /assets/tvs/ folder there’s just the one demo /faqs/ TV, I presume this is the "Sample popup window" TV, or do I need to activate this somehow?
        That is the sample popup window one, just waiting for content to be added. The name should be something else, but it is our FAQs widget with the code stripped out.

        Only yesterday I created this: [...] and there’s no way for the client to add a sixth or seventh image without me manually adding more TVs to the template.
        Yes it sucks doesn’t it? I’d like a behaviour like the one in this video (watch from 1:24 onwards) built into MODx so we can assign one or more TVs and let the user say how many times they appear.

        The multi image uploaded TV you previewed earlier on this thread would seriously be invaluable to me and my business right now, it would save me many hours of work and future-proof many of my client sites...

        Do you think its likely that you’ll release any sort of image organisation TV or eCommerce TVs in the near future, or will the code for those be exclusive for your clients?

        The gallery I’ve demoed will be released as a commercial extension. You’re welcome to be a very early beta tester and use it on your client’s site; the gallery has some hard-coded assumptions (like the size of the thumbnails) because it’s been designed specifically for our client’s situation, but you’ll be able to modify the PHP to work around those.
          MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
          • 29635
          • 361 Posts
          Might be worth sharing some examples of what we’ve done in the past, which is very similar to this approach (at least, from what I can tell):
          http://www.youtube.com/watch?v=XPcAfEs8M3Q
          http://www.youtube.com/watch?v=to8YFnfgF9w

          These types of custom TV approaches can be SUPER useful in a ton of situations. Peter, if you want any of the code behind the examples in the screencasts just let me know. (We kind of are horrible about actually finishing and documenting code to share.) Doesn’t look like you’d need it though, as your example is gorgeous.
            Need MODx Ecommerce? Try FoxyCart!
            • 22897 ☆ A M B ☆
            • 209 Posts
            Quote from: The at Jun 03, 2010, 03:59 AM

            These types of custom TV approaches can be SUPER useful in a ton of situations. Peter, if you want any of the code behind the examples in the screencasts just let me know. (We kind of are horrible about actually finishing and documenting code to share.) Doesn’t look like you’d need it though, as your example is gorgeous.

            I’d love to see your source code Brett - there’s always ways my code can be improved smiley I like your uploading in-line rather than resorting to a popup, it keeps everything nicely focused on the page.

            Also, what did you use to make the screencasts? I’ve been playing with Camtasia Studio but it’s both expensive and the quality when uploaded to YouTube doesn’t satisfy me, while yours are nice and crisp!
              MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
              • 17883
              • 1,039 Posts
              Peter, if you want any of the code behind the examples in the screencasts just let me know.

              I think not only Peter is interested in the code behind it, Brett ;-)

              This seems to be super useful for the "multiple TV problem". Great work!

              Another question: In the second video you store your values in MongoDB. What are you using it for? I am also experimenting with MongoDB these days but never thought about connecting MODx to it ;-)
                • 29635
                • 361 Posts
                Quote from: Peter at Jun 03, 2010, 04:07 AM

                Also, what did you use to make the screencasts? I’ve been playing with Camtasia Studio but it’s both expensive and the quality when uploaded to YouTube doesn’t satisfy me, while yours are nice and crisp!
                Screenflow. It’s not perfect, but for the price it’s probably as close as you’re going to get, and once you get the hang of it it’s super easy to work with.

                Quote from: MadeMyDay at Jun 03, 2010, 04:18 AM

                Another question: In the second video you store your values in MongoDB. What are you using it for? I am also experimenting with MongoDB these days but never thought about connecting MODx to it ;-)
                The reason we used MongoDB for that particular implementation was because we needed documents to have rich inter-relations. For example, Person A (a MODx document) may have Produced Film Z, Co-Produced Film Y, and Directed Film X. That person may also have been mentioned in Press Releases Q and R, and is a managing partner of Company 1. If we only needed to do the relationships one way (ie. Person A has all those things listed on their bio page), we’d be fine. But what if we want the Film Z page to display all the related People? The Person A JSON TV would know about the Company Z relationship, but the Company Z has no way of knowing about Person A.

                The only way I could figure to accomplish this with MySQL (without radically hacking the MODx core, which we try to avoid) was to use regex in the SQL queries. And while I love regex, that just didn’t seem right.

                So we went to MongoDB. That allows the JSON TV to be stored in Mongo, so while it’s in MODx, we don’t really care. What we care about is that we can now use Mongo to query our data however we want. So we can get all the related items from Person A, or from Company 1, or from Press Release R, or Film Z.

                I hope that makes sense, and that I’m not hijacking this thread.

                I’ve attached the source for both implementations (JSON TV with and without Mongo). The Mongo-backed approach really is only worthwhile if you need lots of inter-linking between lots of items. The normal JSON TV approach works fantastic for lots of images or links belonging to a single document. For example, here’s the output from the JSON TV for links (which is on that screencast):
                Click for full size - Uploaded with plasq’s Skitch

                Take the first element in the JSON object and output it one way. All subsequent, output another way. (There’s a Ditto-like snippet to make that happen.)

                A word of warning on the source attached: You’ll soon discover why we don’t release more of what we’ve done to the community. (Luckily, people usually pick up where we leave off and we at least get a mention in the comments wink )
                It will very likely cause more harm than good to you unless you have a ton of patience and the ability to debug other people’s code. Also, all the JSON relies on a base64 encoding widget that may or may not need to replace the equal sign to get around the MODx parser. If you have any questions please ask, but I don’t want to hijack this thread so maybe start a new one or PM me or something. Hopefully this helps you improve your own solution, or at least gives an idea for how to manipulate the data that’s stored (especially if you’re storing JSON). It all works (for us, at least), but it’s not pretty, nor documented.
                  Need MODx Ecommerce? Try FoxyCart!
                  • 17883
                  • 1,039 Posts
                  Thx Brett!

                  This is more a kind of JSON-Framework ;-) One question: Do you run the json-builder via Binding or somehow with managermanager? I know that the provided code is just a standalone sample and isn`t written for a direct include but I am not sure how the best approach looks like.
                    • 29635
                    • 361 Posts
                    Sorry, I missed the plugin for the JSON TV (non-Mongo). I removed the zip from my previous post but couldn’t re-add, so here it is on this one. It doesn’t tie into ManagerManager but probably could without too much difficulty.
                      Need MODx Ecommerce? Try FoxyCart!
                      • 17883
                      • 1,039 Posts
                      Thx a lot! Will try it.