We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • discuss.answer
    • 18809
    • 109 Posts
    Quote from: paulp at Feb 18, 2016, 10:47 AM
    Creating a RSS feed with getResources

    https://rtfm.modx.com/extras/revo/getresources/getresources.examples/getresources.building-a-rss-feed
    Thanks.
    One more question,
    I want to import my wp posts to modx and Articles extra do the trick. Now I want to move articles to collection/ other container. How to do this ? I tried quill extra and its wonderful. I want to move all my Articles to Quill. How to huh? smiley Thanks
      My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
      • 3749
      • 24,544 Posts
      Mayanktaker, you should probably start a new topic for the import question, since it's unrelated to this topic.

      On the automation -- when a document is published, MODX fires the OnDocPublished event. A plugin connected to that event will have access to the resource and could auto publish it anywhere. I'm fairly certain that that event fires when you publish an Article, so it's the natural way to do it.

      The difficult part would be providing a way for the user to manage which services were used and record the necessary user information (keys, secrets, tokens, etc.) for each service, and providing templates for the text to be sent to each service and letting the user manage them.

      After writing Notify, I can tell you that the truly horrible part is testing everything as you go. I'd expect that part alone to take many, many hours.
        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
      • discuss.answer
        • 30585
        • 833 Posts
        @Mayanktaker Thanks for trying Quill. I'm glad you liked it. Moving your articles from Articles to Collections is very easy. You just need PHPMyAdmin. This is a repeat of a solution I posted some time ago:

        Using phpMyAdmin, update the following columns using SQL queries (SQL tab):

        1). For the container resource:

        Change the class_key column : from 'Article' => 'CollectionContainer'
        UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'CollectionContainer') WHERE id=<your_blog_container_id>;
        


        2). For child resources (Blog posts:)

        Change the class_key column: from 'Article' => 'modDocument'
        UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=<your_blog_container_id>;


        3) OPTIONAL: Empty the properties column: (This is just to keep things clean)

        UPDATE `modx_site_content` SET properties='' WHERE parent=<your_blog_container_id>;
          A MODx Fanatic
          • 18809
          • 109 Posts
          Quote from: BobRay at Feb 18, 2016, 08:41 PM
          Mayanktaker, you should probably start a new topic for the import question, since it's unrelated to this topic.

          On the automation -- when a document is published, MODX fires the OnDocPublished event. A plugin connected to that event will have access to the resource and could auto publish it anywhere. I'm fairly certain that that event fires when you publish an Article, so it's the natural way to do it.

          The difficult part would be providing a way for the user to manage which services were used and record the necessary user information (keys, secrets, tokens, etc.) for each service, and providing templates for the text to be sent to each service and letting the user manage them.

          After writing Notify, I can tell you that the truly horrible part is testing everything as you go. I'd expect that part alone to take many, many hours.
          Yes sir I should have create a new topic. I will not repeat this mistake.
          And its too heavy for me to dig into this. I think twitterfeed is my tem solution.
          Thanks alot sir.
            My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
            • 18809
            • 109 Posts
            Quote from: treigh at Feb 18, 2016, 09:16 PM
            @Mayanktaker Thanks for trying Quill. I'm glad you liked it. Moving your articles from Articles to Collections is very easy. You just need PHPMyAdmin. This is a repeat of a solution I posted some time ago:

            Using phpMyAdmin, update the following columns using SQL queries (SQL tab):

            1). For the container resource:

            Change the class_key column : from 'Article' => 'CollectionContainer'
            UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'CollectionContainer') WHERE id=<your_blog_container_id>;
            


            2). For child resources (Blog posts:)

            Change the class_key column: from 'Article' => 'modDocument'
            UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=<your_blog_container_id>;


            3) OPTIONAL: Empty the properties column: (This is just to keep things clean)

            UPDATE `modx_site_content` SET properties='' WHERE parent=<your_blog_container_id>;
            </your_blog_container_id></your_blog_container_id></your_blog_container_id>
            I love Uqill sir. And I hope it will get more features in future like this auto post etc. And I am going to try this on my Easyphp first. Thank a lot sir for your help. If it works for me then its the end of wpress in my sites. Thank again.
              My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
              • 18809
              • 109 Posts
              Quote from: treigh at Feb 18, 2016, 09:16 PM
              @Mayanktaker Thanks for trying Quill. I'm glad you liked it. Moving your articles from Articles to Collections is very easy. You just need PHPMyAdmin. This is a repeat of a solution I posted some time ago:

              Using phpMyAdmin, update the following columns using SQL queries (SQL tab):

              1). For the container resource:

              Change the class_key column : from 'Article' => 'CollectionContainer'
              UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'CollectionContainer') WHERE id=<your_blog_container_id>;
              


              2). For child resources (Blog posts:)

              Change the class_key column: from 'Article' => 'modDocument'
              UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=<your_blog_container_id>;


              3) OPTIONAL: Empty the properties column: (This is just to keep things clean)

              UPDATE `modx_site_content` SET properties='' WHERE parent=<your_blog_container_id>;
              </your_blog_container_id></your_blog_container_id></your_blog_container_id>

              Hello, Im not getting it properly. Please help me with this.
              I did everything in phpmyadmin but it is as before, no changes.
              My Article's id is 195 and Quill's id is 2 and in Quill, Blog's id is 3.
              Please help
                My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
                • 30585
                • 833 Posts
                You have Two options:

                OPTION 1: Import your artiiiii (195) blog posts into Quill's Blog container (3)
                // Step 1 =>  Change the parent
                UPDATE `modx_site_content` SET `parent` = replace(parent,195, 3) WHERE id=195;
                // Step 2 => Change the class_key of the imported posts
                UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=3;
                // Step 3 => Clear Cache in the manager
                


                OPTION 2: Change your artiiiiii resource class_key from Article => CollectionContainer
                // Step 1: Change the parent's class_key
                UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'CollectionContainer') WHERE id=195;
                // Step 2: Change the posts (child resources) class_key
                UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=195;
                // Step 3 => Clear Cache in the manager
                


                I recommend the first option, because you won't need to update Sytsem Settings anymore.

                If you choose the second option, don't forget to update Quill's quill2.blog_container System Setting with the value of your artiiii9 resource, which should be 195. You'd also need to either place your artiiiii resource underneath Quill's folder (2) or move your Quill's resources to the top level of your site tree.
                [ed. note: treigh last edited this post 8 years, 2 months ago.]
                  A MODx Fanatic
                  • 30585
                  • 833 Posts
                  BTW, unless you like Quill's initial folder structure, you should move Quill's resources to the top level of the site tree and delete the global container (2) since it's only used to separate Quill's resources from any other resources you may have on initial setup.
                    A MODx Fanatic
                    • 18809
                    • 109 Posts
                    Quote from: treigh at Feb 20, 2016, 02:43 AM
                    BTW, unless you like Quill's initial folder structure, you should move Quill's resources to the top level of the site tree and delete the global container (2) since it's only used to separate Quill's resources from any other resources you may have on initial setup.
                    Thanks alot for the Tip. How to do this at once ? Or I have to do it one by one ?
                      My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
                      • 18809
                      • 109 Posts
                      Quote from: treigh at Feb 20, 2016, 02:35 AM
                      You have Two options:

                      OPTION 1: Import your artiiiii (195) blog posts into Quill's Blog container (3)
                      // Step 1 =>  Change the parent
                      UPDATE `modx_site_content` SET `parent` = replace(parent,195, 3) WHERE id=195;
                      // Step 2 => Change the class_key of the imported posts
                      UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=3;
                      // Step 3 => Clear Cache in the manager
                      


                      OPTION 2: Change your artiiiiii resource class_key from Article => CollectionContainer
                      // Step 1: Change the parent's class_key
                      UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'CollectionContainer') WHERE id=195;
                      // Step 2: Change the posts (child resources) class_key
                      UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=195;
                      // Step 3 => Clear Cache in the manager
                      


                      I recommend the first option, because you won't need to update Sytsem Settings anymore.

                      If you choose the second option, don't forget to update Quill's quill2.blog_container System Setting with the value of your artiiii9 resource, which should be 195. You'd also need to either place your artiiiii resource underneath Quill's folder (2) or move your Quill's resources to the top level of your site tree.
                      Thanks for the quick help .. but here im getting this -
                      0 rows affected. (Query took 0.0013 sec)

                      I tired both method but none of those working. I think I messed up. I am getting this error on OPTION 1
                        My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.