Evogallery http error

Быстрое и надежное решение типичной проблемы модуля EvoGallery (MODx)

Недавно при работе с  MODx Evolution столкнулся с необходимостью создать на сайте фотогалерею. Задача вроде тривиальная, после недолгого гугления был найден компонент EvoGallery с подробной инструкцией по установке и работе.

Установка компонента не вызвала никаких сложностей, только вот засада — ни в какую не хотела работать функция загрузки фотографий на сайт. Собственно, ради чего все и затевалось :) При клике по ссылке «Загрузить файлы» просто ничего не происходило. При этом в консоли выводилось сообщение об ошибке:

Uncaught TypeError: document.getElementById(…).startFileUpload is not a function

На экране это выглядело так:

После полудня танца с бубном выяснилась истинная причина такого поведения модуля. Ларчик просто открывался! Оказывается, EvoGallery использует флеш-загрузчик, который не работает, если на компьютере не установлен Adobe Flash Player. Если плеер установлен, но загрузка все равно не работает — смотрим в адресную строку браузера, в правом ее краю выскакивает значок с предупреждением о заблокированном контенте. Разрешаем использование Flash для данного сайта и в админке EvoGalery появится темная кнопка «Select Files». Нажимаем ее и наслаждаемся :)

p.s. Как включить Flash в браузере?

Данная рекомендация приведена для браузера Google Chrome. Идем в «Настройки», листаем в самый низ, кликаем по ссылке «дополнительно». Раскрывается еще несколько блоков с настройками. Нам нужно зайти в «Конфиденциальность и безопасность» и выбрать пункт «Настройки контента» (обычно предпоследний). В «Настройках контента» ищем пункт «Flash», открываем его и добавляем текущий сайт в список разрешенных. Закрываем настройки и перезагружаем страницу. После этого флеш-компоненты должны заработать.

Подробности
Категория: Программы и движки сайтов

Опубликовано: 18 апреля 2018

Просмотров: 4010

(But adding this by default might break older installations? Might want to add some sort of switch?)

It works partly! The image is now uploaded. I get the following errors in my log now:

[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Notice:  Undefined index: a in /path/to/my/root/assets/modules/evogallery/classes/management.class.inc.php on line 47
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Notice:  Undefined index: id in /path/to/my/root/assets/modules/evogallery/classes/management.class.inc.php on line 48
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::version_compare_replacement() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpThumb.config.php on line 109
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::SafeExec() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1082
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::FunctionIsDisabled() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.functions.php on line 448
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::FunctionIsDisabled() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.functions.php on line 448
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::FunctionIsDisabled() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.functions.php on line 448
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::FunctionIsDisabled() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.functions.php on line 448
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 893
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 900
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1217
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1234
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::OneOfThese() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2884
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::OneOfThese() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2885
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::version_compare_replacement() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2932
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::version_compare_replacement() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2943
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1217
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1234
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::nonempty_min() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2816
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::nonempty_min() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2817
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::ImageCreateFunction() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2842
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.functions.php on line 363
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2672
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 893
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 900
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1217
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1234
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::OneOfThese() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2884
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::OneOfThese() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2885
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::version_compare_replacement() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2932
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::version_compare_replacement() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2943
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1217
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 1234
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::nonempty_min() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2816
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::nonempty_min() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2817
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::ImageCreateFunction() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2842
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.functions.php on line 363
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 3850
[Wed Apr 27 13:26:39 2016] [error] [client 82.73.176.114] PHP Strict Standards:  Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in /path/to/my/root/assets/modules/evogallery/classes/phpthumb/phpthumb.class.php on line 2672

Something I also noticed:
When I upload a file with the same filename it asks «Do you want to replace original.jpg»? I Click yes.
But then:

  • It is replaced (including thumbnail and original) (inside assets/galleries/2/)
  • I see 2 thumbnails, but both the old versions (thumbnail not removed/cached?)
  • When I save and go back I still see the old image
  • When I repeat this step, a 3rd thumbnail is added. Again with the thumbnail of the first image.

Is this the same issue as modxcms/evolution#575?
I have the MD5 fix installed already

Установка EvoGallery

Качаем пакет тут

Чтобы установить EvoGallery, надо распаковать пакет и выполните следующие действия:

  • Создайте папку с именем ‘galleries’ в каталоге «assets» вашего сайта MODx и дайте ему полные права на запись (777).
  • Скопируйте все файлы из папки «assets» и «install» себе на сайт. 
  • Запустите инсталлятор (http://yoursite/install/index.php) и следуйте простым инструкциям на экране, чтобы завершить установку.После того как вы закончили установку, убедитесь, что директория «install» удалена с вашего сайта.

Настройка EvoGallery, что бы картинки всплывали при нажатии

Для начала загрузим фотографии на нужную нас страницу, для этого идем МОДУЛИ — EvoGallery.

Теперь надо скачать пакет http://fancyapps.com/fancybox/

(тут же есть описания всех настроек отображения и всплывания галереи)

Далее скачиваем скрипты и все необходимые картинки на наш сайт

  • jquery-1.9.0.min.js
  • jquery.mousewheel-3.0.6.pack.js
  • jquery.fancybox.js
  • jquery.fancybox.css
  • jquery.fancybox.pack.js
  • fancybox_sprite.png
  • fancybox_overlay.png
  • fancybox_loading.gif
  • blank.gif

например в папку assets/js/

Создаем новый шаблон отображения галереи, куда в шапку прописываем:

<script type=»text/javascript» src=»assets/js/jquery-1.9.0.min.js»></script>
<script type=»text/javascript» src=»assets/js/jquery.mousewheel-3.0.6.pack.js»></script>
<script type=»text/javascript» src=»assets/js/jquery.fancybox.js?v=2.1.4″></script>
<link rel=»stylesheet» type=»text/css» href=»assets/js/jquery.fancybox.css?v=2.1.4″ media=»screen» />
<script type=»text/javascript»>
$(document).ready(function() {
$(«.fancybox»).fancybox({
openEffect: ‘none’,
closeEffect: ‘none’});
});</script>

Вызов EvoGallery

Ниже, туда где надо вывести галерею пишем:

[[EvoGallery]]

По адресу assets/snippets/evogallery/simple-list лежат три файла, правим tpl.item.default.txt, заменяем то, что там есть, на:

<a href=»[+images_dir+][+filename+]» class=»fancybox» rel=»gallery1″ title=»[+title+]»><img src=»[+thumbs_dir+][+filename+]» alt=»[+title+]» /></a>

Создаем чанк item_list_galery1:

<div class=»photo»>
<a href=»[~[+id+]~]»  title=»[+title+><img class=»pic» src=»[+thumbs_dir+][+filename+]» alt=»[+title+]» /></a>
<a href=»[~[+id+]~]»>[+pagetitle+]</a></div>

Для отображения папок альбомов:

[[EvoGallery?&docId=`7` &display=`galleries`&itemTpl=`item_list_galery1`]]

Все, галерея создана.

 File Size Error

Если вылезает такая ошибка, то Идем в ИНСТРУМЕНТЫ — КОНФИГУРАЦИЯ — Файл-менеджер, в строке Максимальный размер загрузки: пишем например 4194304

Как изменить размер картинки EvoGallery

Заходим в админку — Модули — Управление модулями — EvoGallery 

{‘w’: 175, ‘h’: 175, ‘q’: 75}

меняем на нужные размеры, можно еще добавить

, ‘zc’: 1

чтобы картинки ресайзились

Если у вас есть store, то все намного проще.


Вконтакте

Facebook

Видеоканал по компьютерам, технике и виртуальной реальности.

    • 13400

    • 44 Posts
    • Send PM

    Так и не получилось заставить работать эту Gallery работать.

    На хостинге nic.ru при выборе составления списка файлов и нажатии кнопки Upload Files, ничего не происходит, вытащил ответ который возвращает сервер — The requested method POST is not allowed for the URL /assets/modules/evogallery/check.php. Но register_globals включен. версия PHP 5.2.10 что я только не пробовал, и разные модули включать.

    Локально(PHP 5.3.3), эта галерея, реагирует на Upload Files, даже показывает черные квадраты(вместо превьюшек) с именем файлов, но сами картинки не загружаются, их нет в папках.

    может есть какой-нить секрет?

    п.с. в логах ошибок нет. папки доступны для записи.

    Может просто кто-нить попробует себе поставить, проверить работает или нет?

    http://modxcms.com/extras/package/676

    или

    http://modxcms.com/forums/index.php?action=dlattach;topic=49489.0;attach=14019

      • 13400

      • 44 Posts
      • Send PM

      всем, спасибо)). в папке /assets/ лежал .htaccess

        • 13400

        • 44 Posts
        • Send PM

        Тогда другой вопрос, как kcfinder, отучить от .htaccess из папки /assets/ с содержимым

        <IfModule mod_php4.c>
          php_value engine off
        </IfModule>
        <IfModule mod_php5.c>
          php_value engine off
        </IfModule>

        не уживаются вместе EvoGallery и kcfinder v1.7 (использую вместо mcpuk, по известным причинам))))

          • 13400

          • 44 Posts
          • Send PM

          Welcome to «my twitter» wink

            • 16562

            • 3 Posts
            • Send PM

            Мне вот тоже приглянулась эта галерея,пробовал ставить на локал сервер (MAMP) это на MacOS всё чудненько работает файлы загружаються прекрасно есть интерфейс редактирования, галерея выводиться на ту страницу куда ставишь тоже без проблем. Возможно у вас проблемы с конфигурацией хостинга возможно не правильно права доступа где то выставили или конфигурация .htacsses блокирует загрузку изображений на хостинг.

            Проверьте везде права на запись а так же .htacsses так же рекомендую сперва протестить на локальном хосте =)

            у меня другая проблема, с разработкой на modx только начал накомиться никак не могу написать грамотно тему вывода изображений галереи у меня они пока что просто всем скопом на страничке висят, я так пнимаю нужно сделать чанк с параметрами и css коассами, но не особо представляю как его грамотно написать, если поможете буду безкрайне благодарен, жетальельно простейший без использования сторонних модулей но с перспективой подключения light box или что то вроде того

              • 11188

              • 49 Posts
              • Send PM

              evogallery еще может не работать из-за отсутствия на серваке расширения json для php.

                • 11188

                • 49 Posts
                • Send PM

                еще можно в файл /assets/modules/evogallery/templates/upload.js.tpl
                вставить:

                	$("#uploadify").uploadify({
                ...
                        'onError' : function(event, ID, fileObj, errorObj) {
                			alert(errorObj.type+"::"+errorObj.info);
                		}
                	});
                

                и если будет ошибка, выдаст номер ошибки алертом.

                  • 26137

                  • 4 Posts
                  • Send PM

                  Quote from: Jager at Jan 20, 2011, 09:12 AM

                  всем, спасибо)). в папке /assets/ лежал .htaccess

                  подскажи как решил проблему, что с .htacces сделал? такая же проблема и хостинг

                    • 13400

                    • 44 Posts
                    • Send PM

                    Quote from: sangrishin at Mar 31, 2011, 04:28 PM

                    подскажи как решил проблему, что с .htacces сделал? такая же проблема и хостинг

                    пришлось вернуть родной mcpuk, что бы не использовать .htacces в папке assets.

                    Появился еще один неприятный момент — плагин uploadify, который использует Evogallery для загрузки файлов, не будет работать на кириллическом домене. проблема в самом uploadify.swf(.fla) — не открывает окно для загрузки.

                      • 8031

                      • 70 Posts
                      • Send PM

                      Кто-нить может подсказать почему не работает параметр limit ?

                      • <
                      • 1
                      • 2
                      • >

                      Recommend Projects

                      • React photo

                        React

                        A declarative, efficient, and flexible JavaScript library for building user interfaces.

                      • Vue.js photo

                        Vue.js

                        🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

                      • Typescript photo

                        Typescript

                        TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

                      • TensorFlow photo

                        TensorFlow

                        An Open Source Machine Learning Framework for Everyone

                      • Django photo

                        Django

                        The Web framework for perfectionists with deadlines.

                      • Laravel photo

                        Laravel

                        A PHP framework for web artisans

                      • D3 photo

                        D3

                        Bring data to life with SVG, Canvas and HTML. 📊📈🎉

                      Recommend Topics

                      • javascript

                        JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

                      • web

                        Some thing interesting about web. New door for the world.

                      • server

                        A server is a program made to process requests and deliver data to clients.

                      • Machine learning

                        Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

                      • Visualization

                        Some thing interesting about visualization, use data art

                      • Game

                        Some thing interesting about game, make everyone happy.

                      Recommend Org

                      • Facebook photo

                        Facebook

                        We are working to build community through open source technology. NB: members must have two-factor auth.

                      • Microsoft photo

                        Microsoft

                        Open source projects and samples from Microsoft.

                      • Google photo

                        Google

                        Google ❤️ Open Source for everyone.

                      • Alibaba photo

                        Alibaba

                        Alibaba Open Source for everyone

                      • D3 photo

                        D3

                        Data-Driven Documents codes.

                      • Tencent photo

                        Tencent

                        China tencent open source team.

                      Вот такой скрипт положить возле index.php и запустить (желательно в консоли, так как может занять много времени в случае больших галерей), сделав предварительно бэкап

                      <?php
                      define('MODX_API_MODE', true);
                      define('MODX_BASE_PATH', __DIR__ . '/');
                      define('MODX_BASE_URL', '/');
                      define('MODX_SITE_URL', 'https://modx-gu.ru/');
                      include_once("index.php");
                      $modx->db->connect();
                      if (empty ($modx->config)) {
                          $modx->getSettings();
                      }
                      include_once(MODX_BASE_PATH.'assets/plugins/simplegallery/lib/table.class.php');
                      $modx->invokeEvent("OnManagerPageInit");
                      $q = $modx->db->query("SELECT * FROM {$modx->getFullTableName('portfolio_galleries')} ORDER BY `content_id` ASC, `sortorder` ASC, `id` ASC");
                      $fs = HelpersFS::getInstance();
                      $sg = new SimpleGallerysgData($modx);
                      while ($row = $modx->db->getRow($q)) {
                          $path = 'assets/galleries/'.$row['content_id'].'/';
                          if ($fs->checkFile($path.'original/'.$row['filename'])) {
                              $sg->create();
                              $sg->set('sg_rid',$row['content_id']);
                              $sg->set('sg_title',$row['title']);
                              $sg->set('sg_description',$row['description']);
                              $sg->set('sg_image',$path.$row['filename']);
                              $fs->moveFile($path.$row['filename'],$path.'large/'.$row['filename']);
                              $fs->moveFile($path.'original/'.$row['filename'],$path.$row['filename']);
                              $name = MODX_BASE_PATH . $path.$row['filename'];
                              $info = getimagesize($name);
                              $properties = array(
                                  'width' => $info[0],
                                  'height' => $info[1],
                                  'size' => filesize($name)
                              );
                              $sg->set('sg_properties',$properties);
                              $sg->save();
                          }
                      }
                      

                      Предполагается, что включена настройка keepOriginal, и EvoGallery сохраняет загруженные файлы в папку /original/, поэтому с файлами происходит следующее (пусть для примера есть папка assets/galleries/10/):

                      • файл из assets/galleries/10/ перемещается в assets/galleries/10/large/;
                      • файл из assets/galleries/10/original/ перемещается в assets/galleries/10/ и это теперь основной файл SimpleGallery.

                      После того, как все закончилось, можно настроить sgThumb и нарезать превьюшки.

                      Если не получилось, то оставайтесь с EvoGallery, не ломайте голову (:

                      Понравилась статья? Поделить с друзьями:
                    • Escape from tarkov как изменить регион
                    • Escape from tarkov как изменить почту
                    • Evo2 ошибка f12
                    • Evo2 ошибка f11
                    • Evo 2 ошибка f11