License Latest Stable Version

Let mods update the create and edit time of posts.

The time edit button is added underneath the post edit button.

The field uses the native datetime-local picker in browsers that support it (at the time of writing, Chrome/Edge/Opera). The field format in supported browser will match your browser/operating system language and country setting (the screenshot shows French formatting).

The time in the modal is UTC.

This extension was created during a Flarum live coding stream on the clark_writes_code YouTube channel. I release it because it might be useful to you, but there's no guarantee it will be kept updated. Feel free to fork it for your own purpose under the terms of the MIT license.

Watch the replay here

Installation

Use Bazaar or install manually with composer:

composer require clarkwinkelmann/flarum-ext-post-date

Updating

composer update clarkwinkelmann/flarum-ext-post-date

Links

I'd recommend using YYYY/MM/DD which is far more universal. Month/Day positioning varies by continent when they are first, there seem to be fewer misunderstandings when the Year position is first.

Unless there's a calendar picker popup which would alleviate those concerns.

    jordanjay29 the picker is the native browser picker. The format will be according to your computer language and country. Mine is french/switzerland. Only Chrome shows a picker right now as other browsers dont support this field type (they show the date in ISO format).

    EDIT: I updated the description to explain this.

    matteocontrini I'm not sure, that's why it's under my own namespace and not FoF for example. It was chosen as a good candidate for my livestream today, and it would be a shame to not publicly offer it now it's been written.

      • [deleted]

      • Edited

      clarkwinkelmann many times i've made suggestions for things that are really missing. i don't understand that precious minds like you have time for creating a new extension that won't help others.

        clarkwinkelmann Good to know they default to ISO format, that fixes the issue then. Why use datetime-local instead of date, which Firefox has support for too?

          I made a few tests to check for timezone issues but I think everything is working. The time is always UTC.

          [deleted] this was chosen as an easy extension to write in two hours for my YouTube channel's weekly stream https://discuss.flarum.org/d/11756-videos-on-how-to-extend-flarum If you have extension suggestions that fit the format, please let me know !

          [deleted] user is a bit more difficult because to be user-friendly, we need a search field. But as an example to develop a user edit, it's definitely a good base !

          jordanjay29 date field does not include time. I could use date field plus a time field, but it's a bit more complicated.

            [deleted] Your honesty and comments are welcomed but if they do not help with the discussion or if you cannot provide constructive criticism to the extension creator, then what is the point? You will only spark up unnecessary issues with staff and other members of the community and that is something we do not and will not endorse here at Flarum. I am not saying you cannot voice your opinion but if you are posting a simple "this extension is crap, I don't like it, make an extension I want" then unfortunately it will be dealt with as that is not helping anyone. You can always post up a discussion requesting an extension if one is not already available for you.

            If you took any comments as an insult then I sincerely apologise in advance. That is never our intention and we would never have said it with maliciousness or spite. At the end of the day we are here for you and will strive to make this place as good as home for all.

            Let's try and get this discussion back on topic. I will keep this post here as I do not have anything to hide; posts were moved to a private discussion to prevent bloating this one. Please consider this as a warning to prevent derailing @clarkwinkelmann's discussion and amazing efforts so far in providing new extensions for the greater Flarum community. There is no reason for this to go to a higher level.

            • [deleted]

            • Edited

            Total respect for when a developer takes time out to actually host a webinar, and shows you exactly how to write code correctly, plus understand the underlying components of Flarum. These coding sessions are invaluable to the community, and not only provide an insight into how things should be structured, but also show you just what's possible using a bit of imagination. Let's remember that @clarkwinkelmann doesn't get paid for this, and chooses to do it because he actually wants to. This is an extremely rare attribute these days, and if anything, developers who choose to help others in this way should be commended, not condemned.

            If you don't like the extension Clark has written, simply move on and allow others to remain on topic.

            Backdating posts has been a thing on many platforms for quite some time. WordPress allows you to backdate posts and so does Facebook when it comes to pages you Admin.

            Why have such a feature? It really just boils down to ethics and or reasoning/purpose. Maybe you missed an important event or birthday you wanted to announce? Maybe you had some sort of drafted post set up and you wanted to publish it on the exact time and date it went live vs it’s actual conception. Least we forget that some users notably use Flarum as a blogging platform and this sort of feature really becomes invaluable to them especially for what it accomplishes 🙂

            Overall, thinking about the bigger picture is what it’s all about and if you look at other forum software as well, changing a thread/post date and time is an already core/integrated feature amongst the many forum software out there. Use-case varies from forum Administrator to other forum Administrators in the end.

            Let us just sit back and appreciate the time @clarkwinkelmann spent teaching us how 3rd party extensions are developed from an actual experienced developer and all of the new tricks I myself had learned from watching his latest streamed session 😉

            a month later

            clarkwinkelmann mcutting user is a bit more difficult because to be user-friendly, we need a search field. But as an example to develop a user edit, it's definitely a good base !

            Please @clarkwinkelmann if you can add change author to this whenever you have time. I mentioned my important reasons in the other discussion here.

            6 months later
            2 months later

            This extension is no longer supported. The features have been moved to the Author Change extension: https://discuss.flarum.org/d/21731-discussion-and-post-author-and-date-change

            That new extension also supports editing the discussion create time.

            The following command should remove the old extension and install the new one if you don't have it already:

            composer require clarkwinkelmann/flarum-ext-author-change