Random pic size
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Hi, there is no poss
Hi, there is no possibility to resize the size in the module yet
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 27 Apr 2009, 17:06
Re: Random pic size
is it still the case that you cannot change the size of the random picture?
Thanks
Thanks
-
- Phoca Newbie
- Posts: 5
- Joined: 13 May 2009, 20:53
Re: Random pic size
Here is my method ( if you want to use it, you do it on your risk )
You have to open 'modules/mod_phocagallery_random_image/mod_phocagallery_random_image.php' and change some lines. I wanted size 150x150px and I had change:
to:
and
to
and
to
I'am not sure do you have to change so much but it works!
And one more thing - you have to change the size of the phocagallery shadow: shadow2.png and shadow2.gif from 200px X 200px to yourwidth X yourheight. You would find this images in 'components/com_phocagallery/assets/images/'
You have to open 'modules/mod_phocagallery_random_image/mod_phocagallery_random_image.php' and change some lines. I wanted size 150x150px and I had change:
Code: Select all
$imageWidth = 100;
$imageHeight = 100;
$imageWidthBg = 100;
$imageHeightBg= 100;
$boxImageHeight = 100;
$boxImageWidth = 120;
Code: Select all
$imageWidth = 150;
$imageHeight = 150;
$imageWidthBg = 150;
$imageHeightBg= 150;
$boxImageHeight = 150;
$boxImageWidth = 170;
Code: Select all
if ($width > $height)
{
if ($width > 100)
{
$imageWidth = 100;
$rate = $width / 100;
$imageHeight = $height / $rate;
}
else
{
$imageWidth = $width;
$imageHeight = $height;
}
}
else
{
if ($height > 100)
{
$imageHeight = 100;
$rate = $height / 100;
$imageWidth = $width / $rate;
}
else
{
$imageWidth = $width;
$imageHeight = $height;
}
}
Code: Select all
if ($width > $height)
{
if ($width > 150)
{
$imageWidth = 150;
$rate = $width / 150;
$imageHeight = $height / $rate;
}
else
{
$imageWidth = $width;
$imageHeight = $height;
}
}
else
{
if ($height > 150)
{
$imageHeight = 150;
$rate = $height / 150;
$imageWidth = $width / $rate;
}
else
{
$imageWidth = $width;
$imageHeight = $height;
}
}
Code: Select all
if ( $image_background_shadow != 'none' ) {
$boxImageHeight = $boxImageHeight + 18;
$imageWidthBg = 118;
$imageHeightBg = 118;
}
Code: Select all
if ( $image_background_shadow != 'none' ) {
$boxImageHeight = $boxImageHeight + 18;
$imageWidthBg = 168;
$imageHeightBg = 168;
}
And one more thing - you have to change the size of the phocagallery shadow: shadow2.png and shadow2.gif from 200px X 200px to yourwidth X yourheight. You would find this images in 'components/com_phocagallery/assets/images/'
-
- Phoca Member
- Posts: 11
- Joined: 13 May 2009, 00:51
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Random pic size
Ok. Solved.
majkel
Thank you for this guide.
Jan
majkel
Thank you for this guide.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 13 May 2009, 20:53
Re: Random pic size
I'm glad, that I could help
-
- Phoca Member
- Posts: 10
- Joined: 08 May 2009, 00:44
Re: Random pic size
Hi,
I tried this and came up with this:
Any idea what I did wrong? Or do I need to recreate thumbnails?
Thanks,
Eric
I tried this and came up with this:
Any idea what I did wrong? Or do I need to recreate thumbnails?
Thanks,
Eric
-
- Phoca Newbie
- Posts: 5
- Joined: 13 May 2009, 20:53
Re: Random pic size
With what?fairwea1 wrote:Hi,
I tried this and came up with this:
Any idea what I did wrong? Or do I need to recreate thumbnails?
Thanks,
Eric
-
- Phoca Member
- Posts: 10
- Joined: 08 May 2009, 00:44
-
- Phoca Newbie
- Posts: 5
- Joined: 13 May 2009, 20:53
Re: Random pic size
There are 3 posibilities.
1. You didn't change the graphics with the shadows.
2. You changed the graphics with the shadows but you have bad settings in the panel
3. You made some changes in CSS file(s) which give you this effect.
If you did everything as I wrote, you shouldn't have any problems.
Sorry for my english
1. You didn't change the graphics with the shadows.
2. You changed the graphics with the shadows but you have bad settings in the panel
3. You made some changes in CSS file(s) which give you this effect.
If you did everything as I wrote, you shouldn't have any problems.
Sorry for my english