Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,657
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: 8,950
Website

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: 1,827
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)

Offline

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

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

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

#25 2020-01-09 23:22:01

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

Re: Date Object associate to content to links

phiw13 wrote #320987:

(I use some left or right padding on its wrapper to achieve the desired positioning in current Sandspace)

Care to share your rules? I tried a blank (well, one space character) label on the left by cloning the markup that inputLabel() produces but got this:

Note the label intrudes into the right-hand column. No idea why.

Last edited by Bloke (2020-01-09 23:22:34)


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

#26 2020-01-09 23:39:42

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

Re: Date Object associate to content to links

Bloke wrote #320989:

Care to share your rules?

Sure, this is what I use now (edit files panel):

.file-detail .posted-now { padding-left: calc(45% + 1em); }

I will need to update that – generalise that – a little for future use. For Hive I think padding-left:50% might do, going by memory.

Bloke wrote #320988:

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?

For images, it certainly will be better for most cases. For files, dunno really.

edit: spelling, auto-correct really.

Last edited by phiw13 (2020-01-09 23:40:29)

Offline

#27 2020-01-09 23:58:26

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

Re: Date Object associate to content to links

phiw13 wrote #320990:

Sure, this is what I use now

Cool, thank you. This works in Hive:

@media screen {
...
  .posted-now {
    padding-left: 50%;
  }
...
}
@media (max-width:47em) {
...
  .posted-now {
    padding-left: 0;
  }
...
}

If Phil’s okay with this, then he can stick it in the CSS. If he’d prefer an HTML solution, then I’m sure we can code it that way instead.


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

#28 2020-01-10 00:09:46

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

Re: Date Object associate to content to links

That is fine, except for the Write panel, which also has a .posted-now {} field in the side bar (*).

But anyway, something like that is fine, as far as I am concerned.

(*) with an every so slightly different markup…

Offline

#29 2020-01-10 00:12:44

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

Re: Date Object associate to content to links

Hmm, this selector would be better: .txp-edit .posted-now {}

That would only affect those Edit panels.

Offline

#30 2020-01-10 00:42:48

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

Re: Date Object associate to content to links

Yeah, I’ll leave selectors to those that know better. Your versions are better; mine were just for illustration.


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