Keyword

Any clues to change or disable the built in lightbox function?

  • scyllar
  • scyllar's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 6 months ago #81079 by scyllar
Hello everyone,I was looking for some clues to change the way images are displayed in an item, but failed anyway. Can anybody give me some tips and directions where I can hack around to change the default lightbox function or even disable it? I did not mean the gallery powered by SIG pro. I was talking about the built in image in any items created by K2. Any help is highly appreciated!

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

More
14 years 6 months ago #81080 by Steve Adams
Hey scyllar,

First check K2 templating documentation:
community.getk2.org/notes/Templating_in_K2

Create a item.php template override (components/com_k2/templates/default/item.php) and the edit to your hearts content. I'm not sure if there's a parameter for the item image lightbox but you can remove/comment the hyperlink that launches the pop-up located on line 202 (not forgetting the closing on line 204).

Overriding sw_sigpro.php template is another matter although it is doable. Plugin overrides are not possible in Joomla 1.5 so you'll need to get 'creative' with the source or create you own image gallery plugin.

Bonne chance

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

  • scyllar
  • scyllar's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 6 months ago #81081 by scyllar
Thanks a lot Bonne! You are right!

I overrided the item.php (by copying Joomla_Root_Directory/components/com_k2/templates/default folder to Joomla_Root_Directory/templates/My_Templates_Directory/html/com_k2/templates/) and removed the hyperlink tag. Now the lightbox is disabled.

At the moment it is OK for me to simply disable the built in lightbox. But I have noticed the modal engine called by default (media/system/css/modal.css & media/system/js/modal.js) to popup the lightbox. I don't know if there is way to override it :) though we can hack it directly.

Again thanks!

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

More
14 years 6 months ago #81082 by Steve Adams
Hi Scyllar,

New K2 documentation:
k2joom.com/docs

Thanks

Steve Adams

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

  • scyllar
  • scyllar's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 6 months ago #81083 by scyllar
Thank you Steve, that's great!

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

More
14 years 1 month ago #81084 by d3vlabs
it would be inhumane not to thank you. thank you kindly. worked like a charm.

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

More
13 years 3 months ago #81085 by innocence
Hi guys!

I´d like to disable the image lightbox function in just ONE (or more) K2 category. Is it possible?

 

Thanks in advance =)

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

More
13 years 3 months ago #81086 by Steve Adams
Hey Paul, you have a template override in place?

community.getk2.org/notes/Templating_in_K2

There's even a template comparison package, useful for keeping track of all your custom code:

community.getk2.org/forum/topics/k2-template-override-package

 

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

More
13 years 3 months ago #81087 by innocence
Thanks very much, Steve!

I´ll check it right now.


Steve Adams said:

Hey Paul, you have a template override in place?

community.getk2.org/notes/Templating_in_K2

There's even a template comparison package, useful for keeping track of all your custom code:

community.getk2.org/forum/topics/k2-template-override-package

 

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


Powered by Kunena Forum