Modify the image module to point to Phoca Photo page

Phoca Photo - image gallery extension
OldLodgeSkins
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 15 Aug 2011, 10:25

Modify the image module to point to Phoca Photo page

Post by OldLodgeSkins » 18 May 2016, 16:56

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.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42627
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan » 21 May 2016, 16:55

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
If you find Phoca extensions useful, please support the project

OldLodgeSkins
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 15 Aug 2011, 10:25

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

Post by OldLodgeSkins » 22 May 2016, 12:39

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...

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42627
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan » 22 May 2016, 12:59

If you find Phoca extensions useful, please support the project

OldLodgeSkins
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 15 Aug 2011, 10:25

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

Post by OldLodgeSkins » 22 May 2016, 14:05

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.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42627
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan » 29 May 2016, 19:04

Ok
If you find Phoca extensions useful, please support the project

Post Reply