Memberpages are pages that can only be accessed by users that have logged into the memberpages-area. The users are defined in the plugin-config, they have a USERNAME, a PASSWORD, and they have a ACCESSLEVEL. They can be entered manually, or they can be read from a comma separated values-file (csv-file). This file can be anywhere on the server, it can be specified in the plugin-config see 3.1.
Unzip the zip file and upload the folder "memberpages" into the plugin-folder of your CMSimple installation.
You must add an login-form to the template or the main-page of the membersarea.
Open template and add this php-code where the login form should be located:
<?php echo memberslogin();?>
note: use the sourcecode-view of your CMSimple-editor!
You will see a login-area like this:
After successfully login you will see a changed login-area like this:
Add this code to your page (below the heading):
#CMSimple $output.=memberslogin();#
note: use the sourcecode-view of your CMSimple-editor!
If you have the login form at the main page of the membersarea, you should add a logged in warning anywhere in your template. The logged in warning is only visible if you are logged in.
Open template and add this php-code where the logged in warning should be located:
#CMSimple $output.=memberswarning();#
note: use the sourcecode-view of your CMSimple-editor!
The function call is the CMSimple-scripting on the memberpages. It makes the page visible only if you are logged in. Here you can set the accesslevels, for wich the page is visible, comma-separated: "1,2,5":
#CMSimple $output.=memberspage('logout_page','1,2,5');#
note: use the sourcecode-view of your CMSimple-editor!
"logout_page" is the page, where CMSimple is going if you logout from a memberpage. A good choice is the mainpage of your membersarea.
Go to the page and copy all behind the "?" from the address line of your browser, and than overwrite "logout_page" in the function call.
Now your example-installation of memberpages works.
Now you may create the memberpages and change your settings, however yo want.
The plugin can be managed by logging into cmsimple as admin, select the memberpages plugin from the avaliable plugins drop downbox. and you are off, the users are managed in the config settings, the stylesheet and language also use the corresponding buttons.
The default setup gives you 3 users called user1, user2 and user3.
user1 has password=pass1 and accesslevel=1
user2 has password=pass2 and accesslevel=2
user3 has password=pass3 and accesslevel=3
The plugin can load users and passwords from a different location, this is done by setting "csvfile: path to the file". Default it is not set but setting the valu will load users from a file placed somewhere on your server. The syntax of the file must be like this: user, password, accesslevel, the fields can be seperated by either ;:/.-
By default a remember me function is avaliable, the plugin saves a cookie on the users computer then the user dosen't have to login everytime the pages are visited. To disable the "rememberme" function set the field in the plugin-settings to "false". Default is "true"
By default logging of user actions are logged in the file "logfile.txt" placed in the memberpages plugin folder "/logfile/". To disable the logging set "logfile: false" in the plugin-settings menu.
You can create a special login page and define it in the language settings. In case of OK user/password this page is loaded. This page can be specified in the language settings. If the field is empty (default), the redirection is to the active page itself.
You can create a special logout page and define it in the language settings. When the user clicks the logout-button, he is redirected to the logout page. This page can be specified in the language settings. If the field is empty (default), the redirection is to the active page itself.
You can create a special error page and define it in the language settings. In case of wrong user/password this page is loaded. This page can be specified to another location in the language settings. If the field is empty (default), an error message will be shown by login error.
The plugin-config allows you to set "Hide pages" to true or false.When 'false', the memberpages are always visible to toc(), search() and sitemap().When 'true', they are only visible for their corresponding accesslevel-users. This is only supported from cmsimple version 2.7 and up..