- Posts: 60
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Any clues to change or disable the built in lightbox function?
Any clues to change or disable the built in lightbox function?
- scyllar
-
Topic Author
- Offline
- Senior Member
Less
More
15 years 2 weeks ago #81079
by scyllar
Any clues to change or disable the built in lightbox function? was created 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.
- Steve Adams
-
- Offline
- New Member
Less
More
- Posts: 7
15 years 2 weeks ago #81080
by Steve Adams
Replied by Steve Adams on topic Any clues to change or disable the built in lightbox function?
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
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
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 60
15 years 2 weeks ago #81081
by scyllar
Replied by scyllar on topic Any clues to change or disable the built in lightbox function?
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!
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.
- Steve Adams
-
- Offline
- New Member
Less
More
- Posts: 7
15 years 2 weeks ago #81082
by Steve Adams
Replied by Steve Adams on topic Any clues to change or disable the built in lightbox function?
Please Log in or Create an account to join the conversation.
- scyllar
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 60
15 years 2 weeks ago #81083
by scyllar
Replied by scyllar on topic Any clues to change or disable the built in lightbox function?
Thank you Steve, that's great!
Please Log in or Create an account to join the conversation.
- d3vlabs
-
- Offline
- Junior Member
Less
More
- Posts: 31
14 years 8 months ago #81084
by d3vlabs
Replied by d3vlabs on topic Any clues to change or disable the built in lightbox function?
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.
- innocence
-
- Offline
- New Member
Less
More
- Posts: 16
13 years 9 months ago #81085
by innocence
Replied by innocence on topic Any clues to change or disable the built in lightbox function?
Hi guys!
I´d like to disable the image lightbox function in just ONE (or more) K2 category. Is it possible?
Thanks in advance =)
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.
- Steve Adams
-
- Offline
- New Member
Less
More
- Posts: 7
13 years 9 months ago #81086
by Steve Adams
Replied by Steve Adams on topic Any clues to change or disable the built in lightbox function?
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
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.
- innocence
-
- Offline
- New Member
Less
More
- Posts: 16
13 years 9 months ago #81087
by innocence
Replied by innocence on topic Any clues to change or disable the built in lightbox function?
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
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.
- Forum
- K2 Community Forum
- English K2 Community
- Any clues to change or disable the built in lightbox function?