#1
|
||
|
phAlbum proportions
Hos do you change the thumbnails to be proportionate? So that long and wide images aren't forced into the same dimensions?
|
#2
|
||
|
While it is possible this version of phAlbum can't do it without some code modifications.. i'm not at home right now so I can't post some code. I'll try to remember to post it when I get back.
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#3
|
||
|
is there a fix for this?
To make a thumb with a fixed width but height to be variable according to the original. Thanks in advanced |
#4
|
||
|
Darn! I could help you to but the code is at home!
You could something like this: Code:
function image_resize($iImage, $allowedwidth, $allowedheight) { list($width, $height, $type, $attr) = getimagesize($iImage); if($width > $allowedwidth || $height > $allowedheight) { if ($width > $height) { $offset = $width / $allowedwidth ; if ($offset<=1) { $offset = $width - $allowed; $newimagewidth =$width - $offset; $newimageheight =$height - $offset; } else { $newimagewidth =$width / $offset; $newimageheight =$height / $offset; } } elseif ($width < $height) { $offset = $height / $allowedwidth ; if ($offset<=1) { $offset = $height - $allowed; $newimagewidth =$width - $offset; $newimageheight =$height - $offset; } else { $newimagewidth =$width / $offset; $newimageheight =$height / $offset; } } }
__________________
Last edited by atholon; 03-05-2008 at 10:44 AM. |
#5
|
||
|
did anyone get this code?`please PM me!
|
#6
|
||
|
I've need too of the code to phalbum with resize thumbs in proportion.
But the code upon don't work. Please post a right version. I think it is util to many user. Thanx |
#7
|
||
|
any updates to this?
|
#8
|
||
|
guess not. looks like this forum may be dead.
|
#9
|
||
|
Try this...
Right Before line 318, before this line: PHP Code:
PHP Code:
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#10
|
||
|
no, the thumbs get progressively smaller as they load.
|
#11
|
||
|
Alright.. I took a little bit of time and tested it.. you'll have to download the modified file though as I've made to many changes to document here. This one should work with proportions properly, as well as be compatible with php 5.3.x
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#12
|
||
|
one more idea, is there any way to have the picture clicked to popup in the same window? Maybe the use of java or something?
|
#13
|
||
|
Like a light box window?
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#14
|
||
|
Yea, just so that it doesn't open a new "window". One with a left right arrow would be great! I'm no coder just helping out a family member.
|
#15
|
||
|
Well right now I don't have alot of spare time to add things like to to phAlbum but i'm sure adding a jquery lightbox wouldn't be to difficult even for a non coder. You should do a search for jquery lightbox.
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#16
|
||
|
got it working 1/2 way, just adds the lightbox to the bottom of the page....
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
phAlbum | corny | phphq.Net Forums | 0 | 03-11-2009 10:21 AM |
phAlbum | billian | phphq.Net Forums | 5 | 09-24-2008 03:49 PM |
phalbum error | liamdawe | phphq.Net Forums | 1 | 12-09-2007 04:05 PM |
PhAlbum | tazz0710 | phphq.Net Forums | 2 | 12-07-2007 10:55 AM |
phAlbum | tazz0710 | phphq.Net Forums | 9 | 10-26-2007 12:28 AM |