We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42511
    • 60 Posts
    Hi,
    I don't think this comes under frequently asked questions so I'm asking here. Our local fishing club wants to build a club website and on the basis that I have a website and work in IT I have been landed with the job of doing it. As often seem to be the case with the fish that have been caught, the requirements just seem to get bigger and bigger smiley
    I've got rusty knowledge of HTML and JavaScript and used Php, MySQL, SQL, Jva, Perl etc at university - some time ago. I was recommended to try using MODx so I've finally managed to install Revolution 2.2.6 with Xampp on a windows laptop and with the help of the excellent support staff at www.Nethosted.co.uk managed to get it installed into a folder on some space that I've got with them.
    Started going through some beginners tutorials on Modx and reading some of the documentation.

    The fishing club would like the members to be able to enter details of;
    where and when they've caught fish and see their own catch records;
    record when they've read a club notice;
    post photographs etc.
    Club Officers would need to be able to;
    post notices;
    store minutes of meetings;
    send emails to members;
    register new members;
    View summary and specific catch record/member information.

    So not overly complicated(I hope).
    Apologies this a rather long-winded post but here are the numpty questions.

    1. I think I need 2 or 3 user groups who are going to be able to accees different features in different ways?
    2. I think that means I need 2 or 3 different categories for resources/templates?(Do you create categories first or User Groups?)
    3. Is it better to have a separete database for the 'extra' tables that are needed(catch returns, member details etc) or should I just add tables to the database MODx created
    4. I'll be able to use 'eform2db' to update database tables?
    5. Where one of the club officials wants to upload a document/create a new page and add it to a menu do they need to access the 'manager' screen or is there a way to automate it all?
    6. If I wanted to create another MODX site for another domain would I need to plan that first or is it something that could be done after the first site had been built?

    I know that some of this information is already out there somewhere, but I look and sometimes the links don't work and sometimes I'm not sure if the information given applies to 'Evolution' or 'Revolution' or both.
    Thanks,
    Allan
      • 16278
      • 928 Posts
      3. Is it better to have a separate database for the 'extra' tables that are needed(catch returns, member details etc) or should I just add tables to the database MODx created
      4. I'll be able to use 'eform2db' to update database tables?

      You won't need an extra database, you can add custom tables to the MODX ones. And eform2db is for Evo (the only version of MODX that I know well). I'm sure a Revo expert will be along shortly to advise.

      ;-) KP
        • 42511
        • 60 Posts
        Thanks KP,
        Thought I'd found the very thing to update/display database fields there :-(
        regards
        Allan
          • 40045
          • 534 Posts
          First of all, don't want to disappoint you but some of the stuff you plan here seems not that uncomplicated to me =)

          Quote from: allan1 at Jan 27, 2013, 10:50 AM

          The fishing club would like the members to be able to enter details of;
          1. where and when they've caught fish and see their own catch records;
          2. record when they've read a club notice;
          3. post photographs etc.

          Club Officers would need to be able to;
          4. post notices;
          5. store minutes of meetings;
          6. send emails to members;
          7. register new members;
          8. View summary and specific catch record/member information.

          1. I would probably go with a MIGX grid for that, so every user had it's own resource in the manager and there you somehow manage this information
          2. You mean like a history with exact date when they clicked the "read" link (or something like that)? Actually don't have a quick solution or idea for this one, maybe over the modx internal message system? anyone?
          3. I guess the photographs would be related to the catches right? so maybe it would be the easies to just add an inner MIGX grid (for images and descriptions, gallery like) to the catch MIGX grid, so users could add unlimited pictures to every catch (you can make it easier if you limit the amount of images allowed to 3 or so and then just add 3 image fields to the MIGX grid

          4. This would somehow require a central notices management (maybe a custom migxdb setup?) ie. post a notice, viewable for all members and then have a row for each member where you can save read-date or so.
          5. You mean something like an event calender/manager? Check out Charles mxCalendar extra
          6. Probably also something to integrate into the notice addon, instead of notice you could just have a type "email" or so, then the notice gets sent as an email.
          7. Then the "officers" need the permission to create new users, could also be done through the frontend via Login extra
          8. Would gather the information needed out of the specific user resources, should this be available in backend or frontend?


          Quote from: allan1 at Jan 27, 2013, 10:50 AM

          1. I think I need 2 or 3 user groups who are going to be able to accees different features in different ways?
          2. I think that means I need 2 or 3 different categories for resources/templates?(Do you create categories first or User Groups?)
          3. Is it better to have a separete database for the 'extra' tables that are needed(catch returns, member details etc) or should I just add tables to the database MODx created
          4. I'll be able to use 'eform2db' to update database tables?
          5. Where one of the club officials wants to upload a document/create a new page and add it to a menu do they need to access the 'manager' screen or is there a way to automate it all?
          6. If I wanted to create another MODX site for another domain would I need to plan that first or is it something that could be done after the first site had been built?

          1. At least, depending on how you solve it =)...I see Administrator, Offiercs, Members. The members usergroup has then assigned all members (only a few permissions).
          2. I think what you mean are resource groups (categories are more for internal organization of snippets, chunks etc.). Here you could create a separate resource group for each member (which somehow sucks in my eyes) or just a "member" one and then add all Member resources to that group. This would probably force you to have another authentification mechanism like a TV with username stored (for each member resource) so you can grant access to a single resource instead of all member resources (because permissions in MODx Revo are not user based, they are resource based) by checking if the logged in user has permission to access the resource (part of member resource group) AND if the userTV matches his username...
          3. You can definitely add tables to the modx database
          4. Like already posted before, eForm is only for Evolution. in Revolution there is FormIt that has custom hooks to do stuff like that (search for formit2db from bruno17) But the problem I see there is that you want to UPDATE database tables (that's what the manager is usually there for) and not CREATE db entries. I'm not sure if this is possible with formit2db. I think it just does ADD a new db entry for each form submission, and not update existing ones, that would require some custom coding too
          5. Automate it seems difficult =), the self managing/creating website is not yet invented. Probably it's the easiest if the officers learn the manager interface, it's not so hard to understand and you can minimize clutter with form customization (ie. hiding all unnecessary fields). If you want to do it from frontend, I would suggest you have a look at the NewsPublisher extra from Bob Ray
          6. This can easily be done later, so no need to plan this ahead. If you want a new one you just add a new context for that second site and set the context settings accordingly.
            • 3749
            • 24,544 Posts
            Subscribe will let the users Register themselves and record their email addresses, etc.: http://bobsguides.com/subscribe-tutorial.html

            Notify will let the Managers send emails to the users based on their user group membership and/or expresses preferences: http://bobsguides.com/notify-snippet-tutorial.html

            If there are not many members and/or not many fish caught, you could have a Resource for each fish and put the info in Template Variables, but it's not really a good solution at all and would make for very slow page loads after a fair number of fish have been caught.

            You could add a custom table for catches with fields for info on the fish, the date, and the ID of the user who caught the fish.

            FormIt2DB (or a custom FormIt postHook) should be able to present a form and write to that table for you but the users would have to fill out the form for each fish caught.

            A more complex solution would be to have two tables:

            trips - trip ID, date, user ID, trip details, and number of fish caught -- each row is one fishing trip (or day).
            fish - catchId, tripId, userId, data on the fish -- each row is one fish


            That would allow the user's to fill out a single form to record the results of a fishing trip (or day), but processing the form would be more complicated.

            I think RowBoat would do the searching and displaying for you, but custom snippets would be somewhat faster. With xPDO, you could get information like this:


            $trips = $user->getMany('Trips'); // get all trips by that user (optionally selected by date range or whatever else you have)
            
            foreach ($trips as $trip) {
                $fishes = $trip->getMany('Fish'); // get array of fish records for each trip (optionally selected by fish size, date range, species, weight, etc.)
            
                foreach $fishes as $fish {
            
                   /* display info on the fish here */
            
                }
            }


            As exside said, "not uncomplicated."

            A great example of how simple clients think things are compared to how difficult they really are. wink






              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
              • 42511
              • 60 Posts
              Hi,
              Apologies for the delayed response but I have to go to work through the day :-(
              exside, thanks very much for the comprehensive reply and helpful suggestions. I did read Bob's guide on security permissions after I'd posted and sort of realised that my comment on difficulty was rather more ironic than I'd thought smiley
              For point 2 of the requirements I was thinking more in terms of the user clicking a button that would trigger an update to a table form_id/user_id which maybe fits in with your suggestion for requirement 4.
              Point 2 of what I thought might fit into a solution, you are perfectly correct I did mean resource groups and kind of suspected I might have to check user id to allow access to only the user's data.
              I think I already knew the answer to the automation question before I asked I was just hoping that no-one would need to have to learn or do too much. (I'm pretty sure that they'd like it to be self-managing and just produce what they want when required ;-))
              Bob,
              Many thanks for your helpful suggestions for subscribing, emailing and database design and access you've saved me a lot of time searching. I hadn't considered having a separate database for fish, I'd just thought of your catches table then being able to run queries on that table.
              catches_id,user_id,date,fish_species,weight,catch_location,fishing_method,am_pm,fish_returned_flag
              I think a lot of users use Excel and don't think there's anything to do with computers that's a whole lot more complicated than that smiley
              No doubt I'll have to ask more questions once we get to the stage of implementing that feature.
              I have intimated to the fishing club that I thought the best way to progress would probably be to develop this in stages so that some of the features would get added at a later stage - wonder how long that self-creating/self-managing site will be ;-)
              You've given me a lot to think about which will help with the requirements and design
              Thanks very much once again to both of you for the advice and suggestions,
              Allan
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I think that the mxFormBuilder project now in beta will be very useful for things like this. http://rtfm.modx.com/display/ADDON/mxFormBuilder
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 42511
                  • 60 Posts
                  Hi Susan,
                  That does look useful.
                  Many Thanks,
                  Allan