Upload File type and name

Phoca Gallery - image gallery extension
thezen
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Oct 2009, 16:54

Upload File type and name

Post 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
thezen
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Oct 2009, 16:54

Re: Upload File type and name

Post by thezen »

I've noticed that I was using PHP4, So I could make gif and png work after swicth to PHP5
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Upload File type and name

Post by Jan »

Hi, in Phoca Gallery you can use JPG, JPEG, GIF and PNG.

Jan
If you find Phoca extensions useful, please support the project
thezen
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Oct 2009, 16:54

Re: Upload File type and name

Post 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)?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Upload File type and name

Post 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.
If you find Phoca extensions useful, please support the project
thezen
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Oct 2009, 16:54

Re: Upload File type and name

Post by thezen »

Sounds good!
Thank you.
Post Reply