Jump to content

JkPublishPages - Module to publish/unpublish, trash/delete or move a page depending on dates and times


Juergen
 Share

Recommended Posts

Great news! 🙂You could even attach a hook on page save that triggers a warning if a published page is unpublished manually, but will be published by the module again in the future (could work analog for an unpublished page that is published manually, but will be unpublished because of a "publish_until" date in the future).

  • Like 1
Link to comment
Share on other sites

And I just had another idea 😄: Pages that will be changed by the module in the future could also be marked in the page tree, e.g. prefixed with a "clock" icon.

Link to comment
Share on other sites

Hello Flo,

I have pushed the module version now to 1.3.6. This version does not auto populate the fields. I have removed all the Hooks which are responsible for auto population. So this is the one, which fits your requirements and you can use it until the other additions have been implemented.

Best regards

  • Like 1
Link to comment
Share on other sites

Hello Flo,

5 hours ago, snck said:

And I just had another idea 😄: Pages that will be changed by the module in the future could also be marked in the page tree, e.g. prefixed with a "clock" icon.

should it look like this:

393683922_Screenshot2024-04-25at21-16-23PagesProcessWireschulfreund_at.png.3cd790140af4637781833d4010a6c47f.png

At the moment the icon will be displayed if a start and/or an end time has been set, but id does not take care if a change will happen in the future (publishing or unpublishing of the page)

  • Like 2
Link to comment
Share on other sites

5 hours ago, Juergen said:

I have pushed the module version now to 1.3.6. This version does not auto populate the fields. I have removed all the Hooks which are responsible for auto population. So this is the one, which fits your requirements and you can use it until the other additions have been implemented.

Hey @Juergen, thank you! That was so quick that I am not sure whether I can test and implement it before you release the next version. 😄

43 minutes ago, Juergen said:

should it look like this:

393683922_Screenshot2024-04-25at21-16-23PagesProcessWireschulfreund_at.png.3cd790140af4637781833d4010a6c47f.png

At the moment the icon will be displayed if a start and/or an end time has been set, but id does not take care if a change will happen in the future (publishing or unpublishing of the page)

Visually it looks great to me! 👍

But I think, the method should be "smart" and also check whether the module has "fired" yet or if it will in the future (which should not be to hard as it is just a date comparison). I think the big value in highlighting pages in the page tree is in reminding the user that there WILL be a change to this page. The user should not be bothered by pages that already have been (un)published by the module and there could be a lot of those.

You could even include a tooltip that gives detailed information on the (un)publication of the page if the user hovers over the clock icon like "Will be (un)published on XX.XX.XXXX – XX:XX:XX".

I really love how quick you implement feedback. Thank you again! 🙂 

Link to comment
Share on other sites

Version 1.3.7 is out

This version comes up with some new additions as discussed in this forum in the last time.

To check out what is new, please read the changelog.md

As always, please keep in mind, that this is a new version with a lot of changes. I have tested almost all scenarious, but there could always be an unwanted behaviour. So keep an eye, that everthing works as expected. Otherwise please write an issue report (here or directly on GitHub).

Have a nice week!

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

@Juergen After testing with a colleague we found some points that could probably be addressed:

  • Translations: German translation shows "VERöFFENTLICHT" (instead of "VERÖFFENTLICHT"). Maybe it could just be "veröffentlicht" (no CAPS, but bold)?
  • If you have set a publish date (in the past) and save a page as unpublished, you get a warning, that the page will be published on the next run of the cronjob (same for unpublish date...), which is fine. We were asking ourselves, whether the method that is triggered by the cronjob should also run on page save (for pages that have values in the module's fields). This way the warning could be changed to something like "you have set a publishing date in the past, the page can only be unpublished, if you clear the field...". We think that (although the message that is shown is clear about the effects) it is not the best possible experience that a change has an effect, but only for a short time and changes back automatically after that. Warnings might not be read everytime.
  • Page tree: If a page is published (because of a publish date in the past) and gets unpublished directly in the page tree, the warning mentioned above is not shown (because it is an ajax request) and the user will not notice, that the page will be published again soon (only if he reloads the page tree manually). I do not know, what the most elegant solution is, but I think, hooking $pages->[un]publishReady() and "stopping" the (un)publish action if it is against the settings in the module fields (and outputting a warning that explains the reasons) would be a solution that also solves the problem mentioned above.

As I said, the improvements are huge already. These are no necessary changes, but suggestions on how the module could become even better. 🙂

Link to comment
Share on other sites

Hello @snck

First of all, thanks for your feedback!!

The first point is something that could be changed easily and I will correct this as soon as possible.

According the other 2 points, I have to check this out, if it could be changed easily and the work is it worth to spend the time 😉

2 hours ago, snck said:

These are no necessary changes, but suggestions on how the module could become even better.

I am always happy, if people post some interesting additions and improvements!!!

Greeting Jürgen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...