Forums / Cotonti / Development / Dates & Validations

12>>>

A ticket I posted on Cotonti GitHub

aiwass
#1 2011-07-18 21:46

There should be an option to automatically post items/news/pages with a date set forward in time, just like Wordpress and all other CMF & CMS has.

Today, you can't create a page and set a date for it to be published in 2-3 days time, automatically, since if you validate the page, with it's forward date, it still shows up in Lists and when you click on it, it says "This page will be published in 13 hours and 34 minutes."

This is stupid, above, since If I want a page to go "LIVE" at a certain time, I don't want it to be "sneak previewed" in a list, I want it to be invisible until it's release, i.e. the time & date has passed, and I want to be done automatically.

Wanted Scenario:
1. Create a page and set the date 2011-07-31 10:00 GMT
2. Put in Validation que and edit it so that all dates & times are the same as above
3. Publish it/Validate
4. The page disappears from Validation Que and doesn't show up in any list, rss or alike until the time has come.
5. At 2011-07-31 10:00 GMT the page appears in it's category in all it's splendour.

Current Scenario:
1. Create a page and set the date 2011-07-31 10:00 GMT
2. Put in Validation que and edit it so that all dates & times are the same as above
3. Publish it/Validate
4. The page APPEARS in the category list, rss or alike with the text "This page is published in 13 days 13 hours 2 minutes". NOT GOOD
5. At 2011-07-31 10:00 GMT the page appears in it's category in all it's splendour and that stupid text disappears.

If this option can be fitted to Cotonti, it would make it much more flexible and one doesn't have to babysit the site all the time, since one can publish items that would appear in the future, making it much more appealing to a wider audience.

Ps. I have 2 times before asked for this functionality and it's high tide to implement it!

 

Take all that money that we spend on weapons and defences each year and instead spend it feeding and clothing and educating the poor of the world, which it would many times over, not one human being excluded, and we could explore space, together, both inner and outer, forever, in peace. - Bill Hicks

https://evlear.com
Kingsley
#2 2011-07-19 11:52

I smiled when I reached: .. one doesn't have to babysit the site ... But you have a real solid point.

Kort
#3 2011-07-19 14:14

Prepared future posts are good. Also this requirement would enable support for pages-events scheduled for a future date. We've encountered this problem before, btw.

SED.by - создание сайтов, разработка плагинов и тем для Котонти
CJ
#4 2011-07-22 00:54

Seditio and LDU could do it...

GHengeveld
#5 2011-07-22 11:46

This is a feature that is present in pages as a start date, but access isn't prevented in any way before the start date is reached. Currently only the news plugin uses this date to determine which articles to show. In LDU/Seditio this was the same.

I also would like to see this feature to be implemented correctly. Actually it is part of our plans to rewrite all major modules, which will take some time.

My idea is to have a 'traffic light' style validation sequence:
  1. Draft (author can edit) - red
  2. Pending (item is in validation queue, author can't edit, admin can edit or approve) - yellow
  3. Approved (publication date is in the future, item is automatically published when it's time) - green
  4. Published (item is visible on the site) - blue
  5. Expired (item expiration date is expired and no longer visible on site) - gray

Some steps may be skipped. For example an item created by an administrator can go from Draft to Approved instantly (skipping the Pending state), because he can approve it himself. The Approved state itself may be skipped if the publication date is the same as the creation date, because the item would be Published immediately. Most items will not ever reach the Expired state since they don't expire (this feature must be added).

Actually, it seems that the current implementation only lacks a check in lists. This shouldn't be too hard to fix, so I'll look into it.

This post was edited by Koradhil (2011-07-22 12:08, 13 years ago)
aiwass
#6 2011-07-23 09:38

Looking forward to a solution. It is also added to tickets on Github if anyone wants to take a look at it.

Take all that money that we spend on weapons and defences each year and instead spend it feeding and clothing and educating the poor of the world, which it would many times over, not one human being excluded, and we could explore space, together, both inner and outer, forever, in peace. - Bill Hicks

https://evlear.com
Trustmaster
#7 2011-08-07 07:58

I can only see one real problem: if we add support for begin/end dates into page module, thousands of existing pages will go offline because their ending date is already in the past. Probably page expiration should be disabled by default.

May the Source be with you!
ez
#8 2011-08-08 09:35

The system for page expiration and page publish is a really good system. This functionality should be kept.

I have made changes (corehacked) in the SQL statements (in pages and news plugins) to still see the article (even though publication is on the future)
I use something like: page author can always see all pages he/she made (also the ones in the future).
So when an article is published in the future... the author still has the ability to get to that page....

Ow and another thing.... I also show pages to the author that havent been approved yet.. !!!

hope this helps. (I think it is just some smarter SQL statements)

@Trustmaster:
The administrators off these systems know that old pages will go offline.... The expiration date is pretty clear functionality.
Just mention it in the release notes that this could happen in a new version.

 

==- I say: Keep it EZ -==
This post was edited by ez (2011-08-09 08:29, 13 years ago)
urlkiller
#9 2011-08-17 09:47

small sql script to the rescue?

"reset" expiration maybe?

URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
Trustmaster
#10 2011-09-02 09:17

I have implemented it for 0.9.4 this way:
* Page Date is set to the date the page was last updated
* Page Begin sets when the page will become available (and listed)
* Page Expire sets when the page will become unavailable (and not listed). By default Page Expire is set to 0 which means "never expires". Expiration of all existing pages upon update is set to 0, to avoid their undesired disappearing.

May the Source be with you!
aiwass
#11 2011-09-02 09:30

Will the changes made to 0.9.4 also be implemented to 0.6.19?
I dare not migrate 11.000+ pages to Cotonti Siena yet from Cotonti Genoa

Take all that money that we spend on weapons and defences each year and instead spend it feeding and clothing and educating the poor of the world, which it would many times over, not one human being excluded, and we could explore space, together, both inner and outer, forever, in peace. - Bill Hicks

https://evlear.com
Alex300
#12 2011-09-02 10:41
#30589 Trustmaster:

I have implemented it for 0.9.4 this way:
* Page Date is set to the date the page was last updated
* Page Begin sets when the page will become available (and listed)
* Page Expire sets when the page will become unavailable (and not listed). By default Page Expire is set to 0 which means "never expires". Expiration of all existing pages upon update is set to 0, to avoid their undesired disappearing.

Maybe it would be better to add new field to store the date the page was last updated

* Page Date - use date of page creation
 

Есть миры, не здесь, там, где небеса горят, и моря засыпают, и реки дремлют; люди сделаны из дыма, а города – из песен. Где-то опасность, где-то несправедливость, даже где-то остыл чай. Идем Эйс, у нас много работы!...
...Sorry for my english...
Бесплатные расширения для Cotonti: https://lily-software.com/free-scripts/
This post was edited by Alex300 (2011-09-02 12:49, 13 years ago)
Kingsley
#13 2011-09-02 10:47
#30590 aiwass:

Will the changes made to 0.9.4 also be implemented to 0.6.19?
I dare not migrate 11.000+ pages to Cotonti Siena yet from Cotonti Genoa

 

haven't got that many pages, but the same question applies...

Trustmaster
#14 2011-09-02 13:40

What do you guys think about Alex's proposal? Personally I don't see an obvious reason to add another field for that, but maybe I'm wrong.

There is no chance of this feature being available in Genoa for at least a month. Or there is such a chance if somebody in the community backports it while I'm on vacation and submits a patch.

May the Source be with you!
Kingsley
#15 2011-09-02 15:00

@ trust

Alex proposal would come in handy(the extrafield).

maybe set expire date options in the categories (as a general setting for that category)? this way peepz can make categories for short term items, and items that have to be stored for 'x' time.

12>>>