Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2020-01-08 15:36:16

etc
Developer
Registered: 2010-11-11
Posts: 3,530
Website

Re: Date Object associate to content to links

Bloke wrote #320940:

Don’t see why we can’t expose the creation date in core.

Me neither (but have no time for it right now, sorry). And I hope some day articles/images/files/links will become just ‘components’ with a common interface.

Offline

#12 2020-01-08 15:41:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,962
Website

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#13 2020-01-08 15:50:52

etc
Developer
Registered: 2010-11-11
Posts: 3,530
Website

Re: Date Object associate to content to links

Bloke wrote #320946:

EDIT: the date/time thing for links, not the unification of links/files/images!

Damn!

Offline

#14 2020-01-09 08:48:25

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,829
Website

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?

Offline

#15 2020-01-09 11:00:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,962
Website

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#16 2020-01-09 15:35:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,537
Website

Re: Date Object associate to content to links

Hi Stef, I uploaded your edits on my dev environment. Are we supposed to be seeing something when visiting /?event=link&step=link_edit&id=2&sort=id&dir=desc&page=1&search_method=name%2Curl? If so, the interface looks the same as before.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#17 2020-01-09 15:48:24

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,962
Website

Re: Date Object associate to content to links

Yes, you should see a new Publish date and time area.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#18 2020-01-09 16:08:49

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,537
Website

Re: Date Object associate to content to links

My installation is basically the beta release with now, 3 files updated which includes 2 of Oleg’s edits in taghandlers.php and txplib_misc.php and yours (txp_link.php). Should I download the whole of the repository and try again?


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#19 2020-01-09 17:09:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,962
Website

Re: Date Object associate to content to links

If you’re going to run from the dev branch, it’s always best to keep the entire installation up to date whenever you can. Does the dev demo site show the new link fields in place? If so, it’ll be a cache or some other issue that’s preventing your local installation from working. The only changes that this patch requires is the sole txp_link.php file. No other dependencies.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#20 2020-01-09 17:20:36

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,537
Website

Re: Date Object associate to content to links

Got it! My bad. I uploaded the file in my live site, not in the dev one. I can see it and edit it just fine. I’ll continue with the testing.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

Board footer

Powered by FluxBB