Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Yesterday 00:15:28

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,146
Website Mastodon

changing image Date added

I have not been able to find where changing the date added for an uploaded image can have it’s date added changed so that it appears after the latest added.
At the moment once an image has been added it gets outputted by ID number and in order of the date added. I want the id to remain as is, it is being used in an article, but I would like for the image to appear in a different order based on the upload date. I want my latest image to appear ahead of the one I loaded previously. As far as I can tell the order is performed by date/time. or is there another way that I am missing..


…. texted postive

Offline

#2 Yesterday 20:12:03

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

Re: changing image Date added

This looks inconsistent with other data types, indeed. Is there any reason to forbid the publish date modification for images?

Offline

#3 Yesterday 20:16:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,048
Website GitHub

Re: changing image Date added

Not as far as I can see. Seems like a logical addition to the sidebar.

The only thing that makes it slightly tricky is that would then allow images to be given future dates so the <txp:images>tag would need to be able to pull out time="past|future|all", I guess.


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

#4 Yesterday 20:57:31

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

Re: changing image Date added

The time thing done. Would you mind patching the admin side ?;-)

Offline

#5 Yesterday 21:07:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,048
Website GitHub

Re: changing image Date added

Sure. I’ll do it tonight. Nice one.


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

#6 Yesterday 22:29:02

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,146
Website Mastodon

Re: changing image Date added

etc wrote #341160:

The time thing done. Would you mind patching the admin side ?;-)

Skookum! .. thanks


…. texted postive

Offline

#7 Today 12:08:47

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

Re: changing image Date added

While I was at it, I have added exclude attribute to <txp:file_download_list /> and <txp:linklist /> tags, and also refactored auto_detect feature, for more consistency/flexibility. Seems to work in my loose tests, but the more eyes the better.

Offline

#8 Today 14:50:49

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,048
Website GitHub

Re: changing image Date added

Nice! I did the admin changes last night but want to do a few more tests first.

One that confuses me is that the image timestamp is set in the database as, say, 15:45:25 Which is the same time as shown on the admin side, but on the front end it shows as 17:45:25 because it’s run through gtime() which takes the locale into account. The server is in Germany and I’m in the UK.

Not sure if there is a way around this or if it’s just as expected.


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

#9 Today 22:26:45

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

Re: changing image Date added

Is this the same for articles? I remember having struggled with different tz combinations, but have no distant server at hand to test.

Offline

Board footer

Powered by FluxBB