[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!
Ideas Centre
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)
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [3.2][BETA] Prime Post Revisions

Post by primehalo »

Janvitus wrote: Fri Feb 28, 2020 10:01 am Hello,
I've installed this ext and it works fine, but I've only one problem, once a day the extension fills the admis registry with this message:
Auto-pruned post revisions » Revisions deleted: 0
All forums set to 0 on auto prune revisions and every day PPR spawning the message above. Messages don't stop (around 300-400 pages!) until I clear the board cache.

Apache and phpbb debug don't report anything unusual.

Any idea?



Nota: phpbb 3.2.9, php 7.2.
Sorry for the delayed response. I looked over the code again and have no idea why that's happening. According to the documentation they have for extensions using cron it should only run and log once every 24 hours. Still, I just uploaded a fix that will not log the cron job results if no revisions were actually deleted.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
Janvitus
Registered User
Posts: 20
Joined: Mon Sep 30, 2019 12:04 pm

Re: [3.2][BETA] Prime Post Revisions

Post by Janvitus »

primehalo wrote: Fri Mar 27, 2020 3:14 am Sorry for the delayed response. I looked over the code again and have no idea why that's happening. According to the documentation they have for extensions using cron it should only run and log once every 24 hours. Still, I just uploaded a fix that will not log the cron job results if no revisions were actually deleted.
Ok, I apply the fix and works, tnx.

Suggest: maybe show a warning as for shadow topics where indicating in which forum the revisions are deleted.
User avatar
primehalo
Former Team Member
Posts: 2991
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [3.2][BETA] Prime Post Revisions

Post by primehalo »

Janvitus wrote: Tue Mar 31, 2020 10:56 amSuggest: maybe show a warning as for shadow topics where indicating in which forum the revisions are deleted.
I'm not sure I quite understand this. Show a warning where? When clicking a shadow topic link it brings you to the actual topic, from there you click on a specific post's revision history, and from that revision history is where you delete revisions. At that point I don't know if you arrived at the revision history by clicking the real topic link or the shadow topic link. Not even sure how I could know that.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
Janvitus
Registered User
Posts: 20
Joined: Mon Sep 30, 2019 12:04 pm

Re: [3.2][BETA] Prime Post Revisions

Post by Janvitus »

No, i mean "Admin log" in the ACP:
Schermata da 2020-04-07 12-04-31.png
"Revisions deleted: 1" where? :D

However, as seen from the image, still too many messages from PPR. I've set only 2 forums to test it, and the prune revisions every 1 day... Now i've set to 15 days, let's see what happens.
You do not have the required permissions to view the files attached to this post.
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][BETA] Prime Post Revisions

Post by Dark❶ »

Janvitus wrote: Tue Apr 07, 2020 10:20 am ...
However, as seen from the image, still too many messages from PPR. I've set only 2 forums to test it, and the prune revisions every 1 day... Now i've set to 15 days, let's see what happens.
I have made a PR here : https://github.com/primehalo/primepostrevisions/pull/6
Since it's Migration file , you will have to Disable the extension then copy that file to it's respective location and then Enable the extension.

Do let me know the results...

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

Re: [3.2][BETA] Prime Post Revisions

Post by primehalo »

Thanks for finding and fixing the issue!
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
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][BETA] Prime Post Revisions

Post by Dark❶ »

primehalo wrote: Fri Apr 10, 2020 4:06 pm Thanks for finding and fixing the issue!
Welcome :grin:

Can I give you a suggestion here ???

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

Re: [3.2][BETA] Prime Post Revisions

Post by primehalo »

Of course!
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
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][BETA] Prime Post Revisions

Post by Dark❶ »

Ok. Thanks :)
  1. I think you forgot to update the version number on first post to1.0.0-beta8 it's still 1.0.0-beta3 .
  2. About Cron , A special page will be required for the following settings :
    • ability to Enable & disable cron as per the user convenience.
    • ability to select the Frequency to Run the cron , like 1 day , 2 days , ...etc... , I highly suggest in day(s) & Should be input element with restriction to numbers only from 0 & above.
There is one more thing , a bug report , but I have to check it thoroughly if it's my side or this extension.
I'll report it in 2 days.

BTW I like your Extension VERY much. :heart_eyes: :heart_eyes: :heart_eyes:

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

Re: [3.2][BETA] Prime Post Revisions

Post by primehalo »

I think I understand... you want a single page were you can adjust the cron settings for every forum? So just recreate the cron options that already exist but displayed on a single page so you don't have to go into each forum's setting specifically?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
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][BETA] Prime Post Revisions

Post by Dark❶ »

primehalo wrote: Fri Apr 10, 2020 10:45 pm I think I understand... you want a single page were you can adjust the cron settings for every forum? So just recreate the cron options that already exist but displayed on a single page so you don't have to go into each forum's setting specifically?
No... No... No...

I mean a Master switch & setting specifically for Cron Task.
Not for each forum.

If you don't mind , can I link to some of my repo to point you parts of the code?
so that I can explain myself ???
And some images too...

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

Re: [3.2][BETA] Prime Post Revisions

Post by primehalo »

Sure, go ahead.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
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][BETA] Prime Post Revisions

Post by Dark❶ »

Thanks :)

---

So at this line of your extension : 130 :

Code: Select all

return true;
& at this line of my extension : 64 :

Code: Select all

return ($this->config['dark1_rsi_auto_reduce_sync_enable'] && $this->config['dark1_rsi_enable']);
To enable / disable the cron task , in your case should be :

Code: Select all

return $this->config['primepostrev_cron_enable'];
If user set's config['primepostrev_cron_enable'] aka Enable Cron Task as false aka NO then cron task should not run.
Default should be true.
So when user has issues with cron or they don't want it to be run , you can ask them to disable it.

---

Now at this line of your extension : 141 :

Code: Select all

return $this->config['primepostrev_cron_last_run'] < time() - $this->cron_frequency;
& at this line of my extension : 74 :

Code: Select all

return (($this->config['dark1_rsi_auto_reduce_sync_last_gc'] < (time() - $this->config['dark1_rsi_auto_reduce_sync_gc'])) && ($this->config['dark1_rsi_time'] < (time() - $this->config['dark1_rsi_interval'])));
To control the frequency of the cron task , in your case should be :

Code: Select all

return $this->config['primepostrev_cron_last_run'] < (time() - $this->config['primepostrev_cron_frequency']);
assuming you will store the Day(s) in seconds.
If user set's config['primepostrev_cron_frequency'] aka Cron Task Frequency as 172800 (secs) aka 2 days then cron task should run every 2 days.
Default should be 86400.
So when user want's to run cron at lower frequency , you can ask them to increase the number of Days.

---

I hope you will understand the above.

Best regards :+1:
Dark❶ [dark1]
User avatar
Janvitus
Registered User
Posts: 20
Joined: Mon Sep 30, 2019 12:04 pm

Re: [3.2][BETA] Prime Post Revisions

Post by Janvitus »

Dark❶ wrote: Wed Apr 08, 2020 9:11 am
Janvitus wrote: Tue Apr 07, 2020 10:20 am ...
However, as seen from the image, still too many messages from PPR. I've set only 2 forums to test it, and the prune revisions every 1 day... Now i've set to 15 days, let's see what happens.
I have made a PR here : https://github.com/primehalo/primepostrevisions/pull/6
Since it's Migration file , you will have to Disable the extension then copy that file to it's respective location and then Enable the extension.

Do let me know the results...

Best regards :+1:
I've add this file, seems to work but i would test it for a couple of days ;)
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][BETA] Prime Post Revisions

Post by Dark❶ »

Janvitus wrote: Mon Apr 13, 2020 11:51 am ...
I've add this file, seems to work but i would test it for a couple of days ;)
Yea!!! sure...

currently primehalo also made some changes , check them too... :D

also check :
1. https://github.com/primehalo/primepostrevisions/pull/7
2. https://github.com/primehalo/primepostrevisions/pull/8

Best regards :+1:
Dark❶ [dark1]

Return to “Extensions in Development”