We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26085
    • 494 Posts
    Quote from: sottwell at Dec 14, 2007, 03:59 PM

    I would put each field through $modx->db->escape(), and would also use trim() instead of the ereg_replace:
      
    $parent_title = $modx->db->escape(trim($parent_title));
    $page_title = $modx->db->escape(trim($page_title));
    


    I use this module just by my self.
    Because of that I don’t use esceping.
    And row php function works more fast. I understood it when was working on complex import from text files (4 files about 3mb size) to MODX 5000doc and 400000tv _http://kipby.com/test/ smiley
      • 4172
      • 5,888 Posts
      Have Rewritten this usefull module for me and for everbody, who wants to use it.

      module:fast_content_csv
      Rewritten by Bruno [email protected]
      First Release by SamZ [email protected]
      v.05
      Module to import data from csv files
      1. Upload the files in /assets/modules
      1. Save this code as a new module with name fast_content_csv
      2. Copy csv files to your /assets/files/folder
      3. Start the module
      4. Than just insert parent id and defaults in default.csv (you can do it in the module) and save it
      5. Choose the source-file and the template, if not in default.csv or your csv-file from dropdown
      6. Push the Button Get Fields
      7. In the next form choose the fields you want to insert or update, if not autodetected or choose ----empty if you not want to update this field
      8. Make sure to choose update or insert and you are not in Testmode (checkbox) and pusch RUN
      TIP: You can generate CSV-files from documents and its TVs easy with Ditto
      ##################################
      changelog:
      #
      Release v05 Bruno [email protected]
      New:
      fast_content_csv.class.inc.php
      autodetect fieldnames for docs and TVs from first line
      drop-downs to set fields manually
      drop-down for csv-files and templates
      use defaults from default.csv
      change and save values of defaults.csv directly in the module
      update docs and TVs from csv with given docid
      and some little features more.
      #
      Release v035 by SamZ [email protected]
      ###################################

      */

      You can download my version here: http://modxcms.com/forums/index.php/topic,29616.msg180038.html#msg180038
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 21610
        • 360 Posts
        bad archive! reload plz.
          Разработка сайтов на MODx
          • 4172
          • 5,888 Posts
          did download it and opened it without problems.
          anybody else?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 1535
            • 84 Posts
            Worked fine for me. Unzipped without issues. Haven’t testet it yet tho.

            Cheers,

            Andreas
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              OK on a Mac (Leopard).
                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
                • 21610
                • 360 Posts
                reload plz .7z archive
                  Разработка сайтов на MODx
                  • 4172
                  • 5,888 Posts
                  Cannot upload 7z-files. But made a zip file with 7z. Perhaps this will work for you!
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 4172
                    • 5,888 Posts
                    [Update]
                    Had forgotten to remove some lines of code.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 19164
                      • 1,215 Posts
                      All is ok.

                      Quote from: Bruno17 at Sep 23, 2008, 01:29 AM

                      autodetect fieldnames for docs and TVs from first line

                      That is realy useful feature!
                        DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

                        Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

                        [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]