We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27179
    • 10 Posts
    I am posting this under navigation, if this is the wrong area, please let me know. Yes I do realize this is a rather long post, but any help with this I would be grateful for.

    First off, am by far not a web programmer or programmer sort of person, though I have learned much of late regarding most things Modx related.
    I don’t KNOW any code, but can understand and read fairly easy.

    Maybe I haven’t found this because I don’t know what exactly I am looking for?

    Basic explanation of situation is, I am setting up a "Book Review" site that will be covering all genre’s. Not sure of the best way to really do this, so help would be appreciated. What I am trying to do, is have 4 categories in 4 separate drop down boxes, for these reviews only.

    Box one would be Genres, Box two Author, Box three Reviewer, Box four age rating (everyone - mature only)
    Now I want a drop down selection for each of these, so visitors can just select one of these and have it return results based on that.

    For example when selecting Stephen King from author box, would show all reviews site has done of his books.
    Also when just selecting the Reviewer, would return all reviews done by selected reviewer.
    In a posted style or summary listing in the content area.

    With doing this I don’t know if it would be better to use the Ditto blog thing built in, as currently using only for site news and contests site will run, once officially launched on 8/10/09. Or would it be better to just create "new documents?"

    The reason I ask, is would I just tag the new documents with all the required tags: genre, author, reviewer, rating? or would I have to use the blog to do this?
    I have searched for hours to no avail, on a solution to this and if there is a existing "add-on" for it.

    If this helps, the site I am referring to is http://www.howlinggoodbooks.com, of which I can not guarantee at the moment will be up at any given time (still waiting on static IP from ISP) this drop down bar would only show on the "reviews" page in the left column.

    I think the site has come a long way, because it is mainly just a REALLY chopped up and modified version of the default modxhost template. As stated before I don’t have any web programming experience and have just kinda figured it out along the way, would say the center column was the HARDEST thing to get there.

    Comments on this problem I am having or thoughts on the site would both be appreciated, second opinions are always good even when bad.
    Much love to Modx and Notepad++.
      • 3749
      • 24,544 Posts
      I’m not surprised that you didn’t find any direct solutions for your site -- that’s a fairly non-standard design. I haven’t seen any good MODx add-ons for letting users categorize posts from the front end (although that doesn’t mean there aren’t any).

      My first thought is to use eForm (http://wiki.modxcms.com/index.php/EForm) and eForm2DB (http://modxcms.com/forums/index.php?topic=8111.0). I think you might need a custom snippet to do the search and display although it’s possible that it could be done with Ditto.

      Another way to go would be to use a modified version of the NewsPublisher snippet (http://wiki.modxcms.com/index.php/NewsPublisher )with added template variables for the categories.

      I’m afraid it’s likely that what you want can’t be done without learning PHP and getting your hands dirty with custom code.

      Maybe someone who has done something similar can suggest a way to do it with stock MODx components.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 4172
        • 5,888 Posts
        you can try to use Ditto with the extender request for example in this way:
        the request-extender gets the postet filter-value and Ditto filters the documents as you use the parameter &filter="author,author A,1"

        if you have created TV author which holds the authornames. The same thing you can do with the other dropdowns.
        When it works this way you need a snippet which generates the dropdowns dynamically and perhaps preselects the last userselection.

        <form action="[~[*id*]~]" method="GET">
        
        <select name="ditto_filter" onchange="this.form.submit();">
                   <option value="">--choose one--</option>
                   <option value="author,author A,1">author A</option>
                   <option value="author,author B,1">author B</option>
                   <option value="author,author C,1">author C</option>
                   <option value="author,author D,1">author D</option>
        </select>
        </form>
        


        [!Ditto? &extenders=`request` &parents=`folder_where_reviews_are_stored`...more parameters..........!]
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 3707
          • 241 Posts
          Sounds like a job for tvExplorer. It’s still in beta but it’s quite stable.

          You would create a TV for each of your options; Genre, Author etc. and then use tvExplorer to build a form to filter the search. tvExplorer uses Ditto to output the results.
            • 27179
            • 10 Posts
            WOW! thank you for all the idea’s! I will have to look into more after work today.

            BobRay - If that is what has to be done, then I have about 5 weeks to learn it! grin

            Bruno17 - I have seen source that looks like that elsewhere, and is doing what I require, but not sure how they are doing it, as site is run using
            wordpress not modx. It is the site my wife currently works with doing reviews, (http://www.bittenbybooks.com) but I really
            don’t like the layout there. I am also sure the owner of that site wouldn’t provide the how, as currently wife just notified, that would
            be setting up own site, and she got banned.

            bob1000 - I had come across tvExplorer, but at first it just confused me more, I will have to give it a second more involved look this time.

            Any other suggestions? Will be off work late tonight, hopefully will have time to look into it more.

            Thx
              • 3707
              • 241 Posts
              Yes, the documentation for tvExplorer is a little scary but once you get it all installed it’s quite simple to use. I’ve implemented it on a site before so if you need any help, just ask.
                • 3749
                • 24,544 Posts
                Quote from: sidcypher at Jul 01, 2009, 09:28 AM

                I have seen source that looks like that elsewhere, and is doing what I require, but not sure how they are doing it, as site is run using wordpress not modx.

                It’s fairly easy to set up both categories and tags in WordPress, and to display things by either one. In fact you get both pretty much automatically. AFAIK, users have to be logged in to the back end to set them, though.

                If you’re willing to let your reviewers log in to the MODx Manager it might simplify things. You’d just have template variables for your categories that could be displayed as drop-down lists or radio buttons, or however you like.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 27179
                  • 10 Posts
                  Forum from phone = awesome

                  bob1000 - I might take you up on that offer of help.

                  BobRay - Making it easier by reviewers logging into manager panel isn’t much of a issue, since wife will have reviews sent to her for proof-reading and scheduled posting. I have another domain maybe I will put wordpress on it, to get a better idea of what it is doing.

                  Phone good for forum, bad for tvExplorer research.
                    • 27179
                    • 10 Posts
                    Well, I randomly picked a option from what everyone suggested..

                    I have installed tveditor, tvExplorer...I little buggy keeps giving me the below every time I change the TV list.

                    Warning: htmlspecialchars() expects parameter 1 to be string, array given in /var/www/clients/client1/web1/web/assets/snippets/ditto/classes/ditto.class.inc.php on line 1030
                    
                    Warning: htmlspecialchars() expects parameter 1 to be string, array given in /var/www/clients/client1/web1/web/assets/snippets/ditto/classes/ditto.class.inc.php on line 1030
                    
                    Warning: htmlspecialchars() expects parameter 1 to be string, array given in /var/www/clients/client1/web1/web/assets/snippets/ditto/classes/ditto.class.inc.php on line 1030


                    I definitely see how this could be very powerful, and yet easy to use from backend as well. However I don’t really know how to build a form for the front end to use, I am sure I can find plenty of "templates" but not sure how to have it in drop-down, calling the TV’s for the "search." I guess it would have something along the lines of "onclick return results?" I have seen how the "options" on drop-downs are don’t with the code, like the default options on modxhost contact us form.

                    Doing some research on building forms now, and reading the entire tvEditor topic here as well.

                    While I do this, gonna have wife do three reviews something along the lines of 3 books, in whatever genre’s, with 2 reviewers, and whatever authors. to kinda work on the whole front-end form. So maybe tomorrow night after work, I can have something to start work on.
                      • 3707
                      • 241 Posts
                      Did you do this bit when installing tvEditor? That looks like the cause of your error message.
                      To execute ditto in the backend you need to change one line in ditto.class.inc.php .
                      This will not affect ditto in any manner
                      In the buildURL() function
                      Change:
                      $url = $modx->makeURL(trim($cID), ’’, $queryString);
                      to:
                      //$url = $modx->makeURL(trim($cID), ’’, $queryString);
                      $url = (isset($modx->documentObject[’id’])) ? $modx->makeURL(trim($cID), ’’, $queryString) : ’index.php?id=’.$GLOBALS[’modID’].$queryString;
                      How do you want your search to work when filtering results? Do you want your 4 drop-downs to work independently like they do on the bittenbybooks.com site so each one is effectively a separate form. Or do you want to combine options, for example selecting an author AND a genre to return a narrower results set?