WBCE / News-with-Images

Extended news module which allows to have multiple images per post
0 stars 4 forks source link

Mass action: remove published until date #95

Closed mrbaseman closed 1 week ago

mrbaseman commented 1 year ago

I have two NWI pages, one for the current postings, and another one as archive. I'm using time based publishing on the main page, and from time to time I move the older posts to the NWI section on the archive page. This works well using the mass action "move posts to another NWI section". On the archive page, however, I have to remove the "published until" date, which is usually in the past for these entries that I select for moving. So it would be quite useful to clear the "published until" date in a mass action rather than clicking on each post, remove the date and save each one separately. I guess it shouldn't be too complicated to implement. I have assigned myself, and maybe I find the time soon, and if not, this issue is at least a reminder.

mrbaseman commented 1 month ago

I have added another mass action: reset the publication date. The scenario would be that you prepare many posts and set their publication date far in the future. Maybe someone else has to clear them for publication and decides all these posts shall be published right now. He can check them and use the mass action to reset their publication date to "now".

instantflorian commented 1 month ago

It works, but causes errors in the error log: 2024-09-26T14:43:25+00:00 [Warning] /modules/news_img/functions.inc.php:[642] from /modules/news_img/manage_posts.php:[80] mod_nwi_post_clear "Undefined variable $post_link" for each affected post. (e.g. 4 posts to be changed => 4 times the error)

mrbaseman commented 1 month ago

Oh, I see. The access file stuff didn't work. These were copy&paste mistakes. I should have had a closer look at the code pieces that I have reused from other functions. I hope it's fixed now with https://github.com/WBCE/News-with-Images/commit/372414c2cbaa5734f12749813e05cf1b0b599d57

instantflorian commented 1 month ago

confirmed, no more errors

mrbaseman commented 1 week ago

I haven't seen further problems. I've tagged Release 5.0.28 now.

mrbaseman commented 1 week ago

@instantflorian die im AOR genannte aktuelle Versionsnummer müsste man noch anpassen