Memberpages_XH 3.6.5

for CMSimple_XH >= 1.5 and CMSimple 4.x
PHP >= 5.3.7

New in 3.6 is a simpler usage without changing the template, i.e. just put the log-in form {{{memberslogin}}} on a page.


Plugincalls

Codenot logged inlogged in
{{{memberslogin}}}
or in template:
<?php echo memberslogin();?>
Login field Multi line info with log out field
{{{memberslogin 1}}}
or in template:
<?php echo memberslogin(1);?>
Login field Simple text: "You are logged in"
{{{membersnotice}}}
or in template:
<?php echo membersnotice();?>
Multi line info with log out field
{{{membersnotice 1}}}
or in template:
<?php echo membersnotice(1);?>
Single line info with log out field

Since Memberpages 3.6 the first of the above table rows is sufficient.


Updating from 3.x

Install new version on top of old version. Go the plugin backend and click "activate plugin". The new version will read your old language and config files and use their settings to generate new such files. Members' list and log file from versions below 3.5 can be imported.



Memberpages_XH has two uses:

Memberpages can store user name, password, access level, email address, full name and membership expiration date. In the member's panel members can change password, email address and full name.

A log of login actions is kept.

Usernames, passwords and full name accept accented letters and special signs except " and \.


Setting up Memberpages

Unzip the zip file and upload the folder "memberpages" into the plugin folder.
Create the login form either in the template or in the content of a page.

Hiding pages from public and making them visible for members

Set method in config. Uncheck unused method for better speed of your site.

Login

Login form in the template:

loginform.png, 2,0kBloggedinform.png, 2,3kBOpen the template file and put this php code where the login form should be located: <?php echo memberslogin();?>

On the left you see the login form, on the right the change to the log-out form after login. The look depends on the template.

Login form on a page:

If you enter on a page {{{memberslogin}}} you get the same as in the login form in the template, with the change from login form to log-out form.

With {{{memberslogin 1}}} there will be not log-out form, instead the text "you are logged in" appears.

Member's notice

When a member goes to another page, you may want to inform him that he is still logged in. In the config you can set automatic one line notice on top of every memberpage or every page. This notice can also be put into the template via <?php echo membersnotice(1);?> which gives something like:
membersnotice.png, 1,5kB
This line is embedded in the div class="membp_oneline" and can be styled via css.

<?php echo membersnotice();?> (without the 1) gives the same information, however not in 1 line but in several lines, and serves as a log_out form. To avoid a duplication of log-out forms on the login page, you can either hide the login page on login or use {{{memberslogin 1}}}.


Memberpages_XH and Forum_XH

If you use Forum_XH 1beta1 and want to display the full name of users, change line 170 in plugins/forum/index.php from return isset($_SESSION['Name']) ? $_SESSION['Name'] : (
to
return isset($_SESSION['fullname']) ? $_SESSION['fullname'] : (


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 to pages with SAME or no access value, plus VIPs can access pages with LOWER level" This is a combination of the above cases, e.g. a members with access level 50 can access only pages with level 0 and 50, but VIPs with level 60 can see all pages from level 0 to 60.
    Useful for e.g. a school, where every pupil gets a personal page accessable only by himself, while the teachers (=VIPs) can access the pages of all pupils.
  5. "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.)

Password forgotten?

The line "Password forgotten" can be displayed under the Login button. A click will ask for the members user name. IF the user name and an email address is found in the members list, the forgotten password will be send to that email address.

For sending an email the plugin needs a sender's address, which has to be entered in plugin config under Site e-mail address. Without sender's address "Password forgotten?" will not be displayed.

An admin email address must also be entered in plugin config to inform the admin of password requests, where no email address or username is found in the members' list.


Folder for saving the members' list

From Version 3.5 on the members' list is saved by default in userfiles/plugins/memberpages/, however a different folder can be chosen in plugin config. The entry in the config starts from the CMSimple_XH base. You can even, for high protection, choose a folder which is below the CMSimple_XH base, e.g. ../my_folder.

When you change the folder of the members' list, a new members' list and new log file will be generated. If you have done this after already having created a new list, copy the new list via ftp to the new location.


History

The plugin was started by svarrer.dk (v. 0.1-1.7), maintained by ge-webdesign.de (v. 2.0-2.3), and starting with version 3 widely changed and further developed by Svasti (3.1 with some hints from cmb to improve security, and 3.2 with code from cmb to show who is logged in.).


Main changes compared to version 2.3: