Overlib display different size image than large image?

Phoca Gallery - image gallery extension
orangesparkz
Phoca Member
Phoca Member
Posts: 33
Joined: 11 Mar 2009, 22:41

Overlib display different size image than large image?

Post by orangesparkz »

Is it possible to have the overlib effect display a different size image than the large thumbnail?
What I had in mind is this: The gallery page displays the small thumbnails, when you rollover the images a slightly larger image is shown, perhaps double the small thumbnail size and then when you click on it to display the pop-up, you see the largest image.
What is happening is that when the rollover displays the large images they are too large and go off the side or below the browser window. :idea:
I know there is no option in the gallery parameters to select sizes to display. I really love the rollover image effect, but need to show the pop-up image larger than I can have the rollover image.
:?
Thanks so much for your help. This forum and your attention to helping everyone is amazing.
Cathy
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Overlib display different size image than large image?

Post by Jan »

Hi, there are 3 thumbnails in Phoca Gallery
- small
- medium
- large ... you can set the size of all thumbnail size types in parameters...

Medium images are displayed in boxes in Category View, and overlib displays large thumbnails ... you can change it in php code to small or medium. But I think it is not what you want. Because the small image will be to small and medium image will have the same size and standard listed thumbnail in Category View... So in fact you cannot get another size as only these 3 thumbnail sizes... you can change width and height atributes of image in php code, so e.g. large image will be displayed but instead of full large image will be displayed e.g. only 70% of the sizes... but this need to be hard coded, because it depends on size of your large thumbnail images :(

Jan
If you find Phoca extensions useful, please support the project
orangesparkz
Phoca Member
Phoca Member
Posts: 33
Joined: 11 Mar 2009, 22:41

Re: Overlib display different size image than large image?

Post by orangesparkz »

This code will change the following:
The category/gallery view will show small images
The overlib will show the medium image
The detail view will show large image
Setting the medium image for overlib:
components\com_phocagallery\views\category\tmpl\default.php
line:202(186)
Modify FROM:
str_replace ('phoca_thumb_m_','phoca_thumb_l_',$value->linkthumbnailpath)
TO:
$value->linkthumbnailpath

line:207(192)
Modify FROM:
str_replace ('phoca_thumb_m_','phoca_thumb_l_',$value->linkthumbnailpath)
TO:
$value->linkthumbnailpath

Setting the small images for category view
line: 215(199), 217(201):
Modify FROM:
$value->linkthumbnailpath
TO:
str_replace('phoca_thumb_m_','phoca_thumb_s_', $value->linkthumbnailpath);

-Curiosity of Jan
orangesparkz
Phoca Member
Phoca Member
Posts: 33
Joined: 11 Mar 2009, 22:41

Re: Overlib display different size image than large image?

Post by orangesparkz »

If you are having problems with the images not appearing in the box after you make the other edit try this. It should work perfectly! :twisted:

the code is located here:
components\com_phocagallery\views\category\tmpl\default.php

Code: Select all

on line: 164:
<div class="phocagallery-box-file" style="height:<?php echo $boxImageHeight; ?>px; width:<?php echo $boxImageWidth; ?>px">
on line: 166:
<div class="phocagallery-box-file-first" style="height:<?php echo $imageHeight; ?>px;width:<?php echo $imageWidth; ?>px;">

so you can hard code the height and width:
line: 164:
<div class="phocagallery-box-file" style="height:XXpx; width:XXpx">
line: 166:
<div class="phocagallery-box-file-first" style="height:XXpx;width:XXpx;">
For my settings I have the small image at 50px and to get them positioned right I used:

Code: Select all

line: 164:
<div class="phocagallery-box-file" style="height:88px; width:70px">
line: 166:
<div class="phocagallery-box-file-first" style="height:70px;width:70px;">
juliankrispel
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 18 May 2009, 12:01

Re: Overlib display different size image than large image?

Post by juliankrispel »

Hello

Thanks for this post and for the gallery. It is very flexible indeed!

I wanted to change the size of the overlib image and followed your instructions. However, the size of my thumbnails are not small, they are the same size as the overlib-image = medium. The category-thumbnails are small though. My question is, how can I change the thumbnail size to small other than medium?

Many thanks in advance
juliankrispel
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 18 May 2009, 12:01

Re: Overlib display different size image than large image?

Post by juliankrispel »

hello hello, I just wondered if I would still be able to get an answer to my question, no matter what I do, the thumbnails won't show up as small thumbnails, only medium :(
Post Reply