Mini K2 Image in introtext

Hi,
is there a way to display small images inside the introtext?

Regards
bugger
9 years 8 months ago #1 by bugger

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
Hi bugger,
Can you tell me what did you mean by "small inside the introtext"
Isn't it the thumbnail is already inside the introtext?
https://www.dropbox.com/s/fxpdyupll2hr714/xhems.jpg?raw=1
9 years 8 months ago #2 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Hi,
on my site i set the module to display the K2-Article-Image and the Introtext.
Inside the introtext, befor the read-more-link i added a small image.
That image did not show on the website.
Online the article-image is show above the introtext.
I`m using "simple" as sub-template.

Where is that thumbnail in your example set?
9 years 8 months ago #3 by bugger

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
Upss sorry, I was thinking you're asking about mini fp.
Ok, to do such that, please open this file ../modules/mod_minik2/tmpl/simple/default.php with your favorite php editor.
At line 25 - 33 cut this line :
<?php if ($item->image) { ?>
			<div class="thumbs-wrapper">
				<div class="thumbs">
					<a href="<?php echo $item->link; ?>">
						<img src="<?php echo $item->image; ?>" alt="<?php echo $item->title; ?>" class="box-img" />
					</a>
				</div>
			</div>
			<?php } ?>

and paste it to line 58, so starting from the line 57 becoming like this :
<?php if($params->get('itemIntroText')) { ?>
				<div>
<?php if ($item->image) { ?>
			<div class="thumbs-wrapper">
				<div class="thumbs">
					<a href="<?php echo $item->link; ?>">
						<img src="<?php echo $item->image; ?>" alt="<?php echo $item->title; ?>" class="box-img" />
					</a>
				</div>
			</div>
			<?php } ?>					
<p class="minik2-simple-intro">
						<?php echo $item->introtext; ?>
					</p>
				</div>
			<?php } ?>

Please have a try
9 years 8 months ago #4 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Sry, that didn`t work like i would need it.

I added 2 images to this thread, showing what i want to do.
At article.jpg you can see the backend.
I added a smal image before the read-more-link.
This image (red box) should be shown at the frontend right under the introtext.

With the changes you wrote, the artikcle-image is shown before and after the introtext.
9 years 8 months ago #5 by bugger

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
Ah, sorry I misunderstood you.
For that, please revert the current code changes, then go to the module backend, leave the field Introtext word limit empty in the module backend.
9 years 8 months ago #6 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum