We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8872
    • 41 Posts
    Maybe simple question, not sure how to change user/owner/author of a document? Also how to add profile fields, so user can have photo associated with it?

    Reason I’m asking is that I want to create a list of articles where each one would have author’s photo and short bio under the text. Some articles written by admin (me) need to have the owner changed.
      • 3749
      • 24,544 Posts
      If there will be a lot of them, it might be worth creating a plugin that would add the createdby field to the Create/Edit Resource panel, but that would not be a trivial job.

      I would probably just use PhpMyAdmin and put the ID of the author in the createdby field of each resource.

      Depending on the version of MODX, there may also be a DB editing tool that would let you do that in the Manager.

        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
        • 12410
        • 353 Posts
        Hi,
        Log in as the relevant user and duplicate the resource (right click on resource) then delete the original.
        It had me baffled for a while. Would be cool to have a change author dropdown somewhere to make it easier.
        Hope this helps
          • 8872
          • 41 Posts
          Thank you both, that’s good suggestion. But I’m really surprised that cms like modx doesn’t have that option built-in. Also still need to know how to add a photo and/or additional fields to user profile?
            • 3749
            • 24,544 Posts
            Quote from: howster at May 08, 2011, 02:25 PM

            Hi,
            Log in as the relevant user and duplicate the resource (right click on resource) then delete the original.
            It had me baffled for a while. Would be cool to have a change author dropdown somewhere to make it easier.
            Hope this helps

            That will change the ID of the resource, so any hard-coded references to that ID (e.g. Wayfinder or getResources include or exclude properties) will be wrong.

            You could change the createdby field with NewsPublisher if you know the users’ IDs. You’d just have to put the Edit button in the template, navigate to each page, click on Edit and save it with the new createdby ID. That would preserve the Resource ID and I think it would be faster than duplicating them.
              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
              • 36536
              • 8 Posts
              I think this should be an easy thing to do... It should be I. A Resources' Page Settings tab. A "Created By" field.

              Does MODX has a feature request section?

              Also more fields like "URL" or "Photo URL" would be nice. Custom fields here would be good... Or even generic custom fields like "Custom1", "Custom2", "Custom3"

              A good thing though is... the current user fields doesn't type check so for "phone" for example you can put in a URL and call it with [[*createdby:userinfo='phone']] (backticks)
                • 33976 ☆ A M B ☆
                • 571 Posts
                Just for info, if you are using MODX Revolution, Batcher allows you to change resources authors (and some more things).

                For the profiles, still dealing about Revo, you can create your own extended fields. Combined with login/profile snippets for the front-end and you should be good to go as you want smiley
                  • 36536
                  • 8 Posts
                  Sweet all 3 links seems golden, thanks romain
                    • 3749
                    • 24,544 Posts
                    Also, custom fields for resources are called Template Variables and they are easy to add.
                      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