Forums / Cotonti / Development / Dates & Validations

<<<12

A ticket I posted on Cotonti GitHub

Trustmaster
#16 2011-09-02 16:25

Ok, now page_updated field is used to track page updates instead of page_date.

I don't think expiration per category is worth implementing. Expiration per page is quite enough.

May the Source be with you!
Kingsley
#17 2011-09-02 16:37

somewhere as a default setting then? I do not like pages expiring by default. Mainly because I constantly forget to adjust the experation date..

Trustmaster
#18 2011-09-02 17:10

Take it easy, expiration is now off by default :)

May the Source be with you!
GHengeveld
#19 2011-10-14 14:09

I've just implemented a 5-phase page state sequence. A page can now have one of the following statuses:

  1. Draft (work-in-progress, not visible in validation queue)
  2. Pending (visible in validation queue)
  3. Approved (validated by moderator but the page_begin time isn't reached yet)
  4. Published (validated and active)
  5. Expired (validated, but page_expire has passed)

When adding or editing a page you now have the option to 'Save as Draft' besides 'Submit for validation' (previously 'Submit') and 'Publish' (only for admins). Also, after saving as draft you're taken back to the edit screen, so you can continue working on the page.

There are 2 new page tags for status: {PAGE_STATUS} and {PAGE_LOCALSTATUS}. STATUS is the lowercase, English status string (draft, pending, approved, published, expired) while LOCALSTATUS is the localized version of it as defined in page.en.lang.php.

The system is backwards compatible with templates that use the old 'rpublish' submit button. In the new templates you should use 3 buttons with name="rpagestate" and a value of 0 (approved/published), 1 (pending) or 2 (draft).

This post was edited by GHengeveld (2011-10-14 14:15, 12 years ago)
Trustmaster
#20 2011-10-15 07:40

Great job!

May the Source be with you!
aiwass
#21 2011-10-15 10:02

Does it work with Genoa 0.6.20??



#30993
GHengeveld:

I've just implemented a 5-phase page state sequence. A page can now have one of the following statuses:

  1. Draft (work-in-progress, not visible in validation queue)
  2. Pending (visible in validation queue)
  3. Approved (validated by moderator but the page_begin time isn't reached yet)
  4. Published (validated and active)
  5. Expired (validated, but page_expire has passed)

When adding or editing a page you now have the option to 'Save as Draft' besides 'Submit for validation' (previously 'Submit') and 'Publish' (only for admins). Also, after saving as draft you're taken back to the edit screen, so you can continue working on the page.

There are 2 new page tags for status: {PAGE_STATUS} and {PAGE_LOCALSTATUS}. STATUS is the lowercase, English status string (draft, pending, approved, published, expired) while LOCALSTATUS is the localized version of it as defined in page.en.lang.php.

The system is backwards compatible with templates that use the old 'rpublish' submit button. In the new templates you should use 3 buttons with name="rpagestate" and a value of 0 (approved/published), 1 (pending) or 2 (draft).

 

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
GHengeveld
#22 2011-10-15 10:05

You will have to backport my changes to Genoa if you want it there. It's not as easy as replacing a single file. There's small changes in multiple files. See my commits of Oct 14.

<<<12