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

So K2 Slider - open lightbox instead of K2 item?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: So K2 Slider - open lightbox instead of K2 item?

So K2 Slider - open lightbox instead of K2 item? 12 years, 9 months ago #4265

  • hockey2112
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Karma: 0
Hello,

I would like to have a home page slider using So K2 Slider that shows the images from several K2 items, but I would like for those images to open larger versions in a lightbox instead of going to the K2 items when they are clicked. Is this possible? I have tried to adjust the code in the tmpl file for the layout I am using, but could not get it to work. I am open to using a simple hack if you can provide me with one.

thanks!
The topic has been locked.

Re: So K2 Slider - open lightbox instead of K2 item? 12 years, 9 months ago #4269

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

I think that you can edit the theme file in the module.

Example: theme1.php, finding:

	<a href="<?php echo $item['link'];?>" target="<?php echo $target;?>" style="color: #1e1690 !important;"><?php echo $readmore_text;?></a>


change to:

      <a class="modal" href="<?php echo $item['link'].'&tmpl=component';?>" target="<?php echo $target;?>" style="color: #1e1690 !important; outline: none" rel="{handler: 'iframe', size: {x: 900, y: 450}}"><?php echo $readmore_text;?></a>


-----------
<a href='<?php echo $item['link'];?>' target="<?php echo $target;?>" title="<?php echo $item['title'];?>" style="color:<?php echo $title_so_color?> !important;"><?php echo $item['sub_title'];?></a>


change to:

<a class="modal" href="<?php echo $item['link'].'&tmpl=component';?>" target="<?php echo $target;?>" title="<?php echo $item['title'];?>" style="color:<?php echo $title_so_color?> !important;" rel="{handler: 'iframe', size: {x: 900, y: 450}}"><?php echo $item['sub_title'];?></a>


-----------

 <a href='<?php echo $item['link'];?>' title="<?php echo $item['title'];?>" target="<?php echo $target;?>"><?php endif;?><img src="<?php echo $item['thumb'];?>" width="<?php echo $thumb_width;?>px" height="<?php echo $thumb_height;?>px"/><?php if($link_image == 1):?></a>


change to:

 <a class="modal" href="<?php echo $item['link'].'&tmpl=component';?>" title="<?php echo $item['title'];?>" target="<?php echo $target;?>" rel="{handler: 'iframe', size: {x: 900, y: 450}}"><?php endif;?><img src="<?php echo $item['thumb'];?>" width="<?php echo $thumb_width;?>px" height="<?php echo $thumb_height;?>px"/><?php if($link_image == 1):?></a>


Thanks
Ticket System | Join our Clubs to download our extensions and templates
The topic has been locked.

Re: So K2 Slider - open lightbox instead of K2 item? 12 years, 9 months ago #4287

  • hockey2112
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Karma: 0
So close... the clicks now open the full item/page in a lightbox. What would I change in your examples above to have it show just the enlarged photo from the K2 item instead of that K2 item's entire page?

Thanks!
The topic has been locked.

Re: So K2 Slider - open lightbox instead of K2 item? 12 years, 9 months ago #4290

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

Please open theme1.php in the module, finding:

 <?php if($link_image == 1):?><a href='<?php echo $item['link'];?>' title="<?php echo $item['title'];?>" target="<?php echo $target;?>"><?php endif;?><img src="<?php echo $item['thumb'];?>" width="<?php echo $thumb_width;?>px" height="<?php echo $thumb_height;?>px"/><?php if($link_image == 1):?></a><?php endif;?>


change to:

<?php if($link_image == 1):?><a class="modal" href="<?php echo $item['img'];?>" title="<?php echo $item['title'];?>" target="<?php echo $target;?>" rel="{handler: 'iframe', size: {x: 900, y: 450}}"><?php endif;?><img src="<?php echo $item['thumb'];?>" width="<?php echo $thumb_width;?>px" height="<?php echo $thumb_height;?>px"/><?php if($link_image == 1):?></a><?php endif;?>


Thanks
Ticket System | Join our Clubs to download our extensions and templates
The topic has been locked.

Re: So K2 Slider - open lightbox instead of K2 item? 12 years, 9 months ago #4295

  • hockey2112
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Karma: 0
Unfortunately, it still doesn't appear to be working. Also, the image itself oes nothing when clicked. Only the Item name and the read more links actually link to the lightbox, but again, the lightbox shows the item's full page.

Here's my code as it stands now:

    					<div class="so_img" style="width:<?php echo $thumb_width; ?>px; display:<?php echo ($showimage)?"block":"none";?>">

    	       			     <?php if($link_image == 1):?><a class="modal" href="<?php echo $item['img'];?>" title="<?php echo $item['title'];?>" target="<?php echo $target;?>" rel="{handler: 'iframe', size: {x: 900, y: 450}}"><?php endif;?><img src="<?php echo $item['thumb'];?>" width="<?php echo $thumb_width;?>px" height="<?php echo $thumb_height;?>px"/><?php if($link_image == 1):?></a><?php endif;?>

    					</div>

    	       			<div class="so_content so_content_<?php echo $module->id?>" style="left:0px;width:<?php echo $thumb_width;?>px;top:135px;overflow: hidden;">

                            <h4 class="so_title so_title_<?php echo $module->id?>" style="display:<?php echo ($showtitle)?"block":"none";?>" ><a class="modal" href="<?php echo $item['link'].'&tmpl=component';?>" target="<?php echo $target;?>" title="<?php echo $item['title'];?>" style="color:<?php echo $title_so_color?> !important;" rel="{handler: 'iframe', size: {x: 900, y: 450}}"><?php echo $item['sub_title'];?></a></h4>

        	       			<div class="so_description" style="padding:5px 5px 0px 5px;display:<?php echo ($showdescription)?"display":"none";?>;color:#FFFFFF;"><?php echo $item['sub_content'];?></div>

        					

                            <div class="so_readmore" style="display:<?php echo ($show_readmore)?"block":"none";?>;">

        						      <a class="modal" href="<?php echo $item['link'].'&tmpl=component';?>" target="<?php echo $target;?>" style="color: #1e1690 !important; outline: none" rel="{handler: 'iframe', size: {x: 900, y: 450}}"><?php echo $readmore_text;?></a>

        					</div> 

The topic has been locked.
  • 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