Page 1 of 2

Hi, there is no poss

Posted: 09 Jun 2008, 10:36
by Jan
Hi, there is no possibility to resize the size in the module yet

Jan

Re: Random pic size

Posted: 27 Apr 2009, 17:09
by susa
is it still the case that you cannot change the size of the random picture?
Thanks

Re: Random pic size

Posted: 13 May 2009, 21:18
by majkel
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:

Code: Select all

$imageWidth 	= 100;
$imageHeight	= 100;
$imageWidthBg = 100;
$imageHeightBg= 100;
$boxImageHeight = 100;
$boxImageWidth = 120;
to:

Code: Select all

$imageWidth 	= 150;
$imageHeight	= 150;
$imageWidthBg = 150;
$imageHeightBg= 150;
$boxImageHeight = 150;
$boxImageWidth = 170;
and

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;
				}
			}
to

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;
				}
			}
and

Code: Select all

		if ( $image_background_shadow != 'none' ) {
			$boxImageHeight = $boxImageHeight + 18;
			$imageWidthBg 	= 118;	
			$imageHeightBg	= 118;
		}
to

Code: Select all

		if ( $image_background_shadow != 'none' ) {
			$boxImageHeight = $boxImageHeight + 18;
			$imageWidthBg 	= 168;	
			$imageHeightBg	= 168;
		}
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/'

Re: Random pic size

Posted: 03 Jun 2009, 00:11
by PhyTonX
thanks it works :)

Re: Random pic size

Posted: 03 Jun 2009, 00:25
by Jan
Ok. Solved.

majkel
Thank you for this guide.

Jan

Re: Random pic size

Posted: 12 Jun 2009, 18:55
by majkel
I'm glad, that I could help :)

Re: Random pic size

Posted: 28 Jun 2009, 15:32
by fairwea1
Hi,

I tried this and came up with this:

Any idea what I did wrong? Or do I need to recreate thumbnails?

Thanks,
Eric

Re: Random pic size

Posted: 28 Jun 2009, 15:56
by majkel
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
With what?

Re: Random pic size

Posted: 28 Jun 2009, 16:10
by fairwea1
Sorry about that:

http://anviledge.com/

Re: Random pic size

Posted: 28 Jun 2009, 16:36
by majkel
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 ;)