Keyword

adding another image plugin

  • dezignas
  • dezignas's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96724 by dezignas
adding another image plugin was created by dezignas
Hi guys, 

I am very new to K2 and I hope I am posting in the right forum, sorry if not.

I looked all over the extension list and extension forum, but could not find what I need.

 

I need some plugin for k2 to be able to add just another image ( second main image) to the item.

 1 picture is better then thousand words :)  please take a look at this attached image guys and let me know if there is any solution for my problem.

 

Thanks a lot guys!
Attachments:

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

More
13 years 11 months ago #96725 by BBC
Replied by BBC on topic adding another image plugin
Install Simple Gallery PRO.

 

Then in plugin settings set just to show ONE image. Set dimensions for thumbs to fill that block (width and desired height).

Then in plugin´s PHP files remove posibility to click at that ONE image (disable lightshow).

 

And it is all.

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

More
13 years 11 months ago #96726 by BBC
Replied by BBC on topic adding another image plugin
You will need allways to put that ONE image in ZIP file, then upload to K2 Item. But i guess it is not so huge problem.

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

More
13 years 11 months ago #96727 by BBC
Replied by BBC on topic adding another image plugin
Or any better, you can leave lightshow posibility. But then up there you have Modal box, and down there you have lightshow. Decide by yourself.

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

  • dezignas
  • dezignas's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96728 by dezignas
Replied by dezignas on topic adding another image plugin
Thanks BBC :) One problem though I already have one image gallery field already ( see the image above ) There is one main image, image gallery and the SECOND main image :)  

 

But it is possible to clone image gallery pro in some way ? :)

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

More
13 years 11 months ago #96729 by BBC
Replied by BBC on topic adding another image plugin
Sorry, i see now.

 

Cloning plugins is diffcult. Many things to change.

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

More
13 years 11 months ago #96730 by BBC
Replied by BBC on topic adding another image plugin
Rearange things to have image gallery in content. You can use Ignite Gallery, Joomgallery or Phoca gallery. All of them have an editor button for images/gallery insert.

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

  • dezignas
  • dezignas's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96731 by dezignas
Replied by dezignas on topic adding another image plugin
maybe there is any custom extra field or something :) Though I looked I think at all of them and found nothing.

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

More
13 years 11 months ago #96732 by BBC
Replied by BBC on topic adding another image plugin
community.getk2.org/profiles/blogs/k2-extended-image-plugin-on?xg_source=activity&id=3536014%3ABlogPost%3A161767&page=2#comments

 

This plugin has option to chose different pictures for Xsmall, Small, Large, Xlarge and Medium.

Try to use some image you don´t use anywhere for that position. Of those 5 different you allways have at least one you don´t use anywhere.

 

And try to copy code of that Image at the top, paste it in template under where you want new image. And try to change all in code needed for new image (of those 5).

 

Raport back if it works. Interessting topic.

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

  • dezignas
  • dezignas's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96733 by dezignas
Replied by dezignas on topic adding another image plugin
Thanks, will do :)

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

More
13 years 11 months ago #96734 by BBC
Replied by BBC on topic adding another image plugin
I just tested. And it works OK. You can have 3 (out of 5 max) new images, at different positions in Item template. (one is reserved for Category thumb, and one for image at the top)

 

<?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?> <!-- Item Image --> <div class="itemImageBlock"> <span class="itemImage"> <a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageMedium; ?>" title="<?php echo JText::_('Click to preview image'); ?>"> <img src="<?php echo $this->item->imageMedium; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a> </span> <?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?> <!-- Image caption --> <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span> <?php endif; ?> <?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?> <!-- Image credits --> <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?>

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

More
13 years 11 months ago #96735 by BBC
Replied by BBC on topic adding another image plugin
This solution opens many, many posibilities. :)

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

More
13 years 11 months ago #96736 by BBC
Replied by BBC on topic adding another image plugin
Note bolded text in post above.

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

More
13 years 11 months ago #96737 by BBC
Replied by BBC on topic adding another image plugin
Small correction. You can use 2 additional places for images. Third image is used for Modal box popup.

 

But, if you need more then 3 big pictures per Item together, use Gallery. Otherways it is stupid.

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

  • dezignas
  • dezignas's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96738 by dezignas
Replied by dezignas on topic adding another image plugin
He he, really many thanks to you  BBC :) Havent tested it yet, but I'm sure it will work like charm :)

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

  • dezignas
  • dezignas's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96739 by dezignas
Replied by dezignas on topic adding another image plugin
Hey it worked, though i used  Xsmall override, the problem with it is you must have something to override the main image otherwise you will get main image squashed...

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

More
13 years 11 months ago #96740 by BBC
Replied by BBC on topic adding another image plugin
Try to explain it some other way. You need to be more clear.

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

More
13 years 11 months ago #96741 by BBC
Replied by BBC on topic adding another image plugin
This tweak needs also option in Item settings to show/hide all 5 images in Items.

I will check if it is easy to tweak already existing option for top image. Copy code and change a little bit.

If you put new image positions it would be shown allways. Even if it is the same picture as picture at the top.

 

It would be perfect with some PHP code to put new positions after so many characters/words, etc....But, it is not easy.

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

More
13 years 11 months ago #96742 by BBC
Replied by BBC on topic adding another image plugin
It´s easy.

Open

administrator/components/com_k2/models/item.xml

and under your code for Item view options
> Image settings

put this:

 

<param name="itemImageLarge" type="list" default="" label="K2_IMAGE Large" description=""> <option value="">K2_INHERIT_FROM_CATEGORY</option> <option value="0">K2_HIDE</option> <option value="1">K2_SHOW</option> </param>

 

You need to rename in first code:

<?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?>

 

to:

<?php if($this->item->params->get('itemImageLarge') && !empty($this->item->image)): ?>

 

This is a example for Large Image under text. Repeat that process for all images you want in Item.

And rename them according that.

 

In Item Manager you get new options for Show/hide new images.

 

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

  • dezignas
  • dezignas's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #96743 by dezignas
Replied by dezignas on topic adding another image plugin
Hey cool it works just param code must be like this 

 

<param name="itemImageXSmall" type="list" default="" label="K2_IMAGE XSmall" description="">

 <option value="">Inherit from category</option>   

  <option value="0">Hide</option>     

<option value="1">Show</option>

</param>

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


Powered by Kunena Forum