We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16278
    • 928 Posts
    Re [+newsBody+], this is a placeholder that is needed to reload your existing content in the RTE box when you redisplay the input form following a validation error. See pubKit.inc.php around line 93:
    	if (!empty($message)) {
    		$modx->setPlaceholder('newsBody', $fields[$rtcontent]);
    
    I hit on this method when I was originally experimenting with News Publisher. If you don’t have the placeholder, you lose your existing content on redisplaying the form.

    Re getting the right addresses for the action attributes of forms, I suggest you use whatever suits you best in relation to the URL structures you need/prefer to use on your site, and whatever gives rise to least errors in distinguishing between pages by names or numbers. For troubleshooting purposes, it is simpler to ensure you know the ID of the correct page for the action and let MODx generate the link, action="[~37~]". Also ensure you have <base href="[(site_url)]" /> in your HEAD section.

    Personally, I find it easier to keep tabs on things by name, especially if I work on a local copy of the site on my PC and copy updates to the server, or copy the setup from an old site to a new one, where the resource IDs will be different. Using names is simplest if you don’t use the "Friendly URL paths", but often you need to use them, of course, so you have to get it right in the URL for the action attribute. BTW action="" is legit for referring to the current page, though I believe a couple of older browsers don’t cope well with that (or maybe that concerns missing the attribute altogether, which should also default to the current page).

    If the RTE isn’t showing up on your form, first thing is to check the TV is available to the relevant template. Make a test page based on the template, enter [*pkRichContent*] as its content, and see if it works.

    smiley KP
      • 3722
      • 171 Posts
      KP, It works!!! Thanks.

      1) I had
      <base href="[(site_url)]" />
      set up fine

      2) Regarding
      action="[~37~]".
      , I was noticing that in the browser window the "/admin" path was missing. Once I changed it to the resource id, it went right to the page and not the Home page. BTW My Home page was set as the "error page" in the config settings. (I have since created a 404 page).

      3) Investigating the
      [*pkRichContent*]
      TV settings I found that the access was set to another page...

      Thanks again for the help.
      BG66
        • 3722
        • 171 Posts
        Is the demo site "pubkit.pogwatch.com" open for admin rights?
        Can we log in to check out the details?

        I am working on customizing the forms and display for news items.
        I am trying to simplify the inputs, but ran into problems when removing the "Headline" input.

        Thanks
        BG66
          • 16278
          • 928 Posts
          I’ve created a read-only login to Pog Academy for @BobbyG66 and @idoremus (who requested this a while back). The place could probably do with a bit of a tidy before publishing an open login - I’ve used the site to experiment with structures and so on, and a lot of the content was generated with pkBlog rather than PubKit. More to come before winter sets in, I hope!
          wink KP
            • 12664
            • 11 Posts
            Thanks for your work regarding PubKit. It’s the solution I was looking for.
            I installed it in Evolution 1.0.3 and it works fine.
            Now I’m converting my site to Revolution. Will it also work there?

            Thanks,
            Claire
              • 16278
              • 928 Posts
              I have hardly looked at Revolution as yet. I have my doubts, as there are quite a few API calls involved.
              sad KP
                • 18367
                • 834 Posts
                There doesn’t seem to be any installation instructions.

                Where does it go?

                In assets or manager?

                Plugins, modules or snipperts?

                etc.

                Is it self installing or do I have to drag and drop everything into the right place?

                Is the install folder an actual install app or just a container file?

                Does the CSS just go in templates or does it need its own named folder? Will I then have to rewrite file paths? etc etc.

                Thanks



                  Content Creator and Copywriter
                  • 16278
                  • 928 Posts
                  There’s some detail about what goes where on the Pogwatch site, but lack of time to do a full set of documentation is one reason I’ve not offered the package for the repository as yet. You might find the documentation for the pkBlog package, PubKit’s little brother, gives you some clues. It’s attached here for convenience.

                  The assets folder is to be merged with your existing one. The main blocks of PHP code are included by the actiual MODx snippet that you’ll find in install/snippets I usually keep the main site CSS files in the top of the templates folder, so that’s where my forms.css lives.

                  The install folder just contains text files for you to copy and paste into chunks, snippets etc. to generate some examples of using the snippet. I had a look at the Evo 1.0.4 installer package recently, and hope I’ll be able to make a one-click self-installing package one fine day along the same lines.

                  smiley KP
                    • 18367
                    • 834 Posts
                    Thanks KP.

                    Is it better to use Pubkt or the Ditto method?

                    smiley
                      Content Creator and Copywriter
                      • 16278
                      • 928 Posts
                      It’s not an either/or choice: PubKit is for creating (and updating and deleting) resources from the front end. Ditto is for pulling together selected elements from sets of resources, however they may have been created. The main idea behind PubKit is to make it easy for the end-user to create and manage the resources, using web forms that focus on the information and tasks they need to deal with. So PubKit and Ditto work together to produce the desired result.
                      smiley KP