Phoca picasa category - no square thumb ??
-
rbuelund
- Phoca Professional

- Posts: 115
- Joined: 22 Mar 2015, 00:18
- Contact:
Phoca picasa category - no square thumb ??
I have set the medium size thumb to 260x260px - this works with "Normal" categories with pictures uploaded to the server, but not with a picassa imported category. The do get resized but not to squares ??
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca picasa category - no square thumb ??
Hi, try to see:
https://www.phoca.cz/documents/2-phoca-g ... web-albums
Picasa has own sizes for thumbnails, so it is good to make the sizes by the Picasa options.
Jan
https://www.phoca.cz/documents/2-phoca-g ... web-albums
Picasa has own sizes for thumbnails, so it is good to make the sizes by the Picasa options.
Jan
If you find Phoca extensions useful, please support the project
-
rbuelund
- Phoca Professional

- Posts: 115
- Joined: 22 Mar 2015, 00:18
- Contact:
Re: Phoca picasa category - no square thumb ??
Ok - will try to alter the settings in Picasa then.
Thanks
Thanks
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca picasa category - no square thumb ??
Ok
If you find Phoca extensions useful, please support the project
-
rbuelund
- Phoca Professional

- Posts: 115
- Joined: 22 Mar 2015, 00:18
- Contact:
Re: Phoca picasa category - no square thumb ??
But it does not look as if picasa can create square thumbnails - which actually is used in the design of the page ? What to do here ?
-
rbuelund
- Phoca Professional

- Posts: 115
- Joined: 22 Mar 2015, 00:18
- Contact:
Re: Phoca picasa category - no square thumb ??
I just found this in the picasa api documentation:
"The following values are valid for the thumbsize and imgmax query parameters and are embeddable on a webpage. These images are available as both cropped(c) and uncropped(u) sizes by appending c or u to the size. As an example, to retrieve a 72 pixel image that is cropped, you would specify 72c, while to retrieve the uncropped image, you would specify 72u for the thumbsize or imgmax query parameter values."
From: https://developers.google.com/picasa-we ... /reference
So maybe you should add an option to add the "c" character to the api call - to get square images returned ?
"The following values are valid for the thumbsize and imgmax query parameters and are embeddable on a webpage. These images are available as both cropped(c) and uncropped(u) sizes by appending c or u to the size. As an example, to retrieve a 72 pixel image that is cropped, you would specify 72c, while to retrieve the uncropped image, you would specify 72u for the thumbsize or imgmax query parameter values."
From: https://developers.google.com/picasa-we ... /reference
So maybe you should add an option to add the "c" character to the api call - to get square images returned ?
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca picasa category - no square thumb ??
Hi, added to the feature request list.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
rbuelund
- Phoca Professional

- Posts: 115
- Joined: 22 Mar 2015, 00:18
- Contact:
Re: Phoca picasa category - no square thumb ??
Has this been added as a feature yet ?
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca picasa category - no square thumb ??
Hi, I still didn't find time to take a look at this feature.
Will be great if you can pretest it:
administrator\components\com_phocagallery\models\phocagalleryc.php
line: cca 1383
function:
function picasaImages($user, $authkey, $albumId, $catid, $language, $pagination, &$errorMsg) {
if you go through this function, you will find the urls to the images - you can test to change it (add the suffixes)
Thank you, Jan
Will be great if you can pretest it:
administrator\components\com_phocagallery\models\phocagalleryc.php
line: cca 1383
function:
function picasaImages($user, $authkey, $albumId, $catid, $language, $pagination, &$errorMsg) {
if you go through this function, you will find the urls to the images - you can test to change it (add the suffixes)
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
rbuelund
- Phoca Professional

- Posts: 115
- Joined: 22 Mar 2015, 00:18
- Contact:
Re: Phoca picasa category - no square thumb ??
Ahaaa...well actually this feature is allready there !!
Line 73 to 88 in administrator/com_phocagallery/libraries/phocagallery/picasa/picasa.php
// Small Crop
if ($crop == 3 || $crop == 5 || $crop == 6 ||$crop == 7) {
$outputS = $outputS . 'c';
} else {
$outputS = $outputS . 'u';
}
// Medium Crop
if ($mediumT == 1) {
if ($crop == 2 || $crop == 4 || $crop == 5 ||$crop == 7) {
$outputM = $outputM . 'c';
} else {
$outputM = $outputM . 'u';
}
}
It just needs to be described somewhere! But with thumb size set to 160 px and "Crop thumbnails" set to "Small and medium" then this works perfectly !
Maybe a little description text about this on the Picasa Pane on the category would do ?
Line 73 to 88 in administrator/com_phocagallery/libraries/phocagallery/picasa/picasa.php
// Small Crop
if ($crop == 3 || $crop == 5 || $crop == 6 ||$crop == 7) {
$outputS = $outputS . 'c';
} else {
$outputS = $outputS . 'u';
}
// Medium Crop
if ($mediumT == 1) {
if ($crop == 2 || $crop == 4 || $crop == 5 ||$crop == 7) {
$outputM = $outputM . 'c';
} else {
$outputM = $outputM . 'u';
}
}
It just needs to be described somewhere! But with thumb size set to 160 px and "Crop thumbnails" set to "Small and medium" then this works perfectly !
Maybe a little description text about this on the Picasa Pane on the category would do ?