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

Intro or full image in slider
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Intro or full image in slider

Intro or full image in slider 12 years, 5 months ago #3727

Right now images are taken from intro text, in Joomla 2.5 there is intro image and full article image is there any way to use these images instead of image in the regular text?

Thanks

Re: Intro or full image in slider 12 years, 5 months ago #3736

  • loitt
  • OFFLINE
  • Platinum Boarder
  • Posts: 2222
  • Karma: 48
Hi ancogenli,

If you want to get intro image, you can customize the module.

Example: the content.php file in "your_site/modules/module_name/core/sjclass/components" folder.

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

Re: Intro or full image in slider 11 years, 10 months ago #7462

  • ssharifan
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Hello,

I have the same problem.Would you please tell me how to solve in detail.How should I customize the module?

Thanks

Re: Intro or full image in slider 11 years, 10 months ago #7468

  • loitt
  • OFFLINE
  • Platinum Boarder
  • Posts: 2222
  • Karma: 48
Dear Shahrooz Sharifan,

Please go to "modules\mod_sj_content_slider\core\contentsliderreader.php", finding:

// image extract
if (!isset($item->image_extracted)){
	$item_image = YTools::extractimages($item->description);
	$item->image_extracted = true;
}

if (!isset($item->image)){
	// get first exists image
	foreach ($item_image as $i => $image_url) {
		if (YTools::isUrl($image_url) || file_exists($image_url)){
			$item->image = $image_url;
			break;
		}
	}
}
// final check image exists
if (!isset($item->image) || (!YTools::isUrl($item->image) && !file_exists($item->image))){
	$item->image = 'modules/'.Ytools::getModule()->module . '/assets/images/nophoto.gif';
}


=>

if(isset($item->images) && !empty($item->images)){
					
	$intro_images = json_decode($item->images);

}
if (!isset($item->image)){

	if(isset($intro_images->image_intro) && !empty($intro_images->image_intro))
	{
		$item->image = $intro_images->image_intro;
	
	}elseif(isset($intro_images->image_fulltext) && !empty($intro_images->image_fulltext)){
		$item->image = $intro_images->image_fulltext;
		
	}else{
	
		// image extract
		if (!isset($item->image_extracted)){
			$item_image = YTools::extractimages($item->description);
			$item->image_extracted = true;
		}
		
		
		// get first exists image
		foreach ($item_image as $i => $image_url) {
			if (YTools::isUrl($image_url) || file_exists($image_url)){
				$item->image = $image_url;
				break;
			}
		}
	}
}

// final check image exists
if (!isset($item->image) || (!YTools::isUrl($item->image) && !file_exists($item->image))){
	$item->image = 'modules/'.Ytools::getModule()->module . '/assets/images/nophoto.gif';
}


Thanks
Ticket System | Join our Clubs to download our extensions and templates
The following user(s) said Thank You: ssharifan
  • Page:
  • 1
Time to create page: 0.22 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