Memberpages 3.5.2: use of csv-file as members list

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
deeseecee
Posts: 53
Joined: Tue Jan 22, 2013 1:22 pm
Location: Bochum, Germany

Memberpages 3.5.2: use of csv-file as members list

Post by deeseecee » Wed Sep 16, 2015 2:11 pm

Hi,
I just updated the Memberpages-plugin from version 3.4 to 3.5.2. However, using csv-files as a members list doesn't seem to work anymore... For me, that's a pity because I receive member lists as a xls-sheet and creating appropriate csv-files was fairly easy. The members list contains 50+ entries and I don't want to change the list using the members panel. Is there any solution to import csv-files containig the members list (there is one during the activation process but I need it more often)? Optimally, the import-function should have two different modes: replacing the old members list or adding some new members.

Thanks in advance for any solution!

Best regards,
Dirk

deeseecee
Posts: 53
Joined: Tue Jan 22, 2013 1:22 pm
Location: Bochum, Germany

Re: Memberpages 3.5.2: use of csv-file as members list

Post by deeseecee » Mon Sep 21, 2015 2:40 pm

Hi,
first of all I have to refine my problem: I set up a new site using the current release of CMSimple_XH (1.6.7) and some plugins. I didn't update the CMS because most of the plugins also needed an update - I felt that a clean installation would be easier to maintain afterwards. Nevertheless, I wanted to use a csv-file for the members list of the memberpages-plugin. However, that has changed in the new version of the memberpages-plugin: a csv-file can only be imported during the activation of the plugin. Such files cannot be used anymore as standard members list files.

If the plugin is called the first time (i.e. clicking on 'memberpages' in the plugins-menu for the first time) it is activated, i.e. some files are created in the directory userfiles/plugins/memberpages/. During this process old members lists can be imported: the activation-function looks for members.csv in the old data-subdirectory (plugins/memberpages/data/members.csv) of previous memberpages-versions (version <3.5). However, as this was a new installation, I had nothing to import because the old data-subdirectory did not exist...

I also asked Svasti, the developer of memberpages, and he offered the following solution:
If the pluging was alread activated csv-files cannot be imported anymore. To repeat the activation (and import) process of the plugin delete the the version number (3.5.2) in the first line of plugins/memberpages/config/config.php. This will cause the plugin to behave as if it is newly activated if memberpages if it is clicked in the plugin-menu of CMSimple. Before clicking create the old data subdirectory (plugins/memberpages/data/) and put your members list file members.csv in this folder.

I didn't try this solution because I wanted the csv-file to be in the new userfiles/plugins/memberpages/ directory (the directory that now contains all the information of the members list and some other information). Hence, I had to change line 565 of plugins/memberpages/pluginactivation.php from

Code: Select all

: $pth['folder']['base'] . 'plugins/memberpages/data/members.csv';
to

Code: Select all

: $pth['folder']['userfiles'] . 'plugins/memberpages/members.csv';
With this small change the import of my csv-file worked fine during the activation process of the memberpages-plugin. My members data are all located in one directory and I don't have to worry about the old 'data'-directory even in case I want to import a new csv-file.

Maybe someone will find this solution useful, all the best,
Dirk

Post Reply