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

    I'm creating news site. Some author want to write own post, some author want to send an email to me.

    I want to change resource author but there is no option for this.

    any solution for this?

    Thanks
      • 30585
      • 833 Posts
      Batcher might be the most convenient option as it allows to do all sorts of things including changing resource authors, publication dates, etc.
        A MODx Fanatic
        • 42640
        • 7 Posts
        Thanks. is this possible with TV ? Batcher not user friendly for my team
          • 3749
          • 24,544 Posts
          You could edit the post with NewsPublisher in the front end, but you'd have to enter the author's ID rather than a username.

          In the Manager, it might be possible to create a TV with a drop-down list of authors to select from, then update the post's 'createdby' field in a plugin attached to OnDocFormSave based on the selection, but it would take some work and some PHP coding to implement.
            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
            • 42640
            • 7 Posts
            Quote from: BobRay at Sep 27, 2016, 09:01 PM
            You could edit the post with NewsPublisher in the front end, but you'd have to enter the author's ID rather than a username.

            In the Manager, it might be possible to create a TV with a drop-down list of authors to select from, then update the post's 'createdby' field in a plugin attached to OnDocFormSave based on the selection, but it would take some work and some PHP coding to implement.

            i added this code to modx.panel.resource.js.(after resource_longtitle, line 503). its working, saving author data. but only work with ID
            { 
                   xtype: 'textfield'
                   ,fieldLabel: _('resource_createdby')
                   ,name: 'createdby'
                   ,id: 'modx-resource-createdby'
                   ,anchor: '100%'
                   ,editable: true
                   ,typeAhead: true
                   ,typeAheadDelay: 300
                   ,forceSelection: true
                   ,value: config.record.createdby || ''
                  }


            this is listing username in listbox. but not saving data
            { 
                  xtype: 'modx-combo-user'
                  ,fieldLabel: _('resource_createdby')
                  ,name: 'createdby'
                  ,id: 'modx-resource-createdby'
                  ,anchor: '100%'
                  ,editable: true
                  ,typeAhead: true
                  ,typeAheadDelay: 300
                  ,forceSelection: true
                  ,value: config.record.createdby || ''
            }