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

Issue 1: So K2 Slider
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Issue 1: So K2 Slider

Issue 1: So K2 Slider 11 years, 5 months ago #5446

Website: sjwn25.csn2011go.com


Dear SmartAddons,

I would like for So K2 Slider (Editor's Choice) to show only articles (items) with images.

Now it is showing all articles: see second picture from the right!

Please eMail me updated php code to fix this issue.

I thank you in advance.

Sunny regards,

Willem

Re: Issue 1: So K2 Slider 11 years, 5 months ago #5482

  • loitt
  • OFFLINE
  • Platinum Boarder
  • Posts: 2222
  • Karma: 48
Dear Willem S.A. Da Costa Gomez,

Please do the following steps:

- go to "modules\mod_sj_k2_accordion\core\accordionreader.php", finding:
if (!isset($item->images) || (!YTools::isUrl($item->images) && !file_exists($item->images))){
		$item->images = 'modules/'.Ytools::getModule()->module . '/assets/images/nophoto.jpg';
	}

$temp['id'] = $item->id;
$temp['title'] = $item->title;
$temp['image'] = $item->images;

if(array_key_exists($item->id, $arrcustom_url)){
	$temp['link'] = $arrcustom_url[$item->id];
}else{
	if (!isset($item->url)){
		$item->url = (JRoute::_(K2HelperRoute::getItemRoute($item->id.':'.urlencode($item->alias), $item->catid.':'.urlencode($item->alias))));
	}
	$temp['link'] = $item->url;
}

if ((int)$params['item_description_keephtml'] == 0){
	$temp['desc'] = strip_tags($item->description);
} else {
	$temp['desc'] = ($item->description);
}

$list[] = $temp;


change to

$check_no_images = 0;
if (!isset($item->images) || (!YTools::isUrl($item->images) && !file_exists($item->images))){
	$check_no_images = 1;
}

if($check_no_images == 0){

	$temp['id'] = $item->id;
	$temp['title'] = $item->title;
	$temp['image'] = $item->images;
	
	if(array_key_exists($item->id, $arrcustom_url)){
		$temp['link'] = $arrcustom_url[$item->id];
	}else{
		if (!isset($item->url)){
			$item->url = (JRoute::_(K2HelperRoute::getItemRoute($item->id.':'.urlencode($item->alias), $item->catid.':'.urlencode($item->alias))));
		}
		$temp['link'] = $item->url;
	}
	
	if ((int)$params['item_description_keephtml'] == 0){
		$temp['desc'] = strip_tags($item->description);
	} else {
		$temp['desc'] = ($item->description);
	}
	
	$list[] = $temp;
}


* go to "modules\mod_so_k2_slider\core\sok2sliderreader.php", finding:
if (!isset($item->images) || (!YTools::isUrl($item->images) && !file_exists($item->images))){
	$item->images = 'modules/'.Ytools::getModule()->module . '/assets/images/nophoto.gif';
}
$temp['id'] = $item->id;
$temp['title'] = $item->title;
$temp['image'] = $item->images;
$temp['link']  = $item->link;
if($params['desc_keep_html'] == 0){
	$temp['desc']  = strip_tags($item->description);
}else{
	$temp['desc']  = $item->description;
}
$list[] = $temp;

change to
$check_no_images = 0;
if (!isset($item->images) || (!YTools::isUrl($item->images) && !file_exists($item->images))){
	$check_no_images = 1;
}

if($check_no_images == 0){
	$temp['id'] = $item->id;
	$temp['title'] = $item->title;
	$temp['image'] = $item->images;
	$temp['link']  = $item->link;
	if($params['desc_keep_html'] == 0){
		$temp['desc']  = strip_tags($item->description);
	}else{
		$temp['desc']  = $item->description;
	}
	$list[] = $temp;
}


Thanks
Ticket System | Join our Clubs to download our extensions and templates

Re: Issue 1: So K2 Slider 11 years, 5 months ago #5674

When I do this So K2 Slider displays nothing!
  • Page:
  • 1
Time to create page: 0.26 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