We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22532
    • 349 Posts
    нужно вставить так чтобы на выходе в исходном коде на страничке в разделе head был тот же код что и в примере на сайте highslide
    и не напутайте с кавычками когда в сниппет вставляете
    я долго понять не мог помнится почему же у меня ничего не появляется grin
    а в css надо не только правильные пути
    его надо попросту дополнить стилями для отрисовки нужной навигации
      • 15354
      • 17 Posts
      Вот мой кусок javascript в сниппете:
      hs.graphicsDir = "libs/highslide/graphics/";
      hs.align = "center";
      hs.transitions = ["expand", "crossfade"];
      hs.outlineType = "glossy-dark";
      hs.wrapperClassName = "dark";
      hs.fadeInOut = true;
      hs.dimmingOpacity = 0.75;
      	// Add the controlbar
      	if (hs.addSlideshow) hs.addSlideshow({
      		//slideshowGroup: "group1",
      		interval: 5000,
      		repeat: false,
      		useControls: true,
      		fixedControls: "fit",
      		overlayOptions: {
      			opacity: .6,
      			position: "bottom center",
      			hideOnMouseOut: true,
      		}
      	});

      С одинарными кавычками выскакивает ошибка T_STRING, поэтому заменил на двойные. Про css: ставлю в libs/highslide полный css-файл из дистрибутива и дописываю везде к ссылкам на изображения libs/highslide/. В результате браузер просто выводит фото без эффектов. Где грабли? Какими стилями еще css дополнить? Уже все перепробовал  huh



      По-моему, облом происходит из-за того, что css читается не из файла, а выводится кодом на странице. Тока как это вылечить?
        • 22532
        • 349 Posts
        что уж там конкретно менять я не помню..
        вообщем скинул готовый код сниппета и стилей, с которыми у меня работает
        это для галереи с чернявым оформлением  wink

        Сниппет:
        <?php
        /******************************************************************************
        *
        *  EASY 2 GALLERY BY Cx2 <[email protected]>
        *  VERSION 1.3
        *
        ******************************************************************************/
        
        
        require './assets/modules/easy2/config.easy2gallery.php';
        
        // GALLERY ID
        $gid = (!empty($gid) && is_numeric($gid)) ? $gid : 1;
        $gid = (!empty($_GET['gid']) && is_numeric($_GET['gid'])) ? (int) $_GET['gid'] : $gid;
        
        // WIDTH
        $w = (!empty($w) && is_numeric($w)) ? (int) $w : $e2g['w'];
        
        // HEIGHT
        $h = (!empty($h) && is_numeric($h)) ? (int) $h : $e2g['h'];
        
        // JPEG QUALITY
        $thq = (!empty($thq) && $thq<=100 && $thq>=0) ? (int) $thq : $e2g['thq'];
        
        // NAME LENGHT
        $name_len = (!empty($name_len) && is_numeric($name_len)) ? (int) $name_len : $e2g['name_len'];
        
        // DIRECTORY NAME LENGHT
        $cat_name_len = (!empty($cat_name_len) && is_numeric($cat_name_len)) ? (int) $cat_name_len : $e2g['cat_name_len'];
        
        // COLLS
        $colls = (!empty($colls) && is_numeric($colls)) ? (int) $colls : $e2g['colls'];
        
        // LIMIT
        $limit = (!empty($limit) && is_numeric($limit)) ? (int) $limit : $e2g['limit'];
        
        // GLIB
        $glib = (!empty($glib)) ? $glib : $e2g['glib'];
        
        // COMMENTS
        $ecm = (!empty($ecm) && is_numeric($ecm)) ? $ecm : $e2g['ecm'];
        
        // COMMENTS LIMIT
        $ecl = (!empty($ecl) && is_numeric($ecl)) ? (int) $ecl : $e2g['ecl'];
        
        // PAGE NUMBER
        $gpn = (!empty($_GET['gpn']) && is_numeric($_GET['gpn'])) ? (int) $_GET['gpn'] : 0;
        
        // ORDER BY
        $orderby = (!empty($orderby)) ? $orderby : $e2g['orderby'];
        $orderby = preg_replace('/[^_a-z]/i', '', $orderby);
        
        // ORDER
        $order = (!empty($order)) ? $order : $e2g['order'];
        $order = preg_replace('/[^a-z]/i', '', $order);
        
        // GALLERY CSS
        $css = (!empty($css)) ? str_replace('../', '', $css) : $e2g['css'];
        
        // GALLERY TEMPLATE
        $tpl = (!empty($tpl)) ? str_replace('../', '', $tpl) : $e2g['tpl'];
        
        // DIR TEMPLATE
        $dir_tpl = (!empty($dir_tpl)) ? str_replace('../', '', $dir_tpl) : $e2g['dir_tpl'];
        
        // THUMB TEMPLATE
        $thumb_tpl = (!empty($thumb_tpl)) ? str_replace('../', '', $thumb_tpl) : $e2g['thumb_tpl'];
        
        // THUMB RAND TEMPLATE
        $rand_tpl = (!empty($rand_tpl)) ? str_replace('../', '', $rand_tpl) : $e2g['rand_tpl'];
        
        // COMMENTS TEMPLATE
        // $comments_tpl = (!empty($comments_tpl)) ? str_replace('../', '', $comments_tpl) : $e2g['comments_tpl'];
        
        
        // CODE
        
        
        if ($orderby == 'random' && $limit == 1) {
        
            // ?????? ?????? RAND
        
            if (file_exists($rand_tpl)) {
                $rand_tpl = file_get_contents($rand_tpl);
            } elseif (!empty($modx->chunkCache[$rand_tpl])) {
                $rand_tpl = $modx->chunkCache[$rand_tpl];
            } else {
                return 'Template not found!';
            }
        
        
            $res = mysql_query('SELECT * FROM '.$modx->db->config['table_prefix'].'easy2_files '
            . 'WHERE status = 1 ORDER BY RAND() LIMIT 1');
        
            $l = mysql_fetch_array($res, MYSQL_ASSOC);
            $pos = strrpos($l['filename'], '.');
            $ext = substr($l['filename'], $pos);
        
            $l['title'] = $l['name'];
            if (strlen($l['name']) > $name_len) $l['name'] = substr($l['name'], 0, $name_len-2).'...';
            elseif ($l['name'] == '') $l['name'] = ' ';
            $l['w'] = $w;
            $l['h'] = $h;
        
            $path = get_path($l['dir_id']);
            if (count($path) > 1) {
                unset($path[1]);
                $path = implode('/', array_keys($path)).'/';
            } else {
                $path = '';
            }
            $l['src'] = get_thumb($e2g['dir'], $path.'/'.$l['id'].$ext, $w, $h, $thq);
        
        
            return filler($rand_tpl, $l);
        }
        
        $_e2g = array('content'=>'','pages'=>'','parent_id'=>0,'back'=>'');
        
        $path = get_path($gid);
        $_e2g['cat_name'] = end($path);
        if (count($path) > 1) {
            end($path);
            prev($path);
            $_e2g['parent_id'] = key($path);
            $_e2g['parent_name'] = $path[$_e2g['parent_id']];
            unset($path[1]);
            $path = implode('/', array_keys($path)).'/';
        } else {
            $path = '';
        }
        
        // FOR comments
        $_SESSION['manager_language'] = $modx->config['manager_language'];
        
        // CSS ??????? ?????? ???????
        
        if (file_exists($css)) {
            $css = file_get_contents($css);
        } elseif (!empty($modx->chunkCache[$css])) {
            $css = $modx->chunkCache[$css];
        }
        
        if ($glib == 'highslide') {
            $modx->regClientStartupScript('libs/highslide/highslide-with-gallery.js', 0);
            $modx->regClientStartupScript('<script type="text/javascript">
        	hs.graphicsDir = "libs/highslide/graphics/";
        	hs.align = "center";
        	hs.transitions = ["expand", "crossfade"];
        	hs.outlineType = "glossy-dark";
        	hs.fadeInOut = true;
        	//hs.dimmingOpacity = 0.75;
        	
        	// Add the controlbar
        	if (hs.addSlideshow) hs.addSlideshow({
        		//slideshowGroup: group1,
        		interval: 5000,
        		repeat: false,
        		useControls: true,
        		fixedControls: true,
        		overlayOptions: {
        			opacity: .75,
        			position: "top center",
        			hideOnMouseOut: true
        		}
        	});
        </script>
        <style type="text/css">
        <!--
        '.file_get_contents('./libs/highslide/highslide.css').'
        '.$css.'
        -->
        </style>
        ', 1);
        
        }
        
        
        
        $i = 0;
        
        
        // SUBDIRS & THUMBS FOR SUBDIRS
        $res = mysql_query('SELECT A.*, F.* '
        . 'FROM '.$modx->db->config['table_prefix'].'easy2_dirs A, '
        . $modx->db->config['table_prefix'].'easy2_dirs B, '
        . $modx->db->config['table_prefix'].'easy2_files F '
        . 'WHERE B.cat_id='.$gid.' '
        . 'AND A.cat_left >= B.cat_left '
        . 'AND A.cat_right <= B.cat_right '
        . 'AND A.cat_level = B.cat_level + 1 '
        . 'AND A.cat_visible = 1 '
        . 'AND F.dir_id = A.cat_id '
        . 'GROUP BY A.cat_id '
        . 'ORDER BY A.cat_name');
        
        $_e2g['content'] = '<table class="e2g"><tr>';
        
        // ?????? ??????????
        
        if (file_exists($dir_tpl)) {
            $dir_tpl = file_get_contents($dir_tpl);
        } elseif (!empty($modx->chunkCache[$dir_tpl])) {
            $dir_tpl = $modx->chunkCache[$dir_tpl];
        } else {
            return 'Directory template not found!';
        }
        
        while ($l = mysql_fetch_array($res, MYSQL_ASSOC)) {
        
            if ($i % $colls == 0) $_e2g['content'] .= '</tr><tr>';
        
            $pos = strrpos($l['filename'], '.');
            $ext = substr($l['filename'], $pos);
        
            $l['title'] = $l['cat_name'];
            if (strlen($l['cat_name']) > $cat_name_len) $l['cat_name'] = substr($l['cat_name'], 0, $cat_name_len-1).'...';
            elseif ($l['cat_name'] == '') $l['cat_name'] = ' ';
            $l['w'] = $w;
            $l['h'] = $h;
            $l['src'] = get_thumb($e2g['dir'], $path.$l['cat_id'].'/'.$l['id'].$ext, $w, $h, $thq);
        
            $_e2g['content'] .= '<td>'.filler($dir_tpl, $l).'</td>';
            $i++;
        
        
        }
        
        $_e2g['content'] .= '</tr></table>';
        
        
        // THUMBS FOR CURRENT DIR
        $res = mysql_query('SELECT * FROM '.$modx->db->config['table_prefix'].'easy2_files '
        . 'WHERE dir_id='.$gid.' '
        . 'AND status = 1 '
        . 'ORDER BY '. ( $orderby == 'random' ? 'RAND() ' : $orderby.' '.$order.' ')
        . 'LIMIT '.($gpn * $limit).', '.$limit);
        
        $i = 0;
        
        $_e2g['content'] .= '<table class="e2g"><tr>';
        
        // ?????? ??????
        
        if (file_exists($thumb_tpl)) {
            $thumb_tpl = file_get_contents($thumb_tpl);
        } elseif (!empty($modx->chunkCache[$thumb_tpl])) {
            $thumb_tpl = $modx->chunkCache[$thumb_tpl];
        } else {
            return 'Thumbnail template not found!';
        }
        
        while ($l = mysql_fetch_array($res, MYSQL_ASSOC)) {
        
            if ($i % $colls == 0) $_e2g['content'] .= '</tr><tr>';
        
            $pos = strrpos($l['filename'], '.');
            $ext = substr($l['filename'], $pos);
        
            $l['title'] = $l['name'];
            if (strlen($l['name']) > $name_len) $l['name'] = substr($l['name'], 0, $name_len-2).'...';
            elseif ($l['name'] == '') $l['name'] = ' ';
            $l['w'] = $w;
            $l['h'] = $h;
            $l['src'] = get_thumb($e2g['dir'], $path.$l['id'].$ext, $w, $h, $thq);
        
        
            if ($e2g['ecm'] == 1) {
                $l['com'] = 'e2gcom'.($l['comments']==0?0:1);
                $l['comments'] = '<a href="assets/modules/easy2/comments.easy2gallery.php?id='.$l['id'].'" onclick="return hs.htmlExpand(this, { objectType: \'iframe\'} )">'.$l['comments'].'</a>';
            } else {
                $l['comments'] = '';
                $l['com'] = 'not_display';
            }
        
            $_e2g['content'] .= '<td>'.filler($thumb_tpl, $l).'</td>';
        
            $i++;
        }
        
        $_e2g['content'] .= '</tr></table>';
        
        
        // ?????? ?? ????????
        
        $res = mysql_query('SELECT COUNT(*) FROM '.$modx->db->config['table_prefix'].'easy2_files WHERE dir_id='.$gid);
        list($cnt) = mysql_fetch_row($res);
        if ($cnt > $limit) {
            $_e2g['pages'] = '<div class="e2gpnums">';
            $i = 0;
            while ($i*$limit < $cnt) {
                if ($i == $gpn) $_e2g['pages'] .= '<b>'.($i+1).'</b> ';
                else $_e2g['pages'] .= '<a href="[~[*id*]~]&gid='.$gid.'&gpn='.$i.'">'.($i+1).'</a> ';
                $i++;
            }
        
            $_e2g['pages'] .= '</div>';
        }
        
        
        // {title} $modx->documentObject['pagetitle'];
        
        // ?????? ??????????? ? ???????????? ??????????
        
        if ($_e2g['parent_id'] > 0) {
            $_e2g['back'] = '<p class="e2gback">‹‹ <a href="[~[*id*]~]&gid='.$_e2g['parent_id'].'">'.$_e2g['parent_name'].'</a></p>';
        }
        
        // ?????? ???????
        
        if (file_exists($tpl)) {
            $tpl = file_get_contents($tpl);
        } elseif (!empty($modx->chunkCache[$tpl])) {
            $tpl = $modx->chunkCache[$tpl];
        } else {
            return 'Gallery template not found!';
        }
        
        return filler($tpl, $_e2g);
        
        
        
        
        function get_thumb ($gdir, $path, $w = 150, $h = 150, $thq=80, $resize_type = 'inner') {
            global $modx;
        
            if (empty($path)) return false;
        
            $thumb_path = '_thumbnails/'.substr($path, 0, strrpos($path, '.')).'_'.$w.'x'.$h.'.jpg';
        
            if (!file_exists($gdir.$thumb_path) && file_exists($gdir.$path)) {
        
                $i = getimagesize($gdir.$path);
                if ($i[2] == 1) $im = imagecreatefromgif ($gdir.$path);
                elseif ($i[2] == 2) $im = imagecreatefromjpeg ($gdir.$path);
                elseif ($i[2] == 3) $im = imagecreatefrompng ($gdir.$path);
                else return false;
        
                if ($i[0]/$w > 2 || $i[1]/$h > 2) {
                    $tmp_w = $w*2;
                    $tmp_h = round($i[1] * ($tmp_w/$i[0]));
        
                    $temp = imagecreatetruecolor ($tmp_w, $tmp_h);
                    imagecopyresized ($temp, $im, 0, 0, 0, 0, $tmp_w, $tmp_h, $i[0], $i[1]);
        
                    $i[0] = $tmp_w;
                    $i[1] = $tmp_h;
        
                    imagedestroy($im);
                    $im = $temp;
                }
        
        
        
                if ($resize_type == 'inner') {
                    // 'inner' - ???????? ??? ??????? ?? ????????
        
                    // ????????
                    $x = $y = 0;
        
                    // ??????? ?????????? ????????
                    $w2 = $w;
                    $h2 = $h;
        
                    if ($i[0] > $i[1]) {
                        $w2 = round($i[0] * $h / $i[1]);
                        if ($w2 > $w) $x = ($w2 - $w)/2 * (-1);
                    } else {
                        $h2 = round($i[1] * $w / $i[0]);
                        if ($h2 > $h) $y = ($h2 - $h)/2 * (-1);
                    }
        
                    $pic = imagecreatetruecolor($w, $h);
                    $bgc = imagecolorallocate($pic, 255, 255, 255);
                    imagefill($pic, 0, 0, $bgc);
                    imagecopyresampled($pic, $im, $x, $y, 0, 0, $w2, $h2, $i[0], $i[1]);
        
                } else {
                    // 'resize' - ??????????????? ????????? ??????? ??? ??????? ?? ????????
        
                    if ($i[0] > $i[1]) $h = round($i[1] * $w / $i[0]);
                    else $w = round($i[0] * $h / $i[1]);
        
                    $pic = imagecreatetruecolor($w, $h);
                    $bgc = imagecolorallocate($pic, 255, 255, 255);
                    imagefill($pic, 0, 0, $bgc);
                    imagecopyresampled($pic, $im, 0, 0, 0, 0, $w, $h, $i[0], $i[1]);
                }
        
        
                // ???????? ???????????
                $dirs = explode('/', $path);
                $npath = $gdir.'_thumbnails';
                for ($c = 0; $c < count($dirs) - 1; $c++) {
                    $npath .= '/'.$dirs[$c];
                    if (is_dir($npath)) continue;
                    if(!mkdir($npath)) return false;
                    @chmod($npath, octdec($modx->config['new_folder_permissions']));
                }
        
        
                imagejpeg($pic, $gdir.$thumb_path, $thq);
                @chmod($gdir.$thumb_path, octdec($modx->config['new_file_permissions']));
        
                imagedestroy($pic);
                imagedestroy($im);
            }
        
            return $gdir.$thumb_path;
        }
        
        
        function get_path ($id) {
            global $modx;
        
            $result = array();
        
            $res = mysql_query('SELECT A.cat_id, A.cat_name FROM '.$modx->db->config['table_prefix'].'easy2_dirs A, '.$modx->db->config['table_prefix'].'easy2_dirs B WHERE B.cat_id='.$id.' AND B.cat_left BETWEEN A.cat_left AND A.cat_right ORDER BY A.cat_left');
            while ($l = mysql_fetch_row($res)) {
                $result[$l[0]] = $l[1];
            }
        
            if (empty($result)) return null;
        
            return $result;
        }
        
        
        function filler ($tpl, $data, $prefix = '[+easy2:', $suffix = '+]') {
             foreach($data as $k => $v) {
                 $tpl = str_replace($prefix.(string)$k.$suffix, (string)$v, $tpl);
             }
             return $tpl;
        }
        ?>

        highslide.css:
        .highslide-wrapper div {
        	font-family: Verdana, Helvetica;
        	font-size: 10pt;
        }
        .highslide {
        	cursor: url(libs/highslide/graphics/zoomin.cur), pointer;
        	outline: none;
        	text-decoration: none;
        }
        .highslide img {
        	border: 2px solid silver;
        }
        .highslide:hover img {
        	border-color: gray;
        }
        
        .highslide-active-anchor img, .highslide-active-anchor:hover img {
        	border-color: black;
        }
        .highslide-image {
        	border-width: 2px;
        	border-style: solid;
        	border-color: black black #202020 black;
        	background: gray;
        }
        .highslide-wrapper, .glossy-dark {
        	background: #111;
        }
        .highslide-image-blur {
        }
        .highslide-caption {
        	display: none;
        	border-top: none;
        	font-size: 1em;
        	padding: 5px;
        	color: white;
        	background: #111;
        }
        .highslide-heading {
        	display: none;
        	color: white;
        	font-size: 1.2em;
        	font-weight: bold;
        	margin-bottom: 0.4em;
        }
        .highslide-dimming {
        	position: absolute;
        	background: black;
        }
        .highslide-loading {
        	display: block;
        	color: white;
        	font-size: 9px;
        	font-weight: bold;
        	text-transform: uppercase;
        	text-decoration: none;
        	padding: 3px;
        	border-top: 1px solid white;
        	border-bottom: 1px solid white;
        	background-color: black;
        	padding-left: 22px;
        	background-image: url(libs/highslide/graphics/loader.gif);
        	background-repeat: no-repeat;
        	background-position: 3px 1px;
        }
        a.highslide-credits,
        a.highslide-credits i {
        	padding: 0;
        	color: black;
        	text-decoration: none;
        	font-size: 6px;
        }
        a.highslide-credits:hover,
        a.highslide-credits:hover i {
        	color: black;
        }
        .highslide-move a {
        	cursor: move;
        }
        
        
        /* Controls. See http://www.google.com/search?q=css+sprites */
        .highslide-controls {
        	width: 195px;
        	height: 40px;
        	background: url(libs/highslide/graphics/controlbar-black-border.gif) 0 -90px no-repeat;
        	margin-right: 15px;
        	margin-bottom: 10px;
        	margin-top: 20px;
        }
        .highslide-controls ul {
        	position: relative;
        	left: 15px;
        	height: 40px;
        	list-style: none;
        	margin: 0;
        	padding: 0;
        	background: url(libs/highslide/graphics/controlbar-black-border.gif) right -90px no-repeat;
        }
        .highslide-controls li {
        	float: left;
        	padding: 5px 0;
        }
        .highslide-controls a {
        	background: url(libs/highslide/graphics/controlbar-black-border.gif);
        	display: block;
        	float: left;
        	height: 30px;
        	width: 30px;
        	outline: none;
        }
        .highslide-controls a.disabled {
        	cursor: default;
        }
        .highslide-controls a span {
        	/* hide the text for these graphic buttons */
        	display: none;
        }
        
        /* The CSS sprites for the controlbar */
        .highslide-controls .highslide-previous a {
        	background-position: 0 0;
        }
        .highslide-controls .highslide-previous a:hover {
        	background-position: 0 -30px;
        }
        .highslide-controls .highslide-previous a.disabled {
        	background-position: 0 -60px !important;
        }
        .highslide-controls .highslide-play a {
        	background-position: -30px 0;
        }
        .highslide-controls .highslide-play a:hover {
        	background-position: -30px -30px;
        }
        .highslide-controls .highslide-play a.disabled {
        	background-position: -30px -60px !important;
        }
        .highslide-controls .highslide-pause a {
        	background-position: -60px 0;
        }
        .highslide-controls .highslide-pause a:hover {
        	background-position: -60px -30px;
        }
        .highslide-controls .highslide-next a {
        	background-position: -90px 0;
        }
        .highslide-controls .highslide-next a:hover {
        	background-position: -90px -30px;
        }
        .highslide-controls .highslide-next a.disabled {
        	background-position: -90px -60px !important;
        }
        .highslide-controls .highslide-move a {
        	background-position: -120px 0;
        }
        .highslide-controls .highslide-move a:hover {
        	background-position: -120px -30px;
        }
        .highslide-controls .highslide-full-expand a {
        	background-position: -150px 0;
        }
        .highslide-controls .highslide-full-expand a:hover {
        	background-position: -150px -30px;
        }
        .highslide-controls .highslide-full-expand a.disabled {
        	background-position: -150px -60px !important;
        }
        .highslide-controls .highslide-close a {
        	background-position: -180px 0;
        }
        .highslide-controls .highslide-close a:hover {
        	background-position: -180px -30px;
        }

        style.css:
        .e2gtitle {font:bold 14px Tahoma; display:none}
        .e2gback {font:bold 10px Tahoma; display:none}
        .e2g {font:11px Tahoma; margin-left:0px}
        .e2g td {vertical-align:bottom;text-align:center;padding:7px}
        .e2g th {font-weight:normal;height:13px}
        .e2g a {color:#808080;text-decoration:none}
        .e2gcom0, .e2gcom1 {font:10px Tahoma;float:right; width:13px;}
        .e2gcom0 {background: url(assets/modules/easy2/icons/bg_com0.gif) no-repeat top right;}
        .e2gcom1 {background: url(assets/modules/easy2/icons/bg_com1.gif) no-repeat top right;}
        .e2gcom0 a {color:#808080;text-decoration:none}
        .e2gcom1 a {color:#FF8040;text-decoration:none}
        
        .e2gpnums {font:12px Verdana; color:gray; margin-top:20px;text-align:center;}
        .e2gpnums a {background:#F4F4F4;border:1px solid #E8E8E8;color:gray}
        .e2gpnums a:hover {background:#B3EC6C;border:1px solid #83D71C;color:white;text-decoration:none}
        .e2gpnums a, .e2gpnums b {padding:3px 6px;}
        
        .not_display {display:none}
        
        
        .boxcontent {padding:1px 5px;}
        .boxcontent img {margin-bottom:3px; border:1px solid white}
        .thumb .b2, .thumb .b3, .thumb .b4, .thumb .b4b, .thumb .b3b, .thumb .b2b, .thumb .boxcontent { background:#F5F5F5;}
        .dir .b2, .dir .b3, .dir .b4, .dir .b4b, .dir .b3b, .dir .b2b, .dir .boxcontent { background:#FFF0CC;}
        .b1, .b2, .b3, .b4, .b1b, .b2b, .b3b, .b4b { display:block; overflow:hidden; font-size:1px; }
        .b1, .b2, .b3, .b1b, .b2b, .b3b { height:1px; }
        .b2, .b3, .b4, .b4b, .b3b, .b2b, .boxcontent { border-left:1px solid #E0E0E0; border-right:1px solid #E0E0E0; display:block; }
        .b1, .b1b { margin:0 5px; background:#E0E0E0; }
        .b3, .b3b { margin:0 2px; }
        .b4, .b4b { height:2px; margin:0 1px; }
        
        .dir .b2, .dir .b3, .dir .b4, .dir .b4b, .dir .b3b, .dir .b2b, .dir .boxcontent { border-left:1px solid #FFD2A6; border-right:1px solid #FFD2A6; display:block; }
        .dir .b1, .dir .b1b { margin:0 5px; background:#FFD2A6; }
        
        .b2, .b2b, .dir .b2, .dir .b2b { margin:0 3px; border-width:0 2px; }
        
        .boxcontent div b a { color:#333 }
        .boxcontent div b a:hover { color:#999 }
        
          • 15354
          • 17 Posts
          p4sh0k, молодец, по css я понял, где косяк. Спасибо. Щас ситуация такая: навигация появляется хотя бы в IE (уже праздник), но не работает. Копаем дальше. cool Отпишусь позже. Тут еще мысль появилась: вставлять css через regclientcss. попробую.
            • 10700
            • 104 Posts
            Помогите пожалуйста!
            Пытаюсь вызвать галерею несколько раз на одной странице.
            Код вызова:
            [+galleryid:ifnotempty=`[[easy2? &gid=`[+galleryid+]` &limit=`3` orderby=`random` &css=`gallery_css` &tpl=`gallery_tpl` &thumb_tpl=`gallery_thumb`]]`+]

            Выдает ошибку:

            Fatal error: Cannot redeclare get_thumb() (previously declared in /home/www/z101744/htdocs/manager/includes/document.parser.class.inc.php(769) : eval()’d code:305) in /home/www/z101744/htdocs/manager/includes/document.parser.class.inc.php(769) : eval()’d code on line 392
            Может кто нибудь сталкивался уже?
              • 15354
              • 17 Posts
              Короче, в результате всех половых сношений с javascript и попытками вызова навигации, я забил на это и прикрутил вместо "highslide" штуку под названием "floatbox". Результат можно увидеть здесь. Там и навигация сразу появилась, и кода меньше. Кстати, у нее нет ограничений по бесплатному использованию.  wink Рекомендую.  laugh

                • 22532
                • 349 Posts
                to kapa
                в принципе ничего так библиотечка..
                за исключением того что highslide будет посимпатичнее и с более богатой навигацией
                а в вашей только кнопки вперед/назад которые всегда видно к тому же и не убираются
                ЗЫ: наверное стоит сделать небольшой отступ на страничке от пагинации и текста с примечанием по работе галереи..
                  • 15354
                  • 17 Posts
                  to p4sh0k
                  ну это же у меня стандартный конфиг стоит. все прелести по типу режима слайдшоу с кнопками play/pause, активацией при наведении, видами навигации и прочими вкусностями настраиваются очень гибко. да и время отклика у нее поменьше будет. по поводу примечаний: их затолкаю в шаблон boxcontent’a только на главной странице с альбомами.

                  Кстати, если объединить style.css и css библиотеки, то всего один этот файл можно выводить в сниппете через:
                  $src = "blablabla.css";
                  $modx->regClientCSS($src);
                  в тег head и больше ничего не требуется по стилям.
                  Имхо, проще, удобней, меньше запар с путями (можно использовать библиотеку и для вывода одиночных изображений на других страницах без заморочек), код css не выводится в коде страницы.
                    • 27161
                    • 7 Posts
                    У меня на хостинге ... вылетатет ошибка в разделе модули, но сама галерея нормально работает
                    Warning: Invalid argument supplied for foreach() in /www/evrika01/www/htdocs/manager/processors/execute_module.processor.php(114) : eval()’d code on line 1434
                    а на локальном нету ее ...
                      • 19800
                      • 180 Posts
                      Добрый день.
                      Есть опыт работы с modx, каталоги ранее создавал на maxigallery / ditto. Наткнулся на этот модуль, считаю его очень удобным для галереи. Но, подойдет ли он для каталога?
                      Есть заказ на крупный сайт с каталогом у каждой единицы продукции должно быть описание, фото и около 5-6 характеристик товара: срок хранения, количество в лотке и т.п. которые нужно выводить в удобочитаемой форме, видимо в виде небольшой страницы.
                      Получается, чтобы эффективно использовать эту галерею для построения каталога необходимо прописать в админке дополнительные поля для ввода нескольких переменных для каждого изображения. Чтобы далее выводить их через шаблон, ну это уже просто. Возможно ли это без перепрограммирования всего кода или лучше забить, не выпендриваться и остановиться на Ditto с TVшками?
                      Ответьте пожалуйста, очень хочется наконец начать использовать нормальную систему для каталога на modx, отсутствия вменяемой админки для каталога - единственное что останавливает от полного перехода большинства сайтов на эту гибкую, но еще не совсем удобную систему.