The attached patch adds add option that allow the site admin to set the "Authored on" timestamp to the time a node is published (instead of the default, which is when the node was first saved).
This patch does not change the default behaviour of Publish content, but ads a checkbox to Publish content settings that allows the site admin change this behaviour.
My use case is a news-website. The journalists publish their own content when it is done. We use Publish content to administer the permission to publish own content, as it provides the exact permissions needed. Using core for Publish/Unpublish requires the permission "Administer content", which is way too broad.
A journalist may start working on a story a long time before it is published, and without setting "Authored on" to the time it is published, the story may look several days old when it appears online. This patch fixes this.
The Scheduler module (which allow authors to schedule publication) already provides this option.
PS: The patch also adds an hook_uninstall to publishcontent.install.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | publishcontent-set_authored_on_timestamp-2794933-2.patch | 4.79 KB | gisle |
Comments
Comment #2
gisleHere is the patch. Please review.
Comment #3
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.