... Elxis version 2009.3 codename Aphrodite is out, download it from Elxis Download Center (EDC) ...
Account expiration control
From Elxis Official Documentation
Users accounts now expires!
Since version 2009.0 all users registered to an Elxis web site have an expiration date. By default user accounts never expires but you can easily change this for any user you wish. When adding/editing a user, to change the expiration date click the button next to the expiration date field. Elxis calendar will appear and you can pick any date you wish as the user's expiration date (valid years are between 1960 and 2059). If you wish an account to have no expiration date (never expires) click on the green Never button.
So you want to provide subscriptional content ah? No problem! Elxis has build-in support for user subscriptions as you can set the account expiration date for any user to any date you wish. You can set up this system in 2 ways depending on if you wish the users to get registered by themselves or you will be the one that you will register them. There is also a third method that requires extra software and a forth method by using a system such as IOS Eshop.
1st method: Users get registered by themselves
When someone gets registered to an Elxis web site he becomes a member of the Registered user group. As the user automatically gets registered you have to set your subscriptional content access level to an other user group as if you make it accessible to the Registered users then they won't have to subscribe to access that content! So either create a new users group (f.e. Subscribers) or use an existing one. Now you can set your subscribers manually by placing them to the Subscribers user group. Set also an expiration date for their subscription.
2nd method: Users get registered manually
This is the recommended method, especially for inexperienced Elxis administrators as you won't have to deal with user groups. Register the new users manually from within Elxis administration. Set their account expiration date to any valid date you wish. Mail them the login information as well as their expiration date. When they login they will be able to access your subscriptional content (access level: Registered) till the date their account expires.
3rd method: Payment gateway integration
This is option requires extra software. Enable users registration in Elxis global configuration and set that the confirmation for the new user accounts will be done manually. So the users get registered by themselves but they do not get activated and they can not login. The user will have to pay for his/her subscription first. If the payment is successful the payment script changes the user account status to activated, sets the proper expiration date based on the subscription package the user bought, and the user becomes an active subscriber. You can use PayPal or any other payment gateway for this purpose. The payment script is easy to be implemented by any PHP developer.
4th method: IOS Eshop
This method requires IOS Eshop shopping cart component and is the best and most recommended method. Users can not register by them selves. User registration is disabled in Elxis global configuration. In IOS Eshop you add some products as subscription packages (immaterial goods) of certain duration (1 day, 1 week, 1 month, renewals, etc). After the customer completes a payment IOS Eshop will create a user account with the specified expiration date and mail the user the login information. Note that this method requires a special payment gateway to be developed. Contact Is Open Source in that case or an other developer to build this system for you.
Elxis 2009.0 has a special file which checks Elxis database for recently expired user accounts. When it finds such accounts it blocks those users and sends them a notification e-mail to renew their account by contacting the web site administrator. You can automatise this task by placing this special file in a CRON job. Set this CRON to be executed once or twice per day. Consider your web hosting provider on how to set up this cron job.
You will find this special Elxis file inside the includes folder:
This script works independently from Elxis CMS (standalone). It loads automatically ADOdb and the Elxis configuration file, gets connected to the Elxis database and executes some queries. The script does not accepts any user input and it is absolutely safe. In case it can not get connected to the database it sends an e-mail notification to the web site administrator. The script does not get executed if the web site is offline.
|You can also run manually the CRON file by visiting it with your browser. For example: http://www.mysite.com/includes/subcron.php|