To integrate a CMS with ppSD2, first activate the module from the "Settings > Modules" section of the control panel. Once activated, you will need to add the following code to just below the <?php line on your CMS's index.php file:
include "/full/path/to/ppSD2/cms_code.php";
In most cases, ppSD2 will before synchronize logins and accounts between the CMS and ppSD2. Please note that users must log in through ppSD2's login screen for this to work!
cms_code.php file
You will need to open the cms_code.php file in a text editor, such as notepad, and edit the options at the top of the file:
// * Secure Area ID * // EDIT THE FOLLOWING LINE TO REFLECT THE SECURE AREA ID // FOR THE PAGE ON WHICH THIS CODE IS BEING PLACED. $this_secure_area_id = "1"; // Where is your login page located? $loginurl = "/ppSD2/login.php"; // Enter the full server path to the ppSD2 directory $FSP = "%%path%%"; // What pages in the blog should be secure? $pages = array(); // What directories in the blog should be secure? $directories = array( 'example/members-area-1', 'example/members-area-2' );
- $this_secure_area_id
- This corresponds to the secure area or user group ID that should have access to the CMS's secure content. You can find the ID at "Manage > List secure areas".
- $loginurl
- The full URL of your ppSD2 login page.
- $FSP
- The full server path to your ppSD2 folder.
- $pages
- This is an array of pages within the blog that you wish to be secure.
- $directories
- This is an array of directories (non-physical directories) within the blog that you wish to be secure.
Generally editing the $directories array is enough to secure are you need. Examples of how this could be editing:
// What directories in the blog should be secure? $directories = array( 'page_id=15', 'page_id=35' );
In this case pages with ID "15" and "35" will require that the user log in to view them.
Last updated on 7 July 2011 8:28am
