WebsiteMembership Plugin - Wordpress

By chrisl - February 1, 2010

Hi

Has anyone had success in integrating the WebsiteMembership Plugin to work with a blog directory containing Wordpress. I have a site where I have successfully integrated WebsiteMembership plugin for CMS. This allows membership login to specific areas of the site, however, I would love to have the same ability when they enter the blog. Suggestions?
cj

Re: [chrisl] WebsiteMembership Plugin - Wordpress

By Dave - February 1, 2010

Hi cj,

In theory it should work. You should be able to add the code to the top of any PHP page. And we recently updated CMSB to be compatible with side by side installations of WordPress. I'd recommend giving it a try.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] WebsiteMembership Plugin - Wordpress

By chrisl - February 1, 2010

Hi

Well the thing about theory is ... sometimes it takes an experiment. So here it is after several attempts:

Open file wp-blog-header.php and amend as follows (note the additional of root):

<?php require_once "../cmsAdmin/lib/viewer_functions.php"; ?>
<?php if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); } ?>
<?php


if ( !isset($wp_did_header) ) {

$wp_did_header = true;

require_once( dirname(__FILE__) . '/wp-load.php' );

wp();

require_once( ABSPATH . WPINC . '/template-loader.php' );

}

?>

Once that file is amended then it forces the page to open the login screen from the WebsiteMembership Plugin. Once logged in, blog can be entered .

Cool.
cj