Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

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: 3,058
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?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

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: 9,007
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

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: 9,007
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

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: 9,007
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#21 2020-01-09 21:37:49

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Date Object associate to content to links

Bloke wrote #320978:

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

Works for me, too Thanks!

One last thought: maybe “Set timestamp to now” could be shifted over beneath the other fields (the same applies to Files too)?


TXP Builders – finely-crafted code, design and txp

Offline

#22 2020-01-09 22:04:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: Date Object associate to content to links

Yeah, it’s ugly on the left isn’t it.

Do we have any precedent/framework for markup when we don’t want anything in the left column? I don’t know if inputLabel() will cut it with a blank label. I’d have to try it and find out.


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

#23 2020-01-09 23:12:37

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: Date Object associate to content to links

Wondering, while looking at those date-stamp thingies – does it make sense to have an editable date field for images too? The current situation on reflects the date you uploaded an image. In 99.99% of the uses of images I have seen, that has absolutely no value whatsoever, except maybe for book keeping. That makes the associated <txp:image_date /> pretty worthless.

I agree with Jacob on the positioning of the “Set timestamp to now“ checkbox in Hive.
(I use some left or right padding on its wrapper to achieve the desired positioning in current Sandspace)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#24 2020-01-09 23:15:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: Date Object associate to content to links

We can do the same for Images once the workflow for Links is ironed out (positioning of the ‘Set to now’ box etc). I’ve often wondered if the image file’s datestamp might be more useful as a default value rather than ‘now’. Same for Files, perhaps?


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

Board footer

Powered by FluxBB