Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Carousel Is Broken Please Help
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Carousel Is Broken Please Help

Carousel Is Broken Please Help 10 years, 6 months ago #12805

  • ether17
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
The carousel that comes with the template is broken. I saw a previous post relating to this issue but the suggested block of code to add wasn't actually helpful in resolving the issue.

I'm suprised that a module brought in via a quickstart install is broken straight out of the box and no patch has been applied to resolve it at download level.

The first slide and category populates the container fine , however the sliding motion between each slide does not work and using the scrolling arrows just re-loads the page with the /#myCarousel extension.

Please can someone help repair the carousel module

Re: Carousel Is Broken Please Help 10 years, 6 months ago #13189

Dear Nicholas Rowe,

We're sorry about the lateness. Could you please send your site url to us?

Thanks!

Re: Carousel Is Broken Please Help 10 years, 6 months ago #13231

  • ether17
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Hi SA Anh,

the website is www.dynamiccasemanagement.co.uk

the site is just a default installation with the default module installed from the smartaddons site. No modifications have been made so you should just need to repair the original module from your download.

You may find it difficult to navigate to the module directory on our site as we are using a joomla multi-sites plugin and this is just a test sub slave site we are playing with for now.

I have tried to attach the module to this post but for some reason it will not let me

our mod_carousel.php code is below

 

<?php
/**
 * @package Sj Carousel
 * @version 2.5
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @copyright (c) 2012 YouTech Company. All Rights Reserved.
 * @author YouTech Company https://www.smartaddons.com
 * 
 */
defined('_JEXEC') or die;

// Include the helper functions only once
require_once __DIR__ . '/helper.php';

$input = JFactory::getApplication()->input;

		// Prep for Normal or Dynamic Modes
		$mode = $params->get('mode', 'normal');
		$idbase = null;
		switch($mode)
		{
			case 'dynamic':
				$option = $input->get('option');
				$view = $input->get('view');
				if ($option === 'com_content') {
					switch($view)
					{
						case 'category':
							$idbase = $input->getInt('id');
							break;
						case 'categories':
							$idbase = $input->getInt('id');
							break;
						case 'article':
							if ($params->get('show_on_article_page', 1)) {
								$idbase = $input->getInt('catid');
							}
							break;
					}
				}
				break;
			case 'normal':
			default:
				$idbase = $params->get('catid');
				break;
		}



$cacheid = md5(serialize(array ($idbase, $module->module)));

$cacheparams = new stdClass;
$cacheparams->cachemode = 'id';
$cacheparams->class = 'modCarouselHelper';
$cacheparams->method = 'getList';
$cacheparams->methodparams = $params;
$cacheparams->modeparams = $cacheid;

$list = JModuleHelper::moduleCache($module, $params, $cacheparams);
//var_dump($list); die("ancnc");

if (!empty($list)) {
	$grouped = false;
	$article_grouping = $params->get('article_grouping', 'none');
	$article_grouping_direction = $params->get('article_grouping_direction', 'ksort');
	$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
	$item_heading = $params->get('item_heading');

	if ($article_grouping !== 'none') {
		$grouped = true;
		switch($article_grouping)
		{
			case 'year':
			case 'month_year':
				$list = modArticlesCategoryHelper::groupByDate($list, $article_grouping, $article_grouping_direction, $params->get('month_year_format', 'F Y'));
				break;
			case 'author':
			case 'category_title':
				$list = modArticlesCategoryHelper::groupBy($list, $article_grouping, $article_grouping_direction);
				break;
			default:
				break;
		}
	}
	require JModuleHelper::getLayoutPath('mod_carousel', $params->get('layout', 'default'));
}









Our default.php code is here



<?php
/**
 * @package Sj Carousel
 * @version 2.5
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @copyright (c) 2012 YouTech Company. All Rights Reserved.
 * @author YouTech Company https://www.smartaddons.com
 * 
 */
defined('_JEXEC') or die;

if(!empty($list)){?>
    <div id="yt_carousel" class="yt-carousel carousel slide"><!-- Carousel items -->
	    <div class="carousel-inner">
	    <?php $i=0; foreach($list as $item){$i++;?>
		    <div class="<?php if($i==1){echo "active";}?> item">
            	<img src="<?php echo modCarouselHelper::html_image($item->images, array('image_intro', 'image_fulltext'), false);?>" alt="<?php echo $item->title;?>" style="height:405px;" />
	    		<div class="carousel-caption">
		    		<h4><?php echo $item->title;?></h4>
		    		<p><?php echo $item->displayIntrotext;?></p>
	    		</div>
		    </div>
	    <?php }?>
	    </div><!-- Carousel nav -->
	    <a class="carousel-control left" href="#yt_carousel" data-slide="prev">&lsaquo;</a>
	    <a class="carousel-control right" href="#yt_carousel" data-slide="next">&rsaquo;</a>
    </div>
<?php }else{ echo JText::_('Has no content to show!');}?>





I really hope to hear from you soon , regards Nick
Last Edit: 10 years, 5 months ago by ether17.

Re: Carousel Is Broken Please Help 10 years, 5 months ago #13461

  • ether17
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
I've also added the code suggested in a previous post by SA Loi to the file

go to "templates\sj_joomla3\html\mod_carousel\default.php

so that the file now looks as below..... please note this attempted fix did not resolve the issue at all. Would it not be possible for someone to just repair the carousel module and then update the module download or something so people have easy access to a working version. Rather than have to raise tickets etc???


<?php
/**
 * @package Sj Carousel
 * @version 2.5
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @copyright (c) 2012 YouTech Company. All Rights Reserved.
 * @author YouTech Company https://www.smartaddons.com
 * 
 */
defined('_JEXEC') or die;
?>
<script type="text/javascript">
//<![CDATA[
if (typeof jQuery != 'undefined') { 
(function(cash) { 
       $(document).ready(function(){
        $('#myCarousel').each(function(index, element) {
                $(this)[index].slide = null;
               });
         });
 })(jQuery);
}
//]]>
</script>

<?php


/**
 * code after the defined line to her was added for slide fix
 * 
 */


if(!empty($list)){?>
    <div id="myCarousel" class="carousel slide"><!-- Carousel items -->
	    <div class="carousel-inner">
	    <?php $i=0; foreach($list as $item){$i++;?>
		    <div class="<?php if($i==1){echo "active";}?> item  slide-<?php echo $i;?>">
		    	<img src="<?php echo modCarouselHelper::html_image($item->images, array('image_intro', 'image_fulltext'), false);?>" alt="<?php echo $item->title;?>" />
	    		<div class="carousel-caption">
		    		<h4><?php echo $item->title;?></h4>
		    		<p><?php echo $item->displayIntrotext;?></p>
	    		</div>
		    </div>
	    <?php }?>
	    </div><!-- Carousel nav -->
	    <a class="carousel-control left" href="#myCarousel" data-slide="prev"></a>
	    <a class="carousel-control right" href="#myCarousel" data-slide="next"></a>
    </div>
<?php }else{ echo JText::_('Has no content to show!');}?>


Re: Carousel Is Broken Please Help 10 years, 5 months ago #14005

Dear Nicholas Rowe,

We're sorry about the lateness.
Your site is conflict jquery. May be compress css and js. you go to Template Manager -> sj joomla3 -> Options tab -> Optimize Css, Js -> chose:

Merge file -> No
Compress css -> No
Compress js -> No


Thanks!

Re: Carousel Is Broken Please Help 10 years, 5 months ago #14007

  • ether17
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
SA Anh wrote:
Dear Nicholas Rowe,

We're sorry about the lateness.
Your site is conflict jquery. May be compress css and js. you go to Template Manager -> sj joomla3 -> Options tab -> Optimize Css, Js -> chose:

Merge file -> No
Compress css -> No
Compress js -> No


Thanks!



Hi Anh ,

That makes no sense what so ever to me , the carousel is DEFAULT and by that I mean I have not changed any file relating to the module from your initial design within the quickstart.

Whether or not the css,js is compressed doesn't stop the files from being read any differently. If anything compression only helps the code get read slightly faster. The module itself does not need compression as there are not many files to it.

Can someone not just download the sjjoomla3 quickstart package and then try to set up the carousel... test the sliding motion and you will see the error. Then from that just repair the module so that it works and make it available for download.

Please note that this is the carousel for the SJ Joomla 3 template, NOT the SJ JOOMLA3 plus template...they are completely different.
  • Page:
  • 1
Time to create page: 0.24 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes