[CDB] Prime Post Revisions

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

Hi, how can i hide or show the post’s revisions for the users?
User avatar
Dark❶
Registered User
Posts: 395
Joined: Mon Jan 15, 2018 1:22 pm
Location: D@rK V0id
Name: Dark❶ [dark1]

Re: [3.2][3.3][RC] Prime Post Revisions

Post by Dark❶ »

lol wrote: Fri Apr 09, 2021 7:40 pm Hi, how can i hide or show the post’s revisions for the users?
By setting proper permission.

Best regards 👍
Dark❶ [dark1]
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [3.2][3.3][RC] Prime Post Revisions

Post by primehalo »

To clarify, the "Can view own post’s revisions" permission can be found in the Forum permissions section on the Actions tab. The "Can view post revisions" permission can be found in the Forum moderators section on the Actions tab.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

primehalo wrote: Sat Apr 10, 2021 5:40 am To clarify, the "Can view own post’s revisions" permission can be found in the Forum permissions section on the Actions tab. The "Can view post revisions" permission can be found in the Forum moderators section on the Actions tab.
Thank you, how can i set "Can view post revisions" permission for all the users? Not just for moderators.
For example user1 could see user2's post edits.
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [3.2][3.3][RC] Prime Post Revisions

Post by primehalo »

It's not really set up to do that. You could possibly create a new moderator role that only allows that permission and then assign everyone to that role.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

primehalo wrote: Sun Apr 11, 2021 4:13 pm It's not really set up to do that. You could possibly create a new moderator role that only allows that permission and then assign everyone to that role.
Thank you, may i ask you to say what code to edit to add "Can view post revisions" to users permission?
😂
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [3.2][3.3][RC] Prime Post Revisions

Post by primehalo »

lol wrote: Sun Apr 11, 2021 6:00 pm
primehalo wrote: Sun Apr 11, 2021 4:13 pm It's not really set up to do that. You could possibly create a new moderator role that only allows that permission and then assign everyone to that role.
Thank you, may i ask you to say what code to edit to add "Can view post revisions" to users permission?
If you just want everyone to have that access then edit ext/primehalo/primepostrevisions/core/prime_post_revisions.php, find this line:

Code: Select all

return $this->auth->acl_get('m_primepostrev_view', $forum_id)
and change to this:

Code: Select all

return true || $this->auth->acl_get('m_primepostrev_view', $forum_id)
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

primehalo wrote: Sun Apr 11, 2021 10:11 pm
lol wrote: Sun Apr 11, 2021 6:00 pm
primehalo wrote: Sun Apr 11, 2021 4:13 pm It's not really set up to do that. You could possibly create a new moderator role that only allows that permission and then assign everyone to that role.
Thank you, may i ask you to say what code to edit to add "Can view post revisions" to users permission?
If you just want everyone to have that access then edit ext/primehalo/primepostrevisions/core/prime_post_revisions.php, find this line:

Code: Select all

return $this->auth->acl_get('m_primepostrev_view', $forum_id)
and change to this:

Code: Select all

return true || $this->auth->acl_get('m_primepostrev_view', $forum_id)
thank you. this is what i need.
and how to edit this code to only show the post revisions for users, and not for guests or bots?
😂
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [3.2][3.3][RC] Prime Post Revisions

Post by primehalo »

I'm not sure but you could try something like this and see if it works:

Code: Select all

return $this->auth->data['user_id'] != ANONYMOUS && !$this->auth->data['is_bot'];
If that doesn't work then I'm really not sure.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

primehalo wrote: Mon Apr 12, 2021 5:22 am I'm not sure but you could try something like this and see if it works:

Code: Select all

return $this->auth->data['user_id'] != ANONYMOUS && !$this->auth->data['is_bot'];
If that doesn't work then I'm really not sure.
unfortunately did not work. :( you already added the moderation-forum-base-permission for this. can we edit that code to add user-forum-base-permission too?
😂
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [3.2][3.3][RC] Prime Post Revisions

Post by primehalo »

You're welcome to try editing that code but it's not a project I want to tackle.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

primehalo wrote: Mon Apr 12, 2021 6:08 am You're welcome to try editing that code but it's not a project I want to tackle.
i meant you not me 🙂 i don't know how to do that 🙂
😂
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

thank you very much for this great extension 👍👍👍
😂
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

I appreciate if someone has time helps us to add this permission to user-forum-based permissions. Thanks
😂
lol
I've Been Banned!
Posts: 56
Joined: Fri Apr 09, 2021 7:34 pm

Re: [3.2][3.3][RC] Prime Post Revisions

Post by lol »

i updated to new version 1.0.1
but when you hit on "Details", it says "Prime Post Revisions is not up to date - Re-Check version"
maybe you put "1.0.1-RC1" in the composer.json file and check the latest version with "1.0.1"

by the way, what are the changes for this version? is user-forum-based permission also added?
😂

Return to “Extensions in Development”