We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3109 ☆ A M B ☆
    • 894 Posts
    The easiest one to use is FrontPage although I'm not sure if it's compatible with Revo2.2 and I dont recommend it for a site with multiple contexts.

    NewsPublisher is the most customizable and works with multi-context sites but I had issues with it having more than 1 RTE field, not sure if this has been fixed.
      Benjamin Marte
      Interactive Media Developer
      Follow Me on Twitter | Visit my site | Learn MODX
      • 32316
      • 387 Posts
      How much, or how is FrontPage simpler?

      NewsPublisher is pretty easy to set up. At the risk of being repetitive...
      If all you require is being able to edit pages with no tags in the content section it takes:

      1 - Download + Install (identical to any extra and easy with Pkg Management, usually)
      2 - create one resource with one tag
      3 - add one tag to your template
      4 - there is no step 4
      [ed. note: whistlemaker last edited this post 14 years, 8 months ago.]
        • 3749
        • 24,544 Posts
        Ben, I tried everything I could think of to fix the multiple RTE problem. I think it's inside the latest version of TinyMCE or the MODX core, but I sure can't find it. The problem just showed up one day with no changes to NewsPublisher.

        So, yes, it's still a problem if you need more than one RTE in the front end. In fact it's holding up the release of the next version. Hopefully, someone who's better at TinyMCE than I am will help out.

        One user reported fixing it himself, but I can't find the post or the user to ask him exactly how he did it.


        ---------------------------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
        MODx info for everyone: http://bobsguides.com/MODx.html
          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
          • 3109 ☆ A M B ☆
          • 894 Posts
          @whistlemaker FrontPage is simpler in terms of getting it working just create a login page to get it working, NewsPublisher requires you to add a custom setting in the policy template that can be a bit confusing if you never have messed with it.

          Newspublisher is more powerful and customizable though so it really depends on what you want to accomplish.

          Good luck.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 9439
            • 90 Posts
            The tutorial mentions NewsPublisher 1.3.0 but the latest package download is 1.2.1. Is there a v1.3.0 available?
              David Heriot
              pfsmedia
              • 3749
              • 24,544 Posts
              Almost. It should be out in the next few days -- with *many* new features.


              ---------------------------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
              MODX info for everyone: http://bobsguides.com/modx.html
                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
                • 9439
                • 90 Posts
                Thanks BobRay.

                I've set up modx (v2.1.3) to have 2 resource groups, A & B managed by 2 different users U1 & U2, ie U1 is allowed to edit resources in group A but not the other, and vice versa. What I thought would happen is that when U1 logged in to try to edit a resource in group B, ie not their allocated group, the newspub edit button wouldn't appear. But it does. The system does throw an error when the edit button is pressed, so the resource is protected, but it seems unsatisfactory to me. I'd rather that the edit button just didn't appear.

                So my question is, is this correct newspub behaviour, or are my settings incorrect? If the latter, any steer on how I could make the edit button not appear when an unauthorised user tries to edit a resource?

                thanks
                  David Heriot
                  pfsmedia
                  • 3749
                  • 24,544 Posts
                  It's a bug in that version of NewsPublisher (and I think my code above is incorrect as well).

                  NewsPublisher is checking whether the user has 'edit_document' permission in the Context Access ACL entry, but it's not checking for the 'edit' permission on the particular resource (determined by the Resource Group Access ACL entry).

                  Here's the code from the new (soon-to-be-released) version:

                  Change this line:

                  /* check permissions on current page */
                  if (!$modx->hasPermission('edit_document')) {
                      $defaultButtonCaption = $modx->lexicon('np_no_edit_document_permission');
                  }


                  to this:

                  if (! ($modx->hasPermission('edit_document') && $modx->resource->checkPolicy('edit') ) ) {
                      if (! $modx->hasPermission('edit_document') ){
                          $defaultButtonCaption = $modx->lexicon('np_no_edit_document_permission');
                      } else {
                          $defaultButtonCaption = $modx->lexicon('np_no_edit_this_document_permission');
                      }
                  }


                  It should do what you expect if the ACL entries are set right, though you'll see the untranslated language string key for the second message in debug mode unless you create a new Lexicon entry in the NewsPublisher namespace for 'np_no_edit_this_document_permission'.



                  ---------------------------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                  MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 14 years, 7 months ago.]
                    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
                    • 9439
                    • 90 Posts
                    Thanks BobRay. I got an error but I'm going to park that for now (it's not a huge deal for the moment) because I think I'm going around in circles trying to mix tight permissions with newspub access to resources in resource groups.

                    I want User 1 to only be able to edit resources through newspub in resource group A. I want User 2 to only be able to edit resources through newspub in resource group B. The only way I can achieve that is to set the resource group web context for users 1 & 2. However if I do that, neither user can log in through login because the page doesn't appear unless they're logged in because the web context is set. See what I mean about circles?

                    If I remove the web context from the resource group and only set the mgr context then either user group can log in to either resource and edit the page through newspub. It doesn't make sense. If a resource group is allocated to one user group, why is a different user group, that does not have that resource group allocated, able to edit resources in it through newspub?

                    One last thing, which is why I think my permissions are set correctly but I'm perhaps expecting too much from newspub, if I log in through the manager, each user can't see the other's resources in the tree, so that seems correct.

                    Even explaining this stuff is tough!

                    Hope you can help.
                      David Heriot
                      pfsmedia
                      • 9439
                      • 90 Posts
                      Hmmm, realise now in the cold light of day that that's not a great plan. How would normal visitors see the page if the resource group web context was set? It was very late....

                      So can I go back to my original request of hiding the newspub button if the user logging in doesn't have resource group mgr permission for the resource? I tried your code again but keep getting a blank page server error. Not much info, just internal server error. The persists until I change the code back again.

                      Each user is in a user group with context web set and resource grp context mgr set for their respective resource groups.

                      thanks
                        David Heriot
                        pfsmedia