Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   How to insert new entry between two entries., posted by Daniel Roldan on Mon Nov 3 15:28:41 2014 
    icon2.gif   Re: How to insert new entry between two entries., posted by David Pilgram on Mon Nov 3 17:14:44 2014 
    icon2.gif   Re: How to insert new entry between two entries., posted by Andreas Luedeke on Tue Nov 4 14:51:20 2014 
Message ID: 67712     Entry time: Tue Nov 4 14:51:20 2014     In reply to: 67710
Icon: Reply  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Question  OS: Linux  ELOG Version: 2.9.2 
Subject: Re: How to insert new entry between two entries. 

Daniel Roldan wrote:

 I would like to put between two entries a new entry.

My Users forgot to put a entry, and now they would like to put a new entry between olders entries.

For Example: We have 10 entries order by Id:

300
301
302
...

They want to put between the entry 300 and 301 a new entry.

Is possible to do this feature?

Thanks! 

You are using the entry ID to sort your entries: there is no good way to insert a new entry ID, like 300.5

But you could sort your entries by other means, that allows you to insert entries later between existing entries.

I use for example a "when" attribute of type datetime. Here's an excerpt from the relevant part of my config file:

Attributes  = ..., when
Start page  = ?rsort=when
Type when   = datetime
Preset when = $date
 
This sorts automatically all your entries according to the "when" attribute. "when" will be preset to the creation date, but you can change it if the entry belongs to the past between two other entries.
If you don't create entries every second, then you'll always find a date to add entries between two old entries.
 
Be aware that you should only add new Attributes only at the end of the list, otherwise old entries without the attribute may appear mixed up.
 
Regards
Andreas
 
English (auto-detected) » English
 
ELOG V3.1.5-fe60aaf