We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5463
    • 33 Posts
    Hi,

    I’ve just developed a site for a client using MODx. It’s going live soon and they have just sprung a little treat on me - they need a jobs notice board! They way it needs to work is:


    • Any member of the public can go to a form on the site and submit the job description.
    • The form arrives to an admin person who can edit it if its not right then, hopefully with a click of a button, upload the job description to its own page on the site.
    • There will also be a index page for the job descriptions that pull out the Job title or something like that.


    Any ideas about the best way to go about this? I was thinking Jot and ditto - but don’t really know how this would work. Any help would be most welcome!

    Thanks,
    Cliff.
      • 14050
      • 788 Posts
      Basically what you are trying to accomplish is similar to a "blog" in MODx. You could use Newsmanger/Newspublisher to allow a user on the front end to post a job and its respective description. Then use ditto to pull whatever information you want from those documents (jobs and their descriptions) to display all the jobs listed.

      The only problem with this method is that I think Newspublisher requires the user to be registered and have the rights to publish job descriptions, and once they have the rights, it doesn’t require moderation like you are asking about.
        Jesse R.
        Consider trying something new and extraordinary.
        Illinois Wine

        Have you considered donating to MODx lately?
        Donate now. Every contribution helps.
        • 34017
        • 898 Posts
        I have modified ppp to allow this. What I’ve done:

        - Create the form via eForm
        - Create a new function in ppp called anonUpdate
        + I just editted updatetable so it just creates a new row for each submission
        + I also had to modify a few more items to make the sql work
        + editted the dbase to create an auto-index as the primary key (instead of the webuser id - since it’ll be anonymous)
        - Update the list function to show by auto-index instead of webuser
        - I have also editted HyperSearch (should’ve started with ajaxsearch) for a custom search for the fields

        If you would like some help with it, send me a PM.

        Chuck
          Chuck the Trukk
          ProWebscape.com :: Nashville-WebDesign.com
          - - - - - - - -
          What are TV's? Here's some info below.
          http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
          http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
          • 5463
          • 33 Posts
          Hey, thanks for the replys! Thankfully they have opted for a slightly easier option that uses eform to submit the job description, then an admin will edit if necessery and cut and paste the job into a page which will use ditto to call in the relevant info to a index type page.

          Just one question on this if you don’t mind - I’m getting ditto to work - but cant seem to sort the listing by closing date of the job. I’ve added a template variable for the closing date. Any ideas?

          Thanks.
            • 14050
            • 788 Posts
            What is the name of the TV that holds the closing date and what is yoru ditto call?
              Jesse R.
              Consider trying something new and extraordinary.
              Illinois Wine

              Have you considered donating to MODx lately?
              Donate now. Every contribution helps.
              • 5463
              • 33 Posts
              Hi Jester, Sorry for taking ages to get back to you - other more urgent site stuff came up and I had to deal with that first!

              The Ditto call is: [!Ditto? &startID=`69` &tpl=`Ditto_Template` &tv=`ditto_tv` &summarize=`all`!]

              The function to sort by date is not in it because I didn’t get it to work.

              The TV name of closing date is closingdate

              The input type of the TV is set to Text at the moment because I was having trouble with the input type date. It always required a time as well and didn’t work anyway.

              Thanks,
              Cliff.
                • 14050
                • 788 Posts
                First off, if you are not using Ditto 1.1b2, try using that as there were some known problems with sorting by TVs in earlier versions. You can find that here:

                http://modxcms.com/forums/index.php/topic,8988.0.html

                Second, make sure that the tv "closingdate" is set to an input type of "Date" and a widget type of "Unixtime."

                Then you need to make sure you have in your ditto call "&sortBy=`tvclosingdate`

                That should do it for you.
                  Jesse R.
                  Consider trying something new and extraordinary.
                  Illinois Wine

                  Have you considered donating to MODx lately?
                  Donate now. Every contribution helps.
                  • 5463
                  • 33 Posts
                  Sweet - I’ll check that out in the morning. It’s going home time now! grin

                  Thanks.
                    • 5463
                    • 33 Posts
                    I upgraded to Ditto version 1.1b2 and the jobs are sorted just the way I want them.

                    The only thing which is not working fine yet, is the way the date is being displayed.

                    When I set the TV’s widget type to "Unixtime", numbers are given out instead of the date. Is there a way of changing this?
                      • 14050
                      • 788 Posts
                      I would just write a little snippet that took the [*closingdate*] TV and ran it through PHP’s date function.

                      The details of that function can be found here:

                      http://us3.php.net/date

                      The snippet call would look something like this:

                      [[closingdate?closingdate=`[*closingdate*]`]]

                      And the snippet code for the snippet called "closingdate" would be:
                      <?php
                      return date("F dS, Y", $closingdate);
                      ?>


                      You can change the "F ds, Y" to whatever you want by reference the link I posted previously.
                        Jesse R.
                        Consider trying something new and extraordinary.
                        Illinois Wine

                        Have you considered donating to MODx lately?
                        Donate now. Every contribution helps.