Webmastersite.net
Register Log In

Changing value of Date Submitted

Comments on Changing value of Date Submitted

Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Jan 23, 2006 - 9:46 AM:

I sometimes want submitted links to appear in a different order than when they were submitted, so I'm trying to change the value of Date Submitted. Here's what I added in the edit link template:


<IF {THISMEMBERGROUPISADMIN}>
<tr>
<td><strong>Date Submitted:</strong></td>
<td><input type="text" name="time" size="{STANDARDSIZE}" value="{LINKDATE}"></td>
</tr>
</IF>


However, every time I hit submit on that form, it changes the date to 12/31/1969. Am I using the wrong variable, or is this not possible?

Adam
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 23, 2006 - 7:54 PM:

The feature to change submission times was added in 3.2.0. Your hack is presumably altering the database field directly, which means you'd need to type the number of seconds since 1970, and typing a date will get your data ignored and replaced with a 0 since it's an integer field.
Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Jan 23, 2006 - 8:00 PM:

Okay, that explains why that was happening. Is there some way I can take a select file from the new version and use it in my version, or add a routine to convert the date into seconds? I want to avoid upgrading if possible, since I don't really need the new features and would rather not redo all my templates.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 25, 2006 - 6:07 PM:

No, you can't upgrade without upgrading.
Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Jan 25, 2006 - 6:29 PM:

Okay, so is there some php I can add that'll make this conversion for me? Maybe a snippet out of the newer version inserted into the old?
Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Feb 03, 2006 - 12:52 PM:

So I guess a snippet can't be added to the input/edit routine to do this conversion then?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 06, 2006 - 5:59 PM:

Modifying enough code will do anything. I'm not going to rewrite 3.16 into 3.3.5, since I've already done that once.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.