• 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 !!!

Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    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?

    Thread Starter chauthong

    (@chauthong)

    Hi,

    Well this sounds good. Thank you for the beta update version.

    Kind regards.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    ok, great, i will post here an update next week.

    Thread Starter chauthong

    (@chauthong)

    Hi,

    Thanks. have a good time !!!

    Plugin Author Greg Winiarski

    (@gwin)

    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.

    Thread Starter chauthong

    (@chauthong)

    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.

    Thread Starter chauthong

    (@chauthong)

    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!!

    Plugin Author Greg Winiarski

    (@gwin)

    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.

    Thread Starter chauthong

    (@chauthong)

    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.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi @chauthong,
    i added the functionality which allows annonymous users to delete the Ads, please upload the anon-edit.php snippet to add it

    https://github.com/simpliko/wpadverts-snippets/blob/master/anon-edit/anon-edit.php

    Thread Starter chauthong

    (@chauthong)

    Hi Greg Winiarski,

    Great! Thanks, Have a nice weekend.

    Thread Starter chauthong

    (@chauthong)

    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

    Plugin Author Greg Winiarski

    (@gwin)

    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?

    Thread Starter chauthong

    (@chauthong)

    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.

    Plugin Author Greg Winiarski

    (@gwin)

    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.

Viewing 15 replies - 1 through 15 (of 25 total)

The topic ‘Edit and delete posts.’ is closed to new replies.