Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Change all article dates at first launch?
I’m sure this has been answered before but I can’t seem to dig anything up.
On the glossary project (which has become an ‘almanossary’; a portmanteau of almanac + glossary), I’m using ‘last revised’ dates instead of published dates. I have many articles in various states of draft, so many different publish dates.
When the time comes to launch the site, I’d like to use that date as the initial publish date for all articles ready at that time. This date would be mentioned in the About info as the publish date for all content, and then individual pages would show only the ‘revised’ date over time and editing.
Is there some database way to bulk edit the publish dates to a given time when I’m ready to do so? Admittedly, I haven’t looked into the features of Sequal Pro yet.
Offline
Re: Change all article dates at first launch?
Yes, you could do that in one go via the database.
As the last modified and posted date have an identical format in the database, you could run an SQL query (in the sql panel of Sequel Pro or phpmyadmin) to copy to the contents of one column (LastMod) into another (Posted).
UPDATE textpattern SET Posted = LastMod
That changes all articles in Textpattern. If you need to change only certain articles, you may need an SQL query that is more selective.
PS: make a DB backup first. Always a good idea.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Change all article dates at first launch?
Okay, a SQL query will be required, then. Good to know.
But I’m going to need the publish dates all the same. Copying the last revised dates to that column won’t help me, because they are variable too.
So I’m guessing I’ll need a query that simply overwrites the publish fields with a constant date value. That should be doable.
Offline
Re: Change all article dates at first launch?
Sorry, I misunderstood you there. Yes, you can do that too:
UPDATE textpattern SET Posted = 'YYYY-MM-DD HH:MM:SS'
You might want to do the same for LastMod too to avoid having LastMod before the Posted date.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Change all article dates at first launch?
jakob wrote #325491:
You might want to do the same for LastMod too to avoid having LastMod before the Posted date.
Thank you. And +1 on that point. ;)
Offline
Re: Change all article dates at first launch?
Destry wrote #325481:
Admittedly, I haven’t looked into the features of Sequal Pro yet.
It’s really good. It’s a bit twitchy with very new versions of MySQL and derivatives, so make sure if you’re running MySQL 8 that you have the nightly (or latest) build to avoid problems.
There’s a fork of the Sequel Pro codebase called Sequel Ace that is also worth a spin, it has fresh energy and regular releases.
Offline
Re: Change all article dates at first launch?
gaekwad wrote #325495:
There’s a fork of the Sequel Pro codebase called Sequel Ace that is also worth a spin, it has fresh energy and regular releases.
Just installed it. It keeps crashing ever time I try to open a tab or window.
Moved back to Pro, it opens and works good as ever. I guess I’m in no hurry to switch.
Maybe Ace isn’t catering to macOS High Sierra limitations (per my old mbp). Or maybe you can’t have both installed? Don’t know.
Last edited by Destry (2020-10-15 12:11:27)
Offline
Re: Change all article dates at first launch?
Destry wrote #326413:
Just installed it. It keeps crashing ever time I try to open a tab or window.
github.com/Sequel-Ace/Sequel-Ace/issues/403
You’re not alone, it seems.
Offline
Re: Change all article dates at first launch?
And it did seem to be a High Sierra issue, though they now have it fixed, apparently.
Offline
Re: Change all article dates at first launch?
A fixed build is now available on the Mac App store, it this is where you fetch your build.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline