ExpiredPage is a CMSimple plugin which removes pages at a custom date. Many pages have a limited life and when their content expires the page needs to be removed.
ExpiredPage automate this process by doing it possible to indicate the date when the page has to be removed. ExpiredPage is running once a day and is activated by the users of the website. All pages that are marked to be removed this day (or before) have deployed #CMSimple remove# and became invisible according to Developer manual.
ExpiredPage requires a preinstalled pluginloader.
Download and uncompress expiredpage.zip
Upload the entire expiredpage directory to your "plugins" directory.
In order to initialize the plugin place in the part of your template.
When this is done runs ExpiredPage once a day.
In order to remove the page on a specific date paste:
#CMSimple removepage(expiration_date);# somewhere on the page.
Expiration_date has a format yyyymmdd where yyyy is 4 digit year such as "2008", mm, is 2 digit months, for example, "09" and dd is the 2 digit day for instance "02" or "31".
From version 1.1 the expiration_date is the last visibility date and the page is removed just after midnight next day. #CMSimple remove# will be visible all the day 31 December 2008 and will be removed on 1 January 2008 at 00:00 am.
ExpiredPage behave in a same way as hide function and you can place the script alongside another cmsimple script.
You can adjust your time zone in configuration menu.
ExpiredPage creates a file log.txt. If the file is not created at first run of this plugin you may create it manualy in plugin/expiredpage directory. This file needs write permissions.
Test
You can test ExpiredPage by changing field "test" in Plugin Config of ExpiredPage to "true". Go to the page you want to test and enter
#CMSimple removepage(99999999);# on the page.
Save page. After saving the page will now contain
#CMSimple remove##CMSimple removepage(99999999);#
Change to "NORMAL MODE" and check that page is not visible. If the page is still visible, you did not enter the cmsimple string correctly. Check your script and configuration of scripting_regexp in the configuration under SETTINGS.
After succesfully test change the configuration of "test" back to "false" and delete #CMSimple remove# from the test page. Change the date from 99999999 to the date you want the page to expire.
Timezone
ExpiredPage uses GMT time. You can adjust time zone to your local time in Plugin Config.
The ExpiredPage plugin is tested with CMSimple versions 3.0 and higher and php version 4.3 and 5.2.
Some plugins can handle cmsimple remove function incorectly. If you experience that removed pages are deleted set variable $plugin_cf['expiredpage']['action'] to"hide" instaed of "remove" in index.php in plugin directory.
There is no warranty using this plugin. It will be used on everybody's own risk. We will not assume any liability in case of data losses caused by ExpiredPage usage.