Before I modify any code and create future headaches for myself when updating, I wanted to know if there is an existing way to change the behaviour of the bxslider module to display the image using shadowbox when a user clicks on it... I can only see how to change the link on the image. Currently this is set to No Link, but when clicking on the image it reloads the current page.
I'd prefer to have a zoomed-in version of the image displayed.
Thanks.
Adapt Slideshow bxSlider to use shadowbox when clicked
-
neillsun
- Phoca Member

- Posts: 10
- Joined: 23 Nov 2014, 22:59
- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Adapt Slideshow bxSlider to use shadowbox when clicked
Hi, the slider module does not include any method to display images in popup, it is just a link e.g. to category so this needs to be customized directly in the code 
Jan
Jan
If you find Phoca extensions useful, please support the project
-
neillsun
- Phoca Member

- Posts: 10
- Joined: 23 Nov 2014, 22:59
Re: Adapt Slideshow bxSlider to use shadowbox when clicked
Thanks Jan. this is what I ended up doing:Jan wrote: 02 Sep 2018, 01:13 Hi, the slider module does not include any method to display images in popup, it is just a link e.g. to category so this needs to be customized directly in the code :idea:
Jan
Code: Select all
//===============Modified code to turn Single Link into Shadowbox link=================
if ($single_link!='' || $single_link=='') { //i.e. ignore the value of this field
//$imageLink = PhocaGalleryFileThumbnail::getThumbnailName($v->filename, 'large');
$imageLink = PhocaGalleryFile::getFileOriginal($v->filename, 1);
//printf($imageLink);
//$urlLink = JURI::base(true).'/'.$imageLink->rel;
$urlLink=$imageLink;
$rel = 'shadowbox';
}Code: Select all
//Add Shadowbox functionality
$document->addScript(JURI::base(true).'/components/com_phocagallery/assets/shadowbox/shadowbox.js');
JHTML::stylesheet('components/com_phocagallery/assets/shadowbox/shadowbox.css' );
$document->addScriptDeclaration('
Shadowbox.init();
');- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Adapt Slideshow bxSlider to use shadowbox when clicked
Ok, thank you for the info.
Jan
Jan
If you find Phoca extensions useful, please support the project