Welcome to MEMBERPAGES_XH 3.0

for CMSimple_XH 1.5 and later

Started by svarrer.dk (v. 0.1-1.7), maintained by ge-webdesign.de (v. 2.0-2.3),
and further evolved to version 3.0 by Svasti.


Memberpages are pages that can only be accessed by users (= members) who have logged into the memberpages area. Members have a USERNAME and a PASSWORD, and optionally an accesslevel and email address.

Username and password accept accented letters, but no ', ", comma or spaces.


Main changes compared to version 2.3 :
New: membersnotice(), member()
Gone: memberswarning(), memberpages()
Changed: accesslevels can have only one value, members list can only have one source, either a standard php-file or a csv-file, and csv-file separator is always a comma.

New features in 3.0: (some available only when using csv members file)


Setting up MEMBERPAGES

Unzip the zip file and upload the folder "memberpages" into the plugin-folder of your CMSimple installation. Then add an login-form either to your template or to some page of your site.

Login-form in the template:

Open the template file and put this php-code where the login form should be located: <?php echo memberslogin();?>

Login-form on a page:

Add this code to your page: #CMSimple $output.=memberslogin();# or this: {{{PLUGIN:memberslogin();}}}

Note: Using the sourcecode-view of the CMSimple-editor to enter code is recommended.

If you have the login form on a normal page, you should add a logged-in-notice to your template so that members see that they are logged in. The logged in notice is only visible if you are logged in.

Open your template file and add this php-code where the logged-in-notice should be located: <?php echo membersnotice();?>

… memberslogin(); … will produce a login-area like this:

After login members will see a changed login-area like this:


Converting normal pages to MEMBERPAGES

(This has been simplified compared to former version)

Put on the pages that you want to convert to memberpages, this code:
#CMSimple member();# or this: {{{PLUGIN:member();}}}.
That's it. These pages are only accessable after login.

You can give a page an accesslevel to restrict it visibility further. Add the number of the level between the parentheses, e.g.
#CMSimple member(3);# or {{{PLUGIN:member(3);}}} for level 3.
Different to former versions only one value for the accesslevel can be entered.


Choosing the access mode

Memberpages without access-level (= level 0) are visible to all members. Concerning pages with access level you can choose between the following modes:

  1. If you don't use access level, choose "members see all memberpages". The access level will not be shown in the member's list.
  2. "access to pages with SAME OR LOWER access value" gives e.g. a member with access level 3 access to pages with access level 0, 1, 2, and 3
  3. "access to pages with SAME or no access value" gives e.g. a member with access level 3 access to pages with access level 0 and 3.
    This mode is useful when you have to give different persons exclusive access to different pages. Set the number of selectable access levels in the next field. You can even have 100 access levels for 100 exclusive pages.
  4. "access set per member in DETAIL for 3, 4 or 5 page levels" offers detailed access management. You can set the access allowance per member individually to single or multiple page access levels. (Internally the same access number is used as in the other options, only now its binary value is used and every bit allows access to a higher page access level. E.g. a member, who had formerly access level 3 will have his number translated into 00011. The binary number determines access to page levels 5,4,3,2,1, i.e. he will have access to pages with access level 1 and 2, and of course to 0.)

Automatic login

You can set automatic login for members. If set, the plugin saves a cookie on the users computer after the user logs in. However, if the user logs off, the cookie will be deleted, and the user has to log in again the next time. Automatic login works only, if the user doesn't log off.


Saving members list in a csv file

For historical reasons there are two ways to store the members list:

  1. via a php-file (kept for continuity to previous versions)
  2. via a csv-file (csv = comma separated values)

(This double storing method was started in previous versions. Contrary to these versions now only one method can be used at a time.)

You can start using the php-file method (this is the easiest way) and later decide to use a csv-file. The php-data can be imported into the csv-file via the uploading menu. Simply click on upload, without having selected a file. The plugin will lead you to a menu where you can import the php-file data

Choosing the csv-method gives you the following additional possibilities:

The csv file structure consists of simple comma separated values, i.e. per line: user,password,accesslevel,emailadress


Changing the csv location

The csv-file can be stored in any location on your server. The default location of the csv-file is protected by .htaccess. Without protection the csv-file can be read by anybody on the internet. Therefore don't change things if you are not sure what to do.

For security reasons you cannot change location or name of the csv file in the plugin menu. Open memberpages/config/config.php with an editor and enter the new location behind $plugin_cf['memberpages']['csvfile']=". The entered value should be the URL part coming after the CMSimple base URL. If you want to have your csv file in, lets say, the subfolder "memberpages" of your userfiles, enter userfiles/memberpages/members.csv, and copy the .htaccess file from plugins/memberpages/data/ to userfiles/memberpages/ to protect the file.

You can even put members.csv on your server above the CMSimple base, where it is publicly inaccessible. In this case enter in config.php ../members.csv