Page 1 of 1

Modify the image module to point to Phoca Photo page

Posted: 18 May 2016, 16:56
by OldLodgeSkins
Hi,

I'm trying to find a way to modify the Phoca Gallery image module to point to the Phoca Photo page (in nopopup mode) instead of the Phoca Gallery page... I'm guessing it should just be a matter of changing the way the link is being generated and I'm pretty sure it's in mod_phocagallery_image.php around line 781 or so... But I'm just not capable of modifying that code properly myself. Any suggestion ?

Thanks.

Re: Modify the image module to point to Phoca Photo page

Posted: 21 May 2016, 16:55
by Jan
Hi,

first the router library of Phoca Photo should be included in the code
administrator\components\com_phocaphoto\helpers\route.php
and then the links should be changed - from Phoca Gallery - to Phoca Photo:

e.g.: from:

Code: Select all

PhocaGalleryRoute::getImageRoute(...
to:

Code: Select all

PhocaPhotoRoute::getImageRoute(...
Jan

Re: Modify the image module to point to Phoca Photo page

Posted: 22 May 2016, 12:39
by OldLodgeSkins
Thanks for the help Jan, but finally this morning I decided to go back to Phoca Gallery...
I tried Phoca Photo because Phoca Gallery didn't display too well on mobiles in my opinion. But then I hadn't tried it in no popup mode... With just a little bit of CSS to adjust the picture's size to various screen sizes, it works just fine.

In case anyone needs to do the same, here's what I did to adjust the picture's size on mobiles...

Code: Select all

@media (max-width:480px){
.responsive img.pg-detail-image, .responsive div#phocaGalleryImageBox {
  max-width: 300px!important;
}
}

@media (max-width:680px) and (min-width: 481px){
.responsive img.pg-detail-image, .responsive div#phocaGalleryImageBox {
  max-width: 550px!important;
}
}
This works fine on my phone. But I don't have any tablet so I'm not too sure what resolutions should be used. I'll find someone with a tablet and find out, no big deal...

Re: Modify the image module to point to Phoca Photo page

Posted: 22 May 2016, 12:59
by Jan

Re: Modify the image module to point to Phoca Photo page

Posted: 22 May 2016, 14:05
by OldLodgeSkins
Nice... But it doesn't seem to have any effect on the no popup mode, which I want to continue using, because it lets me link directly to a picture and have comments on each picture as well. I think I'm fine with the minor CSS changes I made.
Thank you.

Re: Modify the image module to point to Phoca Photo page

Posted: 29 May 2016, 19:04
by Jan
Ok