Check user upload image

Phoca Gallery - image gallery extension
popvertigo
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 09 Sep 2008, 10:51
Location: Italy

Check user upload image

Post by popvertigo »

( Sorry for my english )

It's possible to control and after publish the images that user upload / send to frontend?

Thanks
hiaz0r
Phoca Member
Phoca Member
Posts: 10
Joined: 07 Sep 2008, 14:07
Location: Germany

Re: Check user upload image

Post by hiaz0r »

At this time it´s not possible to moderate user uploaded images. I changed my source code in this way that uploaded pictures from registred users are automaticaly "unpublished". So a admin has to publish the files.

My way is only a workaround. I´m intrested in clear moderation solution too!

Cheers

Hiaz0r
popvertigo
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 09 Sep 2008, 10:51
Location: Italy

Re: Check user upload image

Post by popvertigo »

hiaz0r wrote:At this time it´s not possible to moderate user uploaded images. I changed my source code in this way that uploaded pictures from registred users are automaticaly "unpublished". So a admin has to publish the files.

My way is only a workaround. I´m intrested in clear moderation solution too!

Cheers

Hiaz0r
Cool idea,can you send me the php-code for this "hack" and/or the name of file that you have changed.
Thanks in advance
dbanrman
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 04 Nov 2008, 07:56

Re: Check user upload image

Post by dbanrman »

First of all I would like to Thank You for this geat contribution and all the users that respond to the questions that us newbies have. :twisted:

I am very interested in the workaround mentioned in the previous post. I would love to have users submit photos but do not want the images to be published by default. I run a community site and want to check pictures before they are available to the public.

If someone could advise on which file and what part of the file that would need to be changed to default uploaded images to unpublished that would be great.

Thanks in advance,

dbanrman
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Check user upload image

Post by Jan »

hi, this feature is planned... but maybe it will be good to know the hiaz0r's solution for now...

my plan:
- set in parameters if publish or unpublish
- email if someone added image

I hope I find time for this solution soon... first all modules and plugins need to be reworked for version 2 :-(

Jan
If you find Phoca extensions useful, please support the project
dbanrman
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 04 Nov 2008, 07:56

Re: Check user upload image

Post by dbanrman »

Yes it would be nice to know the solution but for now I will enjoy this extention and all it great features as is.

Thank You for all your hard work and the quick response.

:twisted:

dbanrman
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Check user upload image

Post by Jan »

:wink:
If you find Phoca extensions useful, please support the project
reko
Phoca Professional
Phoca Professional
Posts: 407
Joined: 29 Dec 2008, 22:06

Re: Check user upload image

Post by reko »

you can change this in the components/com_phocagallery/controler.php-file on or around line 634:

Code: Select all

$post['published'] = 1;
simply change 1 to 0.

but then you'll get this message:
Your category is unpublished, please contact website administrator
I have not yet figured out a way to add images to unpublished categories from the frontend...
I'll post it when I do.

edit: to be able to upload pictures (from frontend) to unpublished category you have to modify the default_upload.php -file in the components/com_phocagallery/views/user/tmpl/ - folder. the message mentioned above still appears in the category-tab. if you'd also like to remove it there (or change the message-text) change the default_category.php -file acordingly.
(you can use template overrides for both)

just delete the following code near the top of the file

Code: Select all

if ($this->tmpl['categorypublished'] == 0) {
	echo '<p>'.JText::_('Your category is unpublished').'</p>';
	} else {
don't forget to delete the corresponding closing "}" further down.

/rk
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Check user upload image

Post by Jan »

ok
If you find Phoca extensions useful, please support the project
Post Reply