Edit and delete posts.
-
Hi,
I have a question whether the latest version of the Plugin was able to allow “non-logged in users” to edit or delete their posts? Almost a year ago, you mentioned that you will soon launch in future versions. I am very waiting for this function to be included in the plugin.
Thank you !!!
-
Hi,
sorry, unfortunately, this feature turned out to be much more difficult to develop then i expected, especially in terms of security (when it comes to managing file attachments) and some other updates with higher priority got in the way.I still have this feature in mind and the last two updates added the functionality which should allow us to finally have it.
That being said i did not know you are still waiting for this, so please give me a week, while i will not add it to WPAdverts itself i will create a snippet with this functionality (so you could use it as a beta feature), and later i will integrate with WPAdverts after some additional testing.
Does this sound good?
Hi,
Well this sounds good. Thank you for the beta update version.
Kind regards.
Hi,
ok, great, i will post here an update next week.Hi,
Thanks. have a good time !!!
Hi @chauthong,
the snippet which allows editing the Ads by anonymous users you can find here https://github.com/simpliko/wpadverts-snippets/blob/master/anon-edit/anon-edit.php, how to install it please read here https://github.com/simpliko/wpadverts-snippets/ at the bottom of the page.It will work best with the Emails module https://wpadverts.com/documentation/emails/, specifically in the email sent to user on Ad publication you can add the following text in the body
You can edit your Ad here {$advert|my_advert_edit_url}The {$advert|my_advert_edit_url} will be replaced with a link containing Ad id and secret code.
Please note that due to lack of time i could not do much testing, so before allowing your users to take advantage of it please double check if it works properly.
Hi Greg Winiarski,
Thank you for this update. I will try this and will notify you if there is any problem. Have a good day !!!
Best regards.
Hi Greg Winiarski,
Everything works well. But users can only edit their posts, not delete them. Is there any way to add post removal permission to this function?
Thank you!!
Hi,
hmm it is possible to add it, this week will be quite busy, but i will add this functionality to this code snippet by the end of this week.Hi Greg Winiarski,
Thank you for the update. This function is very useful when the site uses a cache plugin and there is no need to use additional login/registration page plugins. When clearing cache with logged in members, the loading speed without cache of other websites is slow. Have a good time.
Thank you.
Hi @chauthong,
i added the functionality which allows annonymous users to delete the Ads, please upload the anon-edit.php snippet to add ithttps://github.com/simpliko/wpadverts-snippets/blob/master/anon-edit/anon-edit.php
Hi Greg Winiarski,
Great! Thanks, Have a nice weekend.
Hi Greg Winiarski,
It seems that the function of deleting and editing posts when users do not need to log in is no longer working as before. How to fix it?
Thanks
Hi,
can you send more details? that is what does not work exactly? I am testing the Anon Edit snippet and it seems to be working fine for me?Hi Greg Winiarski,
After posting and getting approval by administrator. The user receives an email with a link to edit or delete the post. but when they click on that link, they get the message “You do not own this Ad.” If they click on the “delete now” link they will also receive a similar message “Post you are trying to delete does not belong to you.”
(Screenshot: https://imgur.com/FQiGeF3)
Please take a look through this issue.Thank you.
Hi,
any chance the Ad is assigned to some user? or that you are trying to view this page while logged in?The “You do not own this Ad.” message would show only if the
$post->post_author != get_current_user_id(), that is when annon user tries to edit Ad assigned to some user or logged in user tries to edit Ad not assigned to him.
The topic ‘Edit and delete posts.’ is closed to new replies.