Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
Membership plugin question

 

 


willbegood
User

Nov 25, 2011, 10:55 AM

Post #1 of 2 (2625 views)
Shortcut
Membership plugin question Can't Post

Hello, i'm currently using CMS Builder and Membership plugin, with work great.

I have another section editor call "Blogs", and i would like to give access to this section to my member.

Is it possible? and how to do it.

Actually, all the infos for each member are in the same table 'accounts'.


Jason
Staff / Moderator


Nov 27, 2011, 11:00 AM

Post #2 of 2 (2499 views)
Shortcut
Re: [willbegood] Membership plugin question [In reply to] Can't Post

Hi,

Yes, there are two ways you can do this:

1) You can give them access AFTER the account is created by going into their user record in the accounts table. Under "Section Access" you can either give them access to all sections or set their access to "By Section" and then give them access for the "Blogs" section.

2) You can give them access while creating their account with the membership plugin. In the signup form, you should see some code that looks like this:


Code
// create accesslist entry 
// replace '_sample' with the table you want the user to access
// replace '6' with the access level they should have: 0=none, 6=author, 9=editor
// replace '1' with the max listings they are allowed
mysql_query("INSERT INTO `{$TABLE_PREFIX}_accesslist`
(userNum, tableName, accessLevel, maxRecords, randomSaveId)
VALUES ($userNum, 'all', '1', NULL, '1234567890'),
($userNum, '_sample', '6', 1, '1234567890'),
($userNum, '_sample', '6', 1, '1234567890'),
($userNum, '_sample', '6', 1, '1234567890')") or die("MySQL Error Creating Access List:<br/>\n". htmlspecialchars(mysql_error()) . "\n");


For one of these lines, replace _sample with "blogs" and set an access level (0 for none, 6 for author, and 9 for editor).

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/