Module: Upload Approval Queue
Digitizit
Joined: 2013-07-05
Posts: 29 |
Posted: Thu, 2013-11-21 16:56 |
ADMIN EDIT: MODULE TEST FOUND HERE If you can develop a module, I'll pay you for it. The catch is that I need it within a month. Reply with you can do it. Thanks, Chris |
|
Posts: 814
What exactly are you looking for? There is also a forum for requests like these as well - Services
Posts: 29
I need to make all uploads go into an approval queue before they are visible in the album. I don't mind posting it in the other forum, but do you do module development? Is this something you could do?
Posts: 814
I think you may be able to accomplish this with a hidden album that has 'add' for everyone, but not 'view' except for admin. Then you could use the 'organize' module to move the approved photos to the appropriate album. I remember seeing a suggestion of something like this before, I'll have to dig around and see if I can find it.
Posts: 29
I played around with that, but it frustrated a lot of people. Uploads are available to the general public. Maybe I didn't do it "right"?
It has to be as simple as clicking "Upload", finding their file, and then clicking "Submit". Once I start asking them to upload to one album but show pictures in another... they will just get frustrated.
Posts: 27300
To get this right a very detailed use story is needed.
go into an approval queue before they are visible in the album is vaugue at best.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 29
I thought it was pretty descriptive, but I'll try to be more specific... There may be a better way to do this than what I spec out here.
Someone registers on the site. They then upload a photo. Perhaps they can see their photo, perhaps they just get a message saying their photo will be available once it has been approved. Either works fine for what we're doing. In the admin interface, there is a page with all the recent uploads that are awaiting admin approval. Next to each photo is a button/checkbox/whatever to either approve or reject the photo. An admin goes through and determines what gets approved and what gets rejected. Approved photos go into the public album for anyone and everyone to see. Rejected photos can either be deleted or put into a private folder only admins can see.
The goal of this is to eliminate pornographic content on what is a family friendly image gallery. The last time I turned the site on, it got a lot of traffic. I can't have pornographic content visible on there.
Posts: 814
Let's start the dialog then:
Module thought process:
1) Disable uploads to the public
2) On the sidebar, have an 'upload item for approval' (this can be displayed in each album for example so you know where the item is supposed to reside once approved)
2a) Does the user need to be registered to upload, or can guest upload as well? (should this be an option?)
3) The upload an item for approval 'hides' in an album that is -not viewable- to anyone
4) Add an option at the bottom of the item (in the hidden album) that allows admin to 'approve' it (therefore moving it to the appropriate album)
Further notes:
1) 'Add' must -not- be enabled for 'live albums' to the registered users
2) 'Add' must be enabled for the 'Approval Queue' album
3) 'View' must -not- be enabled for the 'Approval Queue' album
Posts: 29
That sounds like the right approach to me.
Users MUST register to upload. There should only be one album that users can see, whether they log in or not, and that is the album that contains the approved images. If there needs to be different albums to make the approval process work, that's perfectly fine as long as there is no option for people to click on an album and "get lost". It seems ridiculous, but it has happened.
Posts: 814
Just about done with the framework...
The module will provide a sidebar block that will have an 'upload for approval' button that will allow the user to select the photo(s) they want to upload
- The button will only show for registered users
- will show in each album the user has view access to
- this way if you have multiple albums, and a user wants to upload to a specific album, they can (even though it will go in to the approval queue album until approved)
- The uploaded photo(s) will be uploaded to the 'approval queue' folder which will only be visible to the admin of the gallery
- The admin can browse in the 'approval queue' folder and for each photo, an option will be provided to approve the photo
- Once admin approves a photo, it is automatically moved to the album from which the user original uploaded to (even though it went in to the approval queue album)
Does this sound about right and makes sense?
Posts: 29
That sounds great! I'm anxious to see the first beta and give it a test run!!
Posts: 814
I think I have everything wrapped up for the initial release...
All admin/install stuff completed...
Testing out final and should release tomorrow.
Sample screenshots to follow
Posts: 29
That's great news! I look forward to testing it out!
Posts: 814
Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 4
Screenshot 5
Posts: 29
Epic! That looks great!!! This will be a huge help!
Posts: 814
Give it a shot, remember, this is -initial- (If anyone looks at the code, I hope your eyes bleed! I joke... remember, I'm not a coder!)
Approval Queue Module
Posts: 37
Suggestion to add input fields for title, description, tags before upload. And input field for comment/message to the admin.
____________________________
Gallery 3.0.8 | Clean Canvas theme
Posts: 814
Good suggestions. I'll see what I can do for the next update, once this gets tested a bit and confirmed working well.
Posts: 29
I got it installed and running. It looks great! The only issue I have is that, as a regular user, I can't seem to get the upload window. As admin, it pops up and everything is fine. Maybe I'm doing something wrong?
Posts: 814
Good catch - fix will be up in a sec, along with some minor changes.
Added ability to add description and comment for admin on upload form (tags may come later, but I don't want to redo the form (which I have to) right now until all is tested)
Posts: 29
I got v2, but still can't get the upload for regular users. I can see the extra fields when I upload as an admin. Those are great!!
Posts: 814
Okay, v2 uploaded give this a shot
Posts: 814
I jumped the gun - look up and get the v2 there...
Posts: 29
The link to upload has not completely disappeared for regular users. Admin can still see it and it still seems to work.
Posts: 814
Hmmm, hold one...
Think I may have missed something
Posts: 29
Right. As an admin, I see it all. If I open a different browser and log in as a normal user, I don't see the upload link. I did see it with v1, but when I clicked it, it never gave me the upload window.
Posts: 814
Allrighty, let's give this a try:
v3
Posts: 29
That worked! I can now see it as a regular user and the link opens the upload dialog. The upload worked, but the dialog box did not close. That's not the biggest deal, but I think it will confuse people.
Posts: 29
Also, I just noticed, when I approve the photo, the dialog box that comes up is blank. I assume I can just move the photo from that album into the main, which isn't a problem.
Posts: 29
Ah, okay... I see what has happened on the upload. It actually wants to download the .json file that says "success" after it successfully uploads.
Also, the admin approval appears to be working now. I must have had something stuck in cache.
Posts: 814
Hmmm, shouldn't be blank, and no, don't just move it... it will confuse the database later
On both dialogs it's not returning to the album? And on the approval dialog, it's blank?
What browser are you using? I can't reproduce this.
Posts: 29
Sorry, I posted that before really trying everything on my side. I got the approval working. It does everything it should. It's great!!! That worked beautifully.
The only issue I can't get around yet is Chrome (and IE) prompting to save the .json file that is the success message.
Posts: 814
Hmmm, I can't reproduce that in IE or Chrome. Once uploaded, it refreshes back to the album with a success message up top saying "Added One photo for approval."
I've tested in Safari, Firefox, IE and Chrome. (The success json is just like all other dialogs, so I'm not sure why that's happening to you)
If you're familiar with the database, try emptying the 'caches' table...
Also, have you turned on error_reporting? If you don't know the answer, don't worry about it.
Posts: 29
Perfect! That did the trick! This is REALLY going to help out. Amazing work!
Posts: 814
Good to hear! Please keep me posted on it's use and effectiveness... I sort of rushed out some things in this, and it's ugly, ugly code... I'll spend more time refining it once I know it's working well.
Thanks!
Dave. if you're reading this, can you create a codex page? Thanks, James
Posts: 37
I tested the module today. It' not working for me.
Have same problems as Digitizit mentioned:
- The upload worked, but the dialog box did not close.
- when I approve the photo, the dialog box that comes up is blank.
Do we need to specify Album where will approved photos go?
I deleted Approval-queue album, and deactivated modul, then activated modul, and approval-queue album does not appear. I can still upload a photo, it looks like that is working, but where the hell is it? Where is uploaded photo?
I think I broke it.
While it was still working, when I go to Approval-queue album and click on a photo, title and description doesn't show up. Same for comment for admin.
____________________________
Gallery 3.0.8 | Clean Canvas theme
Posts: 814
Make sure you grabbed the latest version a few posts up (v3)
I'm not able to reproduce any of the issues you've mentioned.
If you're logged in as admin, and there is an issue with any of the settings, it will automatically take you to the admin page to have them fixed for you.
If you're using v3, try emptying the cache table in the database. For some reason it seems if you had an older version installed, it cached those pages and doesn't pull the new ones.
Posts: 29
One thing I had to do, and it could just have been me, was toggle the permissions off and on again. I did that first thing, and everything after that was good.
Posts: 27300
http://codex.galleryproject.org/Gallery3:Modules:approval_queue
I have yet to try it out. Just moved so renos and unpacking still.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 814
Thank you kind sir!
Posts: 814
v4 uploaded - only to fix an initial install bug fix. No need to upgrade if you have it installed already...
Posts: 814
Found an issue with permissions settings on some installs - reworking and will send up new version soon.
Posts: 814
okay, v5 - initial release
If you've installed this previously, you should upgrade for sure to this version...
Posts: 27300
Finally got round to looking at this.
Coding looks fine and you have done some stuff that is impressive so don't kid yourself.
When I tried to activate the module (5) for the first time I got a error and the checkbox on the modules page would not stick.
I think it is this bit of code:
is the culprit as I removed it and the module activated properly. The table was already created so I don't know why this bit of code did not see the table that was created.
Anyway I have no time to test further at this time.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 29
I see the same issue. I didn't remove any code, though. I'll await further investigation. Nash, did you get my PM?
Posts: 814
I think I might know why this is...
Do you guys have table prefixes on in Gallery?
if so, I can add the table prefix code in to the query... (I keep forgetting about the table prefixes)
Posts: 29
I do.
Posts: 27300
Yes.
Good catch!
Dave_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 814
Okay, working it. Trying to figure out what boo boo I made on the upload right now...
New version coming soon.
Posts: 814
Okay, v6 now up. Think I have those two pesky bugs worked out...
1) I fixed the appq db search to account for table prefixes
2) I reverted a 'test setting' that caused a bug on uploading to say nothing uploaded...
Posts: 37
Module is working great.
Now we need to wait for Gallery 3.1 so the users can edit their own pics.
"For speed, code complexity, upgrade-ability and other considerations, we went with a per album permissions approach and not a per item.
Dave"
Allow user to edit and delete their own pics
"If you want/need to keep that same structure, you'll need to stick with G2 for now. Keep an eye on G3, the permissions system is in for big changes for 3.1 "
how can a user change his own Picturs bot nothing else
____________________________
Gallery 3.0.8 | Clean Canvas theme