We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7571
    • 135 Posts
    Написал в службу поддержки и отправил им два файла:error log и accsses log, вот что мне ответили:
    > Высылаю два файла, которые сегодня создались в логах.

    Вот например:
    include(../assets/modules/easy2/langs/english.inc.php)
    или
    [Wed Sep 8 18:49:36 2010] [error] PHP Parse error: syntax error, unexpected ’<’
    in
    /usr/home/pupkin/www/site1/public_html/manager/processors/execute_module.processor.php(114)
    :
    eval()’d code on line 1

    В первом случае реальный инклуд находится по пути
    ../../assets/modules/easy2/langs/english.inc.php
    Во втором случае, Вы видимо где-то поправили что-то, и там неисполнимый код стал
    получаться.

    Может быть у меня не правильно настроен modx?
    В инструментах, в закладке "Интерфейс и представление" в форме URL к файлам: что писать? у меня написано просто assets/
    Код PHP:
    <?php
    if (IN_MANAGER_MODE != ’true’) die("<b>INCLUDE_ORDERING_ERROR</b>

    Please use the MODx Content Manager instead of accessing this file directly.");

    /**
    * EASY 2 GALLERY
    * Gallery Module for MODx Evolution
    * @author Cx2 <[email protected]>
    * @author Temus
    * @author goldsky <[email protected]>
    */

    // Easy 2 Gallery version
    if (!defined(’E2G_VERSION’) || ’E2G_VERSION’ !== ’1.4.0 - RC 1’) {
    define(’E2G_VERSION’, ’1.4.0 - RC 1’);
    }

    // Easy 2 Gallery module path
    if(!defined(’E2G_MODULE_PATH’)) {
    define(’E2G_MODULE_PATH’, MODX_BASE_PATH . ’assets/modules/easy2/’);
    }
    // Easy 2 Gallery module URL
    if(!defined(’E2G_MODULE_URL’)) {
    define(’E2G_MODULE_URL’, MODX_BASE_URL . ’assets/modules/easy2/’);
    }

    require_once E2G_MODULE_PATH . ’includes/utf8/utf8.php’;

    // LANGUAGE
    if (file_exists( E2G_MODULE_PATH . ’includes/langs/’.$modx->config[’manager_language’].’.inc.php’)) {
    require_once E2G_MODULE_PATH . ’includes/langs/’.$modx->config[’manager_language’].’.inc.php’;

    // if there is a blank language parameter, english will fill it as the default.
    foreach ($e2g_lang[$modx->config[’manager_language’]] as $olk => $olv) {
    $olangkey[$olk] = $olk; // other languages
    $olangval[$olk] = $olv;
    }

    include_once E2G_MODULE_PATH . ’includes/langs/english.inc.php’;
    foreach ($e2g_lang[’english’] as $enk => $env) {
    if ( !isset($olangkey[$enk]) ) {
    $e2g_lang[$modx->config[’manager_language’]][$enk] = $env;
    }
    }

    $lng = $e2g_lang[$modx->config[’manager_language’]];
    } else {
    require_once E2G_MODULE_PATH . ’includes/langs/english.inc.php’;
    $lng = $e2g_lang[’english’];
    }

    mysql_select_db(str_replace(’`’, ’’, $GLOBALS[’dbase’]));
    @mysql_query("{$GLOBALS[’database_connection_method’]} {$GLOBALS[’database_connection_charset’]}");

    // ALERTS / ERRORS
    if (!isset( $_SESSION[’easy2err’] ) ) $_SESSION[’easy2err’] = array();
    if (!isset( $_SESSION[’easy2suc’] ) ) $_SESSION[’easy2suc’] = array();

    // CONFIGURATIONS
    if (!file_exists(E2G_MODULE_PATH . ’includes/configs/config.easy2gallery.php’)) {
    // if config file has not been created, yet, this will create one
    $createconfig = fopen(E2G_MODULE_PATH . ’includes/configs/config.easy2gallery.php’, ’w+’);
    } else {
    require_once E2G_MODULE_PATH . ’includes/configs/config.easy2gallery.php’;
    foreach ($e2g as $ck => $cv) {
    $confkey[$ck] = $ck;
    $confval[$ck] = $cv;
    }
    }

    // the default config will replace any blank value of config’s.
    if (file_exists( E2G_MODULE_PATH . ’includes/configs/default.config.easy2gallery.php’ )) {
    require_once E2G_MODULE_PATH . ’includes/configs/default.config.easy2gallery.php’;
    // if config file is missing, this will create one
    if (isset($createconfig)) {
    $c = "<?php\r\n\$e2g = array (\r\n";
    foreach($def_e2g as $dk => $dv) {
    $c .= " ’$dk’ => ".(is_numeric($dv)?$dv:"’".addslashes($dv)."’").",\r\n";
    }
    $c .= ");\r\n?>";
    fwrite($createconfig, $c);
    fclose($createconfig);
    unset($createconfig);
    }

    foreach ($def_e2g as $dk => $dv) {
    if ( !isset($confkey[$dk]) ) {
    $e2g[$dk] = $dv;
    }
    }
    $def_e2g = array();
    unset($def_e2g);
    }

    // CHECKING THE root and _thumbnails FOLDERs
    if (!is_dir( MODX_BASE_PATH . $e2g[’dir’]) ) {
    // INSTALL
    if (is_dir( E2G_MODULE_PATH . ’install’)) {
    require_once E2G_MODULE_PATH . ’install/index.php’;
    exit();
    } else {
    $_SESSION[’easy2err’][] = ’<b style="color:red">’.$lng[’dir’].’ &quot;’.$e2g[’dir’].’&quot; ’.$lng[’empty’].’</b>’;
    // exit;
    }
    } elseif (!is_dir( MODX_BASE_PATH . $e2g[’dir’] . ’_thumbnails’ ) ) {
    if (mkdir( MODX_BASE_PATH . $e2g[’dir’] . ’_thumbnails’ ) ) {
    @chmod( MODX_BASE_PATH . $e2g[’dir’] . ’_thumbnails’, 0755 );
    } else {
    $_SESSION[’easy2err’][] = ’<b style="color:red">’ . $lng[’_thumb_err’] . ’</b>’;
    exit;
    }
    }

    // ENCODING
    $e2gmod_cfg[’e2g_encode’] = $e2g[’e2g_encode’];

    // SET UP THE PATH
    $e2gmod_cfg[’gdir’] = ( isset($gdir) ? $gdir : $e2g[’dir’] );
    $e2gmod_cfg[’path’] = ( isset($path) ? $path : ’’ );
    $e2gmod_cfg[’parent_id’] = ( isset( $_GET[’pid’] ) && is_numeric( $_GET[’pid’] ) ) ? (int) $_GET[’pid’] : 1;

    /**
    * SYSTEM VARS
    */
    // Easy 2 Gallery’s debug parameter
    $e2gmod_cfg[’e2g_debug’] = $e2g[’e2g_debug’];
    // override MODx’s debug variable
    $debug = 0;
    // MODx’s manager theme
    $e2gmod_cfg[’_t’] = ( isset($_t) ? $_t : $modx->config[’manager_theme’] );
    // MODx’s action ID
    $e2gmod_cfg[’_a’] = ( isset($_a) ? $_a : (int) $_GET[’a’] );
    // MODx’s module ID
    $e2gmod_cfg[’_i’] = ( isset($_i) ? $_i : (int) $_GET[’id’] );
    // E2G’s module ID
    $e2gmod_cfg[’mod_id’] = !empty($e2g[’mod_id’])? $e2g[’mod_id’] : $_GET[’id’];
    // E2G’s plugin ID
    $e2gmod_cfg[’plugin_id’] = !empty($e2g[’plugin_id’])? $e2g[’plugin_id’] : null;

    /**
    * If Easy 2 Gallery is included inside another module,
    * append its params into the address bar
    */
    $alienarray = array();
    $alienparams = ’’;
    if ($e2gmod_cfg[’mod_id’]!=$_GET[’id’]) {
    // exclude ALL e2g’s internal $_GET params to identify other module’s $_GET params
    $diff = array(
    ’a’=>(isset($_GET[’a’])?$_GET[’a’]:null)
    , ’id’=>(isset($_GET[’id’])?$_GET[’id’]:null)
    , ’pid’=>(isset($_GET[’pid’])?$_GET[’pid’]:null)
    , ’file_id’=>(isset($_GET[’file_id’])?$_GET[’file_id’]:null)
    , ’lang’=>(isset($_GET[’lang’])?$_GET[’lang’]:null)
    , ’langfile’=>(isset($_GET[’langfile’])?$_GET[’langfile’]:null)
    , ’dir_path’=>(isset($_GET[’dir_path’])?$_GET[’dir_path’]:null)
    , ’file_path’=>(isset($_GET[’file_path’])?$_GET[’file_path’]:null)
    , ’path’=>(isset($_GET[’path’])?$_GET[’path’]:null)
    , ’act’=>(isset($_GET[’act’])?$_GET[’act’]:null)
    , ’page’=>(isset($_GET[’page’])?$_GET[’page’]:null)
    , ’ip’=>(isset($_GET[’ip’])?$_GET[’ip’]:null)
    , ’u’=>(isset($_GET[’u’])?$_GET[’u’]:null)
    , ’e’=>(isset($_GET[’e’])?$_GET[’e’]:null)
    );
    $aliendiff = array_diff_key ( $_GET , $diff );
    foreach ($aliendiff as $k => $v) {
    $alienparams .= ’&’.$k.’=’.$v;
    }
    $diff = array();
    }

    // module’s href
    $e2gmod_cfg[’index’] = ( isset($index) ? $index : ’index.php?a=’.$e2gmod_cfg[’_a’].’&id=’.$e2gmod_cfg[’_i’] )
    .( $alienparams!=’’ ? $alienparams : ’’ );

    // ERROR REPORTING
    if ($e2gmod_cfg[’e2g_debug’] == 1) {
    // error_reporting(E_ALL);
    // $old_error_handler = set_error_handler("error_handler");
    }
    /**
    * To handle error
    * @param int $errno error number
    * @param string $errmsg error message
    * @param string $filename filename
    * @param int $linenum line number
    * @param string $vars huh
    */
    function error_handler ($errno, $errmsg, $filename, $linenum, $vars) {
    echo ’<p>Error ’.$errno.’: ’.$errmsg.’
    File: ’.$filename.’ <b>Line:’.$linenum.’</b></p>’;
    }

    // INSTALL
    if (is_dir( E2G_MODULE_PATH . ’install’)) {
    require_once E2G_MODULE_PATH . ’install/index.php’;
    exit();
    }

    /**
    * EXECUTE MODULE
    */

    if(!class_exists(’e2g_pub’)) {
    include_once(E2G_MODULE_PATH . "includes/classes/e2g.public.class.php");
    }
    if(!class_exists(’e2g_mod’)) {
    include_once(E2G_MODULE_PATH . "includes/classes/e2g.module.class.php");
    }
    if (class_exists(’e2g_pub’) && class_exists(’e2g_mod’)) {
    $e2g_mod = new e2g_mod($e2gmod_cfg, $e2g, $lng);
    $e2g_mod->e2gpub_cfg = $e2gmod_cfg;
    $e2g_mod->e2gpub_e2g = $e2g;
    $e2g_mod->e2gpub_lng = $lng;
    $output = $e2g_mod->explore($e2g, $lng);
    } else {
    $output = "<h3>error: required class not found</h3>";
    }

    return $output;
      • 11055 ☆ A M B ☆
      • 3,112 Posts
      the module code is only this:
      include_once MODX_BASE_PATH . 'assets/modules/easy2/index.php';
      


      not the file’s content. wink
        Rico
        Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
        MODx is great, but knowing how to use it well makes it perfect!

        www.virtudraft.com

        Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

        Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

        Maintainter/contributor of Babel

        Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
        • 7571
        • 135 Posts
        Хорошо, сейчас попробую, но ведь для версии 1.3 нужно было вставить именно код PHP
        Установка
        1. Разархивируйте архив в дирректорию с установленным MODx.
        2. Создайте в MODx новый модуль и обязательно назовите его easy2, в поле "код модуля" вставьте содержимое файла module.easy2gallery.php (assets/modules/easy2/install/module.easy2gallery.php).
        3. Обновите окно с MODx, чтобы в модулях появилась новая закладка easy2, откройте её.
        4. Произведите установку согласно инструкциям.
        5. Если установка прошла успешно, обязательно удалите дирректорию install, нажитием на кнопку, или вручную. При её наличии, модуль работать не будет.
        И после этого не работало =(
          • 7571
          • 135 Posts
          УРАААААААААА
          Последняя версия поставилась, спасибо большоеееее, за терпение и глупые вопросы, но лучше спросить, чем не знать.
          Значит система установлена правильно.
            • 20050
            • 67 Posts
            Здравствуйте.

            Как, каким плейсхолдером вывести вот это описание картинки? (Место обозначено красными стрелками)

            Это поле автоматически выводится только с floatbox 4.04, а с другими библиотеками как-то выводится?
              [!ditto? !][!ditto? !][!ditto &margaritto=`yes`!]
              • 1619
              • 3 Posts
              Добрый вечер!Хотелось бы узнать у знающих людей,как сделать так,чтобы на страницу выводились сразу все картинки из папки,без превью?Очень нужно...помогите,пожалуйста,кто знает,как это сделать.
                • 1619
                • 3 Posts
                Использую easy2gallery133_temus.....
                  • 11055 ☆ A M B ☆
                  • 3,112 Posts
                  Quote from: modx_user at Sep 09, 2010, 10:28 PM

                  Здравствуйте.
                  Как, каким плейсхолдером вывести вот это описание картинки? (Место обозначено красными стрелками)
                  Это поле автоматически выводится только с floatbox 4.04, а с другими библиотеками как-то выводится?
                  You should add some code of how the javascript library displays the caption.
                  I only did a test on the floatbox as an example of a request a while ago.
                  Please refer to your selected library’s homepage for more information about adding the onclick() event.

                  @Andruxa_shevchenko,
                  I’m sorry, google did not translate your question good, so just wait for Temus to answer you.
                    Rico
                    Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                    MODx is great, but knowing how to use it well makes it perfect!

                    www.virtudraft.com

                    Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                    Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                    Maintainter/contributor of Babel

                    Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                    • 1619
                    • 3 Posts
                    @Goldsky,
                    Спасибо,но думаю по этому вопросу помощь Temusa ужене понадобиться.Я сам разобрался smiley Все гениальное просто.:)
                      • 19880
                      • 54 Posts
                      Just using Ditto for the news page, outputting articles plus their galleries if possible (through TV).

                      2358 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’ocured) AND A.cat_left BETWEEN B.cat_left AND B.cat_right’ at line 1
                      SELECT A.cat_id FROM modx_easy2_dirs A, modx_easy2_dirs B WHERE B.cat_id IN (Error ocured) AND A.cat_left BETWEEN B.cat_left AND B.cat_right