kostykiewicz3435 0 Zgłoś post Napisano Listopad 26, 2013 Witam, Mam pewien problem Chodzi o to ze: Moduł mod_fwgallery_carousel działa na zasadzie kliknięcia na strzałki w lewo lub w prawo aby przesunąć zdjęcia w nim wyświetlane, w tej chwili przesuwa się tylko 1 zdjęcie przy jednym kliknięciu strzałki, ja bym chciał by przy jednym kliknięciu przesunęło się 6 zdjęć. Gdzie można to ustawić w tym kodzie co wysłałem...? Jaki parametr zmienić i w jaki sposób..? Autor mi nie chce pomóc sam juz siedze bite 3 godziny i nie wiem już co mam zrobić Moduł jest ze strony: http://fastw3b.net/joomla-extensions/product/104-carousel-module.html Kod źródłowy: <?php /** * FW Gallery Carousel Module 1.1.1 * @copyright (C) 2013 Fastw3b * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.fastw3b.net/ Official website **/ defined( '_JEXEC' ) or die( 'Restricted access' ); ?> <div id="mod-fwg-carousel-<?php echo $id; ?>" class="mod-fwg-carousel-horizontal<?php if ($class_name = $params->get('moduleclass_sfx')) { ?> mod-fwg-carousel-<?php echo $class_name; } ?>"> <table> <tr> <td> <div id="mod-fwg-carousel-left-button-<?php echo $id; ?>" class="mod-fwg-carousel-left-button mod-fwg-carousel-left-button-disabled"></div> </td> <td> <div id="mod-fwg-carousel-frame-<?php echo $id; ?>" class="mod-fwg-carousel-frame" style="height:<?php echo $height + 14; ?>px;width:<?php echo ($width + 6) * $params->get('qty', 3); ?>px;"> <div id="mod-fwg-carousel-film-<?php echo $id; ?>" class="mod-fwg-carousel-film" style="width:<?php echo $total_width; ?>px;"> <?php foreach ($list as $i=>$row) { $path = '/images/com_fwgallery/files/'.$row->_user_id.'/'; if (file_exists(JPATH_SITE.$path.$prefix.$row->filename)) { $descr = ''; if ($params->get('display_galleryname')) $descr = JText :: _('Gallery').': <a href="'.JRoute :: _('index.php?option=com_fwgallery&view=gallery&id='.$row->project_id.':'.JFilterOutput :: stringURLSafe($row->_gallery_name)).'">'.$row->_gallery_name.'</a>'; if ($params->get('display_username') and $row->_user_name) $descr .= ($descr?'<br/>':'').JText :: _('Author').': '.$row->_user_name; if ($params->get('display_imagename')) $descr .= ($descr?'<br/>':'').JText :: _('Image').': '.$row->name; if ($params->get('display_imagedate')) $descr .= ($descr?'<br/>':'').JText :: _('Date').': '.JHTML :: date($row->created); if ($params->get('display_imageviews')) $descr .= ($descr?'<br/>':'').JText :: _('Hits').': '.(int)$row->hits; ?> <div><?php if ($display_iconnew and $row->_is_new) { ?><span class="fwg-icon-new"></span><?php } ?><a href="<?php echo JRoute::_('index.php?option=com_fwgallery&view=image&id='.$row->id.':'.JFilterOutput :: stringURLSafe($row->name).'&Itemid='.JFHelper :: getItemid('image', $row->id, JRequest :: getInt('Itemid')).''); ?>"><img src="<?php echo JURI :: root(true).$path.$prefix.$row->filename; ?>" alt="<?php echo htmlspecialchars($descr); ?>"/></a></div> <?php } } ?> </div> </div> </td> <td> <div id="mod-fwg-carousel-right-button-<?php echo $id; ?>" class="mod-fwg-carousel-right-button<?php if ($total_qty <= $params->get('qty', 3)) { ?> mod-fwg-carousel-right-button-disabled<?php } ?>"></div> </td> </tr> </table> </div> <script type="text/javascript"> var mod_fwg_carousel_pos_<?php echo $id; ?> = 0; function fwg_fade(elem, start, end, time) { elem.style.opacity = start; (function fwg_go() { if (start < end) { var opacity = elem.style.opacity * 1 + 0.1; elem.style.opacity = opacity; elem.style.filter = 'alpha(opacity=' + elem.style.opacity * 100 + ')'; if (elem.style.opacity < end) setTimeout(fwg_go, 100); } else { var opacity = elem.style.opacity * 1 - 0.1; elem.style.opacity = opacity; elem.style.filter = 'alpha(opacity=' + elem.style.opacity * 100 + ')'; if (elem.style.opacity > end) setTimeout(fwg_go, 100); } })(); } var fwg_film_eff_<?php echo $id; ?> = { stop: function() { if (this.timer.length) for (var i = 0; i < this.timer.length; i++) if (this.timer[i]) clearTimeout(this.timer[i]); this.timer = new Array; }, start: function(to) { var curr_pos = fwg_film_eff_<?php echo $id; ?>.el.style.left?parseInt(fwg_film_eff_<?php echo $id; ?>.el.style.left):0; var step = (curr_pos - to) / 10; for (var i = 0; i < 10; i++) { this.timer.push( setTimeout(function() { fwg_film_eff_<?php echo $id; ?>.el.style.left = (curr_pos + step * i * -1) + 'px'; }, 50 * i) ); } } } window.addEvent('domready', function() { document.getElements('a.fwg-carousel-lightbox').cerabox({ titleFormat: 'Image {number} / {total} {title}' }); var mod_fwg_body = document.getElementById('mod-fwg-carousel-<?php echo $id; ?>'); var mod_fwg_frame = document.getElementById('mod-fwg-carousel-frame-<?php echo $id; ?>'); var mod_fwg_film = document.getElementById('mod-fwg-carousel-film-<?php echo $id; ?>'); var mod_fwg_left = document.getElementById('mod-fwg-carousel-left-button-<?php echo $id; ?>'); var mod_fwg_right = document.getElementById('mod-fwg-carousel-right-button-<?php echo $id; ?>'); mod_fwg_right.addEvent('click', function(ev) { var film_width = parseInt(mod_fwg_film.style.width) * -1; if (mod_fwg_carousel_pos_<?php echo $id; ?> > film_width + <?php echo (int)($width + 6) * ((int)$params->get('qty', 3)); ?>) { var class_name = mod_fwg_left.className; if (class_name.match(/disabled/)) mod_fwg_left.className = 'mod-fwg-carousel-left-button'; var class_name = this.className; if (class_name.match(/disabled/)) this.className = 'mod-fwg-carousel-right-button'; mod_fwg_carousel_pos_<?php echo $id; ?> = Math.max(film_width, mod_fwg_carousel_pos_<?php echo $id; ?> - <?php echo $width + 6; ?>); (function fwg_go_left() { var left = mod_fwg_film.style.left.replace(/([\d.]+)(px|pt|em|%)/,'$1') * 1 - 20; mod_fwg_film.style.left = left+'px'; if (left <= film_width + <?php echo (int)($width + 6) * ((int)$params->get('qty', 3)); ?>) { var class_name = mod_fwg_right.className; if (!class_name.match(/disabled/)) mod_fwg_right.className += ' mod-fwg-carousel-right-button-disabled'; } if (left > mod_fwg_carousel_pos_<?php echo $id; ?>) setTimeout(fwg_go_left, 10); })(); } }); mod_fwg_left.addEvent('click', function(ev) { if (mod_fwg_carousel_pos_<?php echo $id; ?> < 0) { var class_name = mod_fwg_right.className; if (class_name.match(/disabled/)) mod_fwg_right.className = 'mod-fwg-carousel-right-button'; var class_name = this.className; if (class_name.match(/disabled/)) this.className = 'mod-fwg-carousel-left-button'; mod_fwg_carousel_pos_<?php echo $id; ?> = Math.min(0, mod_fwg_carousel_pos_<?php echo $id; ?> + <?php echo $width + 4; ?>); (function fwg_go_right() { var left = mod_fwg_film.style.left.replace(/([\d.]+)(px|pt|em|%)/,'$1') * 1 + 20; mod_fwg_film.style.left = left+'px'; if (mod_fwg_carousel_pos_<?php echo $id; ?> == 0) { var class_name = mod_fwg_left.className; if (!class_name.match(/disabled/)) mod_fwg_left.className += ' mod-fwg-carousel-left-button-disabled'; } if (left < mod_fwg_carousel_pos_<?php echo $id; ?>) setTimeout(fwg_go_right, 10); })(); } }); }); </script> Udostępnij ten post Link to postu Udostępnij na innych stronach