Google translator »

(Opens in a new window - öffnet in einem neuen Fenster)


Short Documentation Plugin "MembersArea"

Version MembersArea 2.8 - released 01/2023

With MembersArea you can create a password protected members area. You can make pages visible for different usergroups. Every user is a member of one usergroup. Every member can see only the pages of his usergroup (if he is logged in).

New members are able to register. The group for new members is configurable. The new member and the admin get Emails with different contents.

The members can edit some of their data, if they are logged in. Also in this case, the member and the admin get an Email.

Failed logins, successfull logins, logouts, registrations and edits of userdata, are logged in a logfile.

MembersArea can work with unlimited number of users and groups.

MembersArea is prepared to work independent, in different subsites and second languages.


1. System Requirements

MembersArea requires a working installation of CMSimple_XH 1.2 utf-8 or higher.

Recommended is CMSimple 4.0 or higher.


2. Installation

  1. Download the zip-file and unzip it with a suitable program.
    • Upload the folder structure of the folder "CMSimpleRoot" (the folders "plugins" and "content") into the install folder (root folder) of your CMSimple installation.
    • Ignore requests of your ftp program, click "ja" or "ok", there will no files be overwritten by the first installation.
    • If you update, simply don't upload the "content" folder.
  2. Define the necessary writing permissions for folders and files by your ftp program.

3. Files- and Folders Permissions

files: chmod 666

If you move or rename your data file, you have to define writing permissions also for the moved file.

folders: chmod 777


4. The Plugin Calls

4.1 Login Form

Login Form on a special login page

You can call the login form on a special login page. This is usually a h1-page, and the memberpages are sub-pages of this h1-page (MembersArea) and become visible after login:

{{{PLUGIN:membersarea_login();}}}

Show "logged in" hint

If the logged in member leaves the login page, he does not see, that he is logged in. If the login form is placed on a CMSimple page, you should place a permanent visible "logged in" message in the template (template.htm), with the option to log out:

<?php echo membersarea_loggedin_hint();?>

This "logged in" hint may be provided with a logout page, that is called after logout:

<?php echo membersarea_loggedin_hint('Die_Logout_Seite');?>

The "logged in" hint is not required, if the login form is placed permanently visible in the template. In this case the login form switches automatically to the "loggedin" hint, if the User is logged in, with the option to logout.

Login Form in the template

You also can place the login form permanently visible in the template (template.htm). In this case, you should define a login page, that will be called after login:

<?php echo membersarea_login('the_login_page');?>

You also can define a logout page, which will be called after the logout:

<?php echo membersarea_login('the_login_page','the_logout_page');?>

You also can define a logout page only, then the login page must be set to "null":

<?php echo membersarea_login(null,'the_logout_page');?>

All parameters also can be set this way in the plugin call on a special login page.

4.2 Create protected memberpages

If you add the following plugin call to a CMSimple page:

{{{PLUGIN:membersarea_protect('!guest!member!');}}}

... this page will be visible for members of the groups "guest" and "member". You can add more groups to the plugin call, as many you want. Before, after AND between each group, a "!" (Exclamation mark) must be entered.

If the page shall be visible for members of all groups, use an empty plugin call:

{{{PLUGIN:membersarea_protect();}}}

Every member is a member of one (1) group. Which group can see which pages, you define only in the plugin calls.
The groups can be numbers: (!1!2!3!...) or words: (!guest!member!VIP!...)

5. MembersArea in subsites and second languages

In subsites and second languages, MembersArea can use an own userdata file.

MembersArea recognizes, if a file ./content/plugins/membersarea/userdata.php exists in the folder of the subsite or second language, and uses it, if exists. If the file not exists, the userdata.php of the main site (CMSimpleRoot) will be used.

If you have renamed or moved the userdata.php (see 7. Hints / Data Security), the same happens.

6. Logfile in subsites and second languages

In subsites and second languages, MembersArea can use an own logfile.

MembersArea recognizes, if a file ./content/plugins/membersarea/log.txt exists in the folder of the subsite or second language, and uses it, if exists. If the file not exists, the logfile of the main site (CMSimpleRoot) will be used.

7. The datasets

The "Invoice Address" and "Delivery address" input fields are optional and are only used if the user's status is "customer" or "premium_customer", for example when used as a customer file in the csvShop.

8. Hints / Data Security

In the folder content/plugins/membersarea/ you will find a file "userdata_master_copy.php". This file you can use as a master copy, for example if you want to create a membersarea in a subsite or a second language.p>

Don't remove the first 4 lines of the data file, it's important for security.

The best protection for the data is, to rename the userdata.php to a cryptic name (for example "GH759xkZ472.php"). After that, the data file path (data path user:) in the plugin configuration needs to be adjusted.