Page 1 of 1

Upcoming and archive News

Posted: Tue Feb 28, 2006 4:15 pm
by alby
In forge I add a patch for display new (upcoming) or old (archive  ;)) news only.
I add a new parameter displayonly [=new/old] (warn in this release: relative of post date):

Code: Select all

{.... displayonly="new" ....}
         display new articles only (warning: relative to post date (news_date))
{.... displayonly="old" ....}
         display old articles only, tipical of archive news (warn: relative to post
         date (news_date) and (if set) close the expiration date (end_time))
Alby

Re: Upcoming and archive News

Posted: Fri Mar 03, 2006 11:26 pm
by alby
Patricia wrote: when you say "relative to post date" do that mean it's after a certain number of days? and can we set that number?
and is the "old" displaying expired news?
Yes, there is a update patch that correct a bug ( ???) and add a new parameter archiveperiod
Set additional period in days for visualization in archive view. Useful with displayonly=old only

Look this below, I hope of being simple.

Legend:
PDT: Post Date Time
SNT: Start News Time (if set Expiration Date)
ENT: End News Time (if set Expiration Date)

NOW: TIME (istant of user view)
APT: Archive Period Time from NOW (in days)


Two example:
1. Post without expiration date (Post date only)
2. Post with expiration date (start-end visualization)



Case UPCOMING: {... displayonly="new" ...}

Code: Select all

 NOW
  |
-----------------------> Day
   |
  PDT
1. Post Date must be in future and it will be visualized until its exceeding

Code: Select all

       NOW
        |
-----------------------> Day
  |    |        |
 PDT  SNT      ENT
2. It will be visualized between Start and End Time of expiration




Case ARCHIVE: {... displayonly="old" archiveperiod=5 ...}

Code: Select all

  APT  NOW
   |    |
-----------------------> Day
  |
 PDT
1. It will be visualized if Post Date is lesser than APT (APT NOW)

Code: Select all

           APT  NOW
            |    |
-----------------------> Day
  |    |        |
 PDT  SNT      ENT
2. It will be visualized if SNT is lesser than APT and End Time is lesser than NOW

Alby