Skip Navigation

[Resolved] Images approving system

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 1 year, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2528827

Tell us what you are trying to do?
I need help creating, if possible, an image approving system. I know Toolset does not provide such thing "out of box" but maybe there is tiny possibility that it can be done without custom coding. But I might need help on the logic part.

Is there any documentation that you are following?
Example #3 - https://toolset.com/2022/02/3-non-obvious-applications-of-post-relationships-in-wordpress/

Images being the Child Post of Information Parent Post
https://toolset.com/forums/topic/can-i-create-a-client-approval/

Is there a similar example that we can see? None that I know of.

What is the link to your site?
hidden link

So here is what I was thinking. Creating two Post Types (Information and Images) and linking them with a one-to-one so only the author can see his/her own information and images.

Now the forms:
1 form for the information
1 or 2 forms for the images (this is where I am not sure how it will go)

Why do I say 1 or 2 forms for images? Because if there is 1 form, then when the author decides to change the images, two things can happen:
1) He/she would be able to change the images and the images would be uploaded without approval. This is dangerous because authors can be malicious and upload naked pics, gross pics, etc. Not everyone is nice.
2) If the form is set for pending review, then the images that were already approved would not show up for the visitors of the site to see, which is not good either.

Now if we have two images forms, one called pending and the other called approved, maybe there is a way to link them where the user can upload the images in the pending form, then after admin approves, those images are sent to the approved form and replace the existing ones.

So I need help from the big brain of the support team to get this done. How can we get this done?

#2530051

Hello,

One-to-one relationship won't fulfill your request, if the user edited image post, it won't display the old image too.

In my opinion, you can consider one-to-many relationship between "information" and "image" post types.
1) In the single information post, display only one of the latest and related "Published" image post
2) After user edit image post, admin user approve it, use custom codes to trash/delete other brother image posts

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.