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

    Over the last couple of years i have been built up quite a large website http://www.ukfishersonline.com, which is now starting to get a bit difficult to maintain.

    Recently i have converted some parts of the site to PHP/MYSQL to use includes to make it easier to update some parts of the website.

    My question is, is it possible to convert my whole website as it is including its design into CMS? a lot of the website is based around articles, so the abilty to add, edit, delete articles using a backend system would be great

    at the moment i think i have around 150+ pages

    Thanks in advance
      • 18112
      • 8 Posts
      Anyone?
        • 15469
        • 64 Posts
        Katzenfutter Reply #3, 17 years ago
        There might be a solution by preventing sort of a "converting" solution by pushing each existing file into a predefined template in modx.
        I am actually dealing with such a thing, but only for creating documents automatically when uploading images and pressing "ok".
        This might also be possible by uploading "sites" (php-files, html... or whatever text format).
        Thing is:
        You have to parse every site for usable content and extract it. That might be the most difficult part of getting content into modx.

        THIS is possible. But not without some programming knowledge I think. The basic features of modx don´t allow such a functionality by themselves.

        Cheers.
          $cd /pub
          $more beer
          • 36624
          • 535 Posts
          hello,

          i think with less than 200 pages you can make a coffee and go by hand... wink

          a nice features for speed is the "add a new document on save".

          if you had 1500+ pages i would consider some alternatives..
            CTRL+SHIFT+U - Clear Cache
            CTRL+SHIFT+H - Hiding Heft Panel
            CTRL+SHIFT+N - Fast Create Resource
            CTRL+ALT+P - Preview Recource (in edit resorce window)
            CTRL+ALT+S - Save
            • 32699 ☆ A M B ☆
            • 427 Posts
            The simple answer would be to use the ModX import function.

            Your issue lies in the fact that the navigation and page constructs are included in each of the pages, which defeats the entire point of utilizing a CMS / CMF.

            Sadly, you will need to pull one of your pages out
            Save the page as someothername.html
            Edit out everything that is not the physical layout of the page.

            And in essence create the template for modx to use (in resources in the manger)

            You can then next go through the arduous process of going page to page and slowly importing the content into modx (once you know everything is working)

            You can look at the default templates to find the template placeholders to add to your template.

            Add a page and then make sure it is working.

            The wayfinder snippet will serve as your navigation creator.

            My suggestion is that you create a subdomain and work yourself through this process, while leaving the main site up.

            Once everything is working in the subdomain move the modx directory tree to the main domain removing and replacing the current site.

            150 pages is not that big, and can probably be done in about an hour or so, once you have the first page working correctly.


            BACKUP THE SITE FIRST.
              Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

              Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
              • 16356
              • 17 Posts
              What I would do in this instance, if the files have the same exact navigation/design code in each, you might be able to run a mass file text replace in some editors. I believe Dreamweaver should be able to do this and there are probably others that can also look through text files and do a replace on them. Just doing a quick search, I found an article on lifehacker with a simple tool to do the replacing: http://lifehacker.com/5076932/multiple-find-and-replace-updates-text . I would make a backup just in case it broke some of the code.

              Kritoke
                Kritoke
                • 22840
                • 1,572 Posts
                150 pages is not that big, and can probably be done in about an hour or so, once you have the first page working correctly.

                That’s about 1 page every 20 seconds and although I do agree it’s quick to create a page in modx I think your being a bit optimistic on this.

                I think you should install Modx on a sub domain and start building in your templates, once you have the template up and running then start asking questions here about how to do things with Ditto so that you can create pages under cats and have the correct display etc......

                If you have a full time job and do this in your spare time I would say it will take a couple of months to port it over thinking on you working on it a few times a week in the evening as well as supporting the the live site.

                It will be a lot simpler to Manage in Modx however the Forums will be better as a stand alone outside of Modx and the shop will take a lot more work to port over but it is possible.
                  • 3749
                  • 24,544 Posts
                  It really depends on the nature of the pages. If they contain any PHP code at all, that code needs to be moved to MODx snippets -- otherwise, the code will no longer execute in MODx.

                  In addition, you’ll want to pull out any HTML code and content that’s duplicated across pages and put it in either a MODx template or in one or more chunks.

                  It’s theoretically possible to do some of this with an editor that allows multi-file regular expression search and replace, but it might be faster to do it by hand than to figure out how to make that work.

                  You could also write PHP code (or Perl or something else) to transform the pages and remove the stuff that’s going in snippets, templates, or chunks, but -- again -- it might be faster to do it by hand, depending on your coding skills.

                  You might find some useful information here: http://bobsguides.com/porting-your-site-to-modx.html

                  I’ve been there (though not with that many pages) and I generally use cut-and-paste. I can tell you that you’ll be very happy when you’re done -- it’s well worth the effort. smiley

                    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
                    • 18112
                    • 8 Posts
                    Thanks everyone for your comments, i am just about to install modx locally on my computer.

                    Are there any settings i should change or do i leave everything as default?


                    It will be a lot simpler to Manage in Modx however the Forums will be better as a stand alone outside of Modx and the shop will take a lot more work to port over but it is possible.


                    The forum is PHPBB3 thats going to stay as it is and the shop is run using software provided by ekmpowershop.
                      • 18112
                      • 8 Posts
                      I have just installed the latest version of MODx locally, (including the demo site).

                      Also managed to use .htaccess to create friendly URL’s