- Posts: 71
COMMUNITY FORUM
lightbox on image in category listings (optional)
- rexkramer
- Topic Author
- Offline
- Senior Member
Less
More
14 years 10 months ago #75589
by rexkramer
lightbox on image in category listings (optional) was created by rexkramer
Hello,
it seems the lightbox feature works in item full view. In category lists there is always a link to that full view. Can this be changed?
I would need a lightbox on the first image in category list view. The link to full view could b done with the readmore...
A dream would be an option for toggling this behavior :-) I remember the Joomla plugin MultiThunb, where you have the choice between: do nothing; link to fullview; open in lightbox.
TIA!!! !!!
(a temporary hack or override? is welcome, too)
it seems the lightbox feature works in item full view. In category lists there is always a link to that full view. Can this be changed?
I would need a lightbox on the first image in category list view. The link to full view could b done with the readmore...
A dream would be an option for toggling this behavior :-) I remember the Joomla plugin MultiThunb, where you have the choice between: do nothing; link to fullview; open in lightbox.
TIA!!! !!!
(a temporary hack or override? is welcome, too)
Please Log in or Create an account to join the conversation.
- rexkramer
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 71
14 years 10 months ago #75590
by rexkramer
Replied by rexkramer on topic lightbox on image in category listings (optional)
HACK or OVERRIDE
I am not a coder ;-) call me "copier and paster"
I tried to compare the templates item.php and category_item.php by myself. I found the important parts in the well-commented source and with help of firebug.
I can´t paste code here, right? I will try to describe the process:
Look for "Item Image" section... in item.php
Copy the whole A-tag of the SPAN CLASS "itemImage" from item.php
Look for "Item Image" section... in category_item.php
Paste or better replace the original A-tag after SPAN CLASS "catItemImage"
ATTENTION
I found one minor difference in both files. This command is written in two different ways:
php echo $this->item->image
php echo $this->item->$image
I seems to work in the original item.php
but in category_item.php it is used with $
Maybe this is not a real bug and both syntaxes are right in PHP, i don´t know.
Please correct me if this is wrong.
Anyway, it works beautifully.
Since this is more an Override, it would be great to have this as a BUILD-IN FEATURE with a TOGGLE PARAMETER.
I am not a coder ;-) call me "copier and paster"
I tried to compare the templates item.php and category_item.php by myself. I found the important parts in the well-commented source and with help of firebug.
I can´t paste code here, right? I will try to describe the process:
Look for "Item Image" section... in item.php
Copy the whole A-tag of the SPAN CLASS "itemImage" from item.php
Look for "Item Image" section... in category_item.php
Paste or better replace the original A-tag after SPAN CLASS "catItemImage"
ATTENTION
I found one minor difference in both files. This command is written in two different ways:
php echo $this->item->image
php echo $this->item->$image
I seems to work in the original item.php
but in category_item.php it is used with $
Maybe this is not a real bug and both syntaxes are right in PHP, i don´t know.
Please correct me if this is wrong.
Anyway, it works beautifully.
Since this is more an Override, it would be great to have this as a BUILD-IN FEATURE with a TOGGLE PARAMETER.
Please Log in or Create an account to join the conversation.
- sergey.s.zaika
- Offline
- New Member
Less
More
- Posts: 1
13 years 10 months ago #75591
by sergey.s.zaika
Replied by sergey.s.zaika on topic lightbox on image in category listings (optional)
Thank you, copier and paster.
For others:
just change in the category_item.php around a line 115
a href="%3C?php%20echo%20$this-">item->link; ?>" title="">
for
a class="modal" href="%3C?php%20echo%20$this-">item->imageXLarge; ?>" title="">
For others:
just change in the category_item.php around a line 115
a href="%3C?php%20echo%20$this-">item->link; ?>" title="">
for
a class="modal" href="%3C?php%20echo%20$this-">item->imageXLarge; ?>" title="">
Please Log in or Create an account to join the conversation.
- Sotiris
- Offline
- New Member
Less
More
- Posts: 6
10 years 8 months ago #75592
by Sotiris
Replied by Sotiris on topic Re: lightbox on image in category listings (optional)
In category_item.php in line 117 change in tag <a> this
Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 8 months ago #75593
by Yiota
Replied by Yiota on topic Re: lightbox on image in category listings (optional)
You might also need to add this
<?php JHTML::_('behavior.modal'); ?>
on top of the file categroy_item.php
<?php JHTML::_('behavior.modal'); ?>
on top of the file categroy_item.php
Please Log in or Create an account to join the conversation.