Slideshow Management

Skip Posts With No Image? - Slideshow Management

Skip Posts With No Image?

by elawrenc » Fri Nov 18, 2022 8:45 pm

Thanks for this extension, I really like it!
I am using this to highlight post images on my forum. I know you are able to supply a default image when there is none with a post but is there a way to skip that post altogether and display the next post that has an image?

Thanks in advance
elawrenc
Registered User
Posts: 141
Joined: Thu Jul 21, 2011 2:41 pm

Re: Skip Posts With No Image?

by huynhbuutam » Sun Nov 20, 2022 1:16 pm

He elawrenc, please try this:
Open: ./tamit/slideshow/core/manager.php
Find:

Code: Select all

			// Get slide image from config
			$post_image = $this->config['tamit_slideshow_default_image'];
			if (strlen($post_image) == 0)
			{
				$post_image = $this->phpbb_root_path . '/ext/tamit/slideshow/styles/all/theme/no-image.png';
			}
Replace-with:

Code: Select all

			// Get slide image from config
			$post_image = '';
			//$post_image = $this->config['tamit_slideshow_default_image'];
			//if (strlen($post_image) == 0)
			//{
			//	$post_image = $this->phpbb_root_path . '/ext/tamit/slideshow/styles/all/theme/no-image.png';
			//}
Find:

Code: Select all

			if ($this->config['tamit_slideshow_topic_max_length'] > 0)
Before-add:

Code: Select all

			if (strlen($post_image) == 0)
			{
				continue;
			}
User avatar
huynhbuutam
Registered User
Posts: 39
Joined: Wed Dec 01, 2021 4:15 pm
Location: Viet Nam
Name: Huynh Buu Tam

Re: Skip Posts With No Image?

by elawrenc » Mon Nov 21, 2022 8:01 pm

Thank you! I will give it a try and report back.
elawrenc
Registered User
Posts: 141
Joined: Thu Jul 21, 2011 2:41 pm