We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35858
    • 5 Posts
    Hey all, I had a quick search and couldn’t quite find what I needed; Sorry if it has been touched upon before!

    Basically, a friend-of-a-friend has a large site and they’re looking to ditch their IT guy and try to edit it themselves using a CMS. I have a bit of knowledge with sites so I offered to help (uh oh! haha)

    The website has alot of PHP that seems to auto select the page to view depending on whether the user has selected low graphics (turns off the stylesheet, right?) or in a different language (redirects to a spanish version of the site). It’s set so that index.php does the redirecting (either to engIndex.php or spanIndex.php)and has nothing but PHP code written on it. So I’m a little confused because I’m trying to figure out what the guy before me did although it seems like a pretty cool way of doing it.

    However, my problem comes with using the entire site, php redirects and all, with MODx.. I have made a database and installed MODx on a local test copy of the site, but where do I go from here?

    Any help / pointers / critique of my jumble is much appreciated. I apologise if I’ve confused you.

    RT
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That won’t be easy to port. Custom-coded dynamic sites rarely are.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 35858
        • 5 Posts
        I see, this could be a problem then. Any advice on where I’d start / anything I could use to help me?

        Thanks!

        RT
          • 33968
          • 863 Posts
          You can try the Babel extra to handle your multi-language setup. Use Wayfinder for menus and getResources for listing and filtering your resources.

          Not sure exactly what your ’low graphics’ code does, but chances are it could be included as a custom snippet or plugin.

          However as sottwell said, you could be in for a lot of work getting the whole site ported over especially if it requires much custom functionality. If you drop a link to the site here (or PM) we can give you a better idea of how to proceed...
            • 35858
            • 5 Posts
            I’m tempted to just remove all the dynamic stuff and simplify it down to links.

            It’s just stuff like this;

            <div id="wrapper">
            <?php
                include("titleBar.php");
            ?>
            <div id="contentFrame">
            <p><a href="index.php">Home</a></p>
            <div id="leftbar">
            <?php
                include("engNewsSummary.php");
            ?>
            </div>


            That really throws a spanner in the works - I assume that they’re separate so that whoever used to edit the site can just edit those parts (engNewsSummary.php) without touching the engIndex.php. Again, I could always simplify it, drop the includes and just add the news directly onto the engIndex.php to edit via MODx. What do you think?
              • 35858
              • 5 Posts
              I’ve done something lazy. Rather than including each individual .php file, I’ve just copied everything from said files and pasted it directly onto the index page. I reckon without these dynamic includes it’ll make things alot easier for everyone.
                • 3749
                • 24,544 Posts
                The usual method would be to put that content in chunks and put a chunk tag where the "include" is (assuming that there’s no real PHP processing in the file). If there is, then you’d put that code in a snippet that returned the results and put a snippet tag in place of the "include".

                  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