Forumlar / Cotonti / Development / Dates & Validations

A ticket I posted on Cotonti GitHub

GHengeveld
#30993 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).


Bu konu GHengeveld tarafından düzenlendi(2011-10-14 14:15, 12 yıllar önce)