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: [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

Re: [chrisl] WebsiteMembership Plugin - Wordpress

By Dave - February 2, 2010

That is cool.

Thanks for sharing your code! :)
Dave Edis - Senior Developer
interactivetools.com