Page 1 of 1

Upload File type and name

Posted: 04 Oct 2009, 17:14
by thezen
May be... it's my misunderstanding.
Does Phoca-Gallery accept only jpeg file?
When I upload non-jpeg file such as gif,png, Phoca Gallery shows error message in the control panel.
Then blank(or broken) picture is shown in the front gallery.
I think Phoca-Gallery should void non-jpeg file when it's uploaded.
Second, I think some people wanna upload same(or reviced) picture couple of times.
So renaming uploaded file to unique file name is convinient.
Therefore I added the code below in the file "/controllers/category.php" line 400.

if(strpos($file['name'],'.jpg')!==false){$file['name']=uniqid('p').'.jpg';} else{unlink($file['tmp_name']);}

Is this unnecessary? If Phoca-Gallery already has this function, please tell me proper way to use it.

I'm using v.2.5.8

Re: Upload File type and name

Posted: 04 Oct 2009, 21:30
by thezen
I've noticed that I was using PHP4, So I could make gif and png work after swicth to PHP5

Re: Upload File type and name

Posted: 05 Oct 2009, 15:13
by Jan
Hi, in Phoca Gallery you can use JPG, JPEG, GIF and PNG.

Jan

Re: Upload File type and name

Posted: 05 Oct 2009, 23:26
by thezen
Thank you Jan.
As I mentioned above, It worked after switch to PHP5.

And this is just my request, so don't mind about it.
But currently I've modified Phoca-Gallery little bet for my site like below.

1. automatic unique file name when upload.
2. integration with Vodes extention for pay-per-upload system.
(http://www.sakic.net/products/free_products/)
3. simple vote function (just vote or not like DIgg)

It would be great if this function is implemented in future release.
By the way, Are you guys going to support joomla 1.6(or already)?

Re: Upload File type and name

Posted: 06 Oct 2009, 13:31
by Jan
Yes, I am planning to support 1.6 but this will take some time as 1.6 (really stable) will be not ready so early.

Re: Upload File type and name

Posted: 06 Oct 2009, 19:06
by thezen
Sounds good!
Thank you.