We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47308
    • 68 Posts
    I'm looking for a currency converter for my website and found this:

    https://github.com/GoldCoastMedia/modx-currency-converter

    I search for it on Package Manager but can't find it so I'm thinking of downloading it and manually installing it. I'm familiar with installing a transport package but this add-on is not in that format. Is there any way to manually install it?

    Also, is it advisable to install add-ons that are not in the official Modx repository?

    Thanks.

    This question has been answered by sottwell. See the first response.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
        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
        • 47308
        • 68 Posts
        Quote from: sottwell at Mar 09, 2016, 07:19 AM
        http://modxcookbook.com/add-ons/build-from-github/

        Thanks but I'm unable to get this to work. When I run the build.transport.php file in my browser, I no error messages, just a blank screen. I look in the core/packages folder and there is no transport file.

        I think I'm just not getting the directory structure right. In the instructions, it says:

        "put the unzipped directory in a MODX installation's space"

        I'm assuming this is the web root. Then the default paths should be okay shouldn't they? They are set as:

        define('MODX_CORE_PATH', dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/core/');
        define('MODX_BASE_PATH', dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/');
        define('MODX_MANAGER_PATH', MODX_BASE_PATH . 'manager/');
        define('MODX_CONNECTORS_PATH', MODX_BASE_PATH . 'connectors/');
        define('MODX_ASSETS_PATH', MODX_BASE_PATH . 'assets/');
        
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Looking at that package, the _build folder has a build.config.sample.php file. You need to rename or duplicate that to build.config.php
            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
            • 47308
            • 68 Posts
            Quote from: sottwell at Mar 09, 2016, 08:48 AM
            Looking at that package, the _build folder has a build.config.sample.php file. You need to rename or duplicate that to build.config.php

            Yup. Did that. But I left the directory paths alone. They look okay to me.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              My installation where I built it is in a subdirctory, so my build.config.php file looks like this. You will need to change the MODX_BASE_PATH and MODX_BASE_URL values.
              <?php
              /* Define the MODX path constants necessary for connecting to your core and other directories.
               * Rename this file to build.config.php
               * If you have not moved the core, the current values should work.
               *
               * In some cases, you may have to hard-code the full paths */
               
              define('MODX_BASE_PATH', '/Applications/MAMP/htdocs/latest.modx/');
              define('MODX_CORE_PATH', MODX_BASE_PATH . 'core/');
              define('MODX_MANAGER_PATH', MODX_BASE_PATH . 'manager/');
              define('MODX_CONNECTORS_PATH', MODX_BASE_PATH . 'connectors/');
              define('MODX_ASSETS_PATH', MODX_BASE_PATH . 'assets/');
              
              define('MODX_BASE_URL', '/latest.modx/');
              define('MODX_CORE_URL', MODX_BASE_URL . 'core/');
              define('MODX_MANAGER_URL', MODX_BASE_URL . 'manager/');
              define('MODX_CONNECTORS_URL', MODX_BASE_URL . 'connectors/');
              define('MODX_ASSETS_URL', MODX_BASE_URL . 'assets/');
              
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Well, with that config file, and the unzipped folder in my installation root (along with the assets, core, manager, etc folders) it built and placed the currencyconverter-1.0.1-beta.transport.zip file in my core/packages/ directory.

                I renamed the unzipped folder "cc" to make it easier to enter the URL for the build script.

                  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
                  • 47308
                  • 68 Posts
                  No luck. I tried:

                  <?php
                  /* Define the MODX path constants necessary for connecting to your core and other directories.
                   * Rename this file to build.config.php
                   * If you have not moved the core, the current values should work.
                   *
                   * In some cases, you may have to hard-code the full paths */
                  
                  define('MODX_CORE_PATH', 'core/');
                  define('MODX_BASE_PATH', '/public_html/mydomain.com/');
                  define('MODX_MANAGER_PATH','manager/');
                  define('MODX_CONNECTORS_PATH', 'connectors/');
                  define('MODX_ASSETS_PATH', 'assets/');
                  ?>
                  


                  And even the full server path:

                  <?php
                  /* Define the MODX path constants necessary for connecting to your core and other directories.
                   * Rename this file to build.config.php
                   * If you have not moved the core, the current values should work.
                   *
                   * In some cases, you may have to hard-code the full paths */
                  
                  define('MODX_CORE_PATH', '/public_html/mydomain.com/core/');
                  define('MODX_BASE_PATH', '/public_html/mydomain.com/');
                  define('MODX_MANAGER_PATH','/public_html/mydomain.com/manager/');
                  define('MODX_CONNECTORS_PATH', '/public_html/mydomain.com/connectors/');
                  define('MODX_ASSETS_PATH', '/public_html/mydomain.com/assets/');
                  ?>


                  Could it be a permissions problem?

                  I also tried:

                  <?php
                  /* Define the MODX path constants necessary for connecting to your core and other directories.
                   * Rename this file to build.config.php
                   * If you have not moved the core, the current values should work.
                   *
                   * In some cases, you may have to hard-code the full paths */
                  
                  define('MODX_CORE_PATH', 'core/');
                  define('MODX_BASE_PATH', '/mydomain.com/');
                  define('MODX_MANAGER_PATH','manager/');
                  define('MODX_CONNECTORS_PATH', 'connectors/');
                  define('MODX_ASSETS_PATH', 'assets/');
                  ?>
                  


                  This gives me a 500 error.
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Here.
                      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
                      • 47308
                      • 68 Posts
                      Quote from: sottwell at Mar 09, 2016, 09:13 AM
                      Here.

                      Thank you sir! I would love to find out what I am doing wrong. Something with the path names I'm sure.