Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2020-01-07 21:35:10
- code365
- Member
- From: California
- Registered: 2009-08-16
- Posts: 119
Date Object associate to content to links
Hi,
Is their anyway associate a date to links, that is under content >links ? Basically I want to select a date for the article title.
Thank you
Last edited by code365 (2020-01-07 22:01:42)
Offline
Re: Date Object associate to content to links
Does txp:link_date help?
TXP Builders – finely-crafted code, design and txp
Offline
#3 2020-01-07 22:39:10
- code365
- Member
- From: California
- Registered: 2009-08-16
- Posts: 119
Re: Date Object associate to content to links
@Jakob
Sorry if I was not clear. I want to be able to select the date. Not the date the link was created.
Offline
Re: Date Object associate to content to links
If you mean, change the creation date, in the same way we can change the creation date of articles, the only way I can think of is via phpMyAdmin.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Date Object associate to content to links
colak wrote #320920:
If you mean, change the creation date, in the same way we can change the creation date of articles…
… there is jra_link_admin_date that adds a date edit field to the link panel. It’s an old plugin but it is still working on a site I have with txp 4.7.1, so you may be in luck.
TXP Builders – finely-crafted code, design and txp
Offline
#6 2020-01-08 13:58:32
- code365
- Member
- From: California
- Registered: 2009-08-16
- Posts: 119
Re: Date Object associate to content to links
@Jakob…YES that is what I talking about. You are awesome. Any plans to have this part of the txp?
Last edited by code365 (2020-01-08 13:59:50)
Offline
Re: Date Object associate to content to links
code365 wrote #320938:
@Jakob…YES that is what I talking about. You are awesome. Any plans to have this part of the txp?
The date field is already in textpattern, as is the link_date tag to display it. The date is update to the current time when you edit and re-save the link.
All the plugin does – it’s not from me but from Jean Rajotte – is show you the fields so that you can set it to a specific time if you wish.
I have no idea whether the devs have considered adding that to textpattern as standard.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Date Object associate to content to links
Don’t see why we can’t expose the creation date in core. We have fields for it in the DB, and for images and files too, so we could do the same there.
Can anyone see any downsides, besides the extra screen real-estate? Should we do this or is it plugin territory?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Date Object associate to content to links
I’m torn:
- It’s not all that common a requirement and makes the form look more complex.
- But: there’s a tag to output it, but at present you can’t influence what it contains (except for re-saving). It’s also inconsistent with files where you can set the publish date and time.
I think the old plugin (from 2010) probably needs an update as re-saving the link bumps the time to the present, losing you your specifically-set time.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Date Object associate to content to links
I’m not sure either. One thing we could do is think about exposing this kind of thing behind some twisty like we do on the Write panel. Not sure if that’s particularly good UX, but if it’s a not-oft used feature, we could tuck it away under a date/time area. And follow that through to Images and Files too, maybe.
It might be possible to relegate other fields too, such as sort order. If people want them, they’re available, the twisty retains its toggle state until you close it, but they don’t then clutter the panel.
The link date is shown in the List step and is sortable and has a tag, so we must have thought it holds some benefit to include it in the first place. Thinking about it in that way, it seems odd not to allow it to be altered.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Offline
Re: Date Object associate to content to links
No worries. I can add it today if we agree it’s the right thing to do.
EDIT: the date/time thing for links, not the unification of links/files/images!
Last edited by Bloke (2020-01-08 15:42:27)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Offline
Re: Date Object associate to content to links
Bloke wrote #320946:
No worries. I can add it today if we agree it’s the right thing to do.
EDIT: the date/time thing for links, not the unification of links/files/images!
Seems fine to add and consistent with other items such as files and images. And maybe experiment with a twisty thing for this panel?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Date Object associate to content to links
I’ve had a first stab at link date editing. Please try it out and let me know if there’s anything that could be done better.
I haven’t experimented with the twisty thing yet. Maybe Phil might have time to play with a design pattern for the edit panels, but it’s not vital at this stage and can wait till next release if we think twisties are worthwhile.
My only concerns at the moment are that:
- if you leave the date / time blank, you get ‘now’, but that’s not exactly obvious. Newbies might think the date/time are required (although we only label the first field as required, so maybe that’s moot).
- if you partially enter a date, you get ‘now’ because it can’t be interpreted as a real date.
- if you enter a bogus date (e.g. 2020-01-42 01:02:03) you get ‘now’ if you use CTRL/CMD+S but the browser complains about the field validation if you click Save.
To be fair, that last point plagues all our admin panels, just thought I’d highlight it.
To get round the first, we could pre-populate the fields with the date and time that the ‘Add Link’ button was clicked. You then get nowish when you save; it just depends how long it takes you to type the other details in. Under these circumstances, if you want to make it ‘exactly now’ when you commit, you can click the ‘Set timestamp to now’ checkbox, but that’s an extra click compared with leaving the fields blank by default. Depends which is more useful.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline