Website Membership 1.06 Released!

17 posts by 7 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: March 15, 2012   (RSS)

By Dave - October 27, 2011 - edited: October 27, 2011

Hello All,

We've just released an updated version of Website Membership:
http://www.interactivetools.com/add-ons/detail.php?Website-Membership-1012

NOTE: This version requires CMSB 2.13.

Here's what's new in 1.06:
NEW FEATURES
- You can now specify a separate accounts tables for website users (see WSM_ACCOUNTS_TABLE in plugin code)
- You can now login to the CMS and website as different users simultaneously (see WSM_SEPARATE_LOGIN in plugin code)

MINOR CHANGES & BUG FIXES
- Fixed bug where plugin code was being automatically run by command-line scripts
- Fixed typo on examples/user-signup.php. Changed $errors to $mailErrors on line 96


Please let us know if you have any questions or comments. Thanks! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Website Membership 1.06 Released!

Hi Dave,

I just upgraded a site to CMSB 2.13 (from 1.07) and its website membership plugin to 1.06 (from 1.03).

I've now got a strange problem that keeps users locked in a loop when they try to login. (Clicking on submit keeps returning them to the member login page, and the link continues to be member_login.php?loginRequired=1)

My client's site uses a flash masthead, and up to now I’ve been using this function to detect mobile browsers and swap out the flash for a .png.
<?php
function mobile_detection ()
{
if (isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE']))
return true;
if (isset ($_SERVER['HTTP_ACCEPT']))
{
$accept = strtolower($_SERVER['HTTP_ACCEPT']);
if (strpos($accept, 'wap') !== false)
return true;
}

if (isset ($_SERVER['HTTP_USER_AGENT']))
{
if (strpos ($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false)
return true;

if (strpos ($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false)
return true;
}

return false;
}
?>


It gets called with:
<?php $_SESSION['mobile'] = mobile_detection(); ?>
<?php if (!isset ($_SESSION['mobile']) OR $_SESSION['mobile'] == true) : ?>
<img src="images/masthead.png" width="800" height="183" />
<?PHP else: ?>
.... Code to display flash masthead...
<?PHP endif ?>


This approach worked with the website membership plugin 1.03, but in 1.04, 1.05 and 1.06, unless I take out the function call the looping occurs.

If I take out the function call, the user is logged in and redirected to the WEBSITE_LOGIN_POST_LOGIN_URL

Any idea why?

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Website Membership 1.06 Released!

By Jason - November 8, 2011

Hi Jerry,

Is this code located on the login page, or on the page in WEBSITE_LOGIN_POST_LOGIN_URL? Could you attach the entire file where this code is located so we can take a look?

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Website Membership 1.06 Released!

Thanks Jason,

It's in the attached login page code.

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Attachments:

member_login-safe.php 7K

Re: [gkornbluth] Website Membership 1.06 Released!

By robin - November 9, 2011

Hey Jerry,

I put your login script into a local test copy and it works fine, mobile or not. I get properly redirected to WEBSITE_LOGIN_POST_LOGIN_URL.

If you fill out a [url http://www.interactivetools.com/support]2nd Level Support Request[/url] I can see if I can find out what's going on on your end.

Thanks,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Website Membership 1.06 Released!

Thanks Robin,

It's on it's way to you.

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [Dave] Website Membership 1.06 Released!

Hi Dave,

I'm using the code <?php if ($CURRENT_USER['functions_view']): ?> to show content only if a user is logged in and has rights.... these users login via www..../cmsAdmin/index.php as they are staff members.

However, now I'm using WSM_SEPARATE_LOGIN, but want to have those who login via cmsAdmin to be able to see these pages even though they haven't logged in via the front end pages...

How should I handle this?
Cheers,

Tim (toledoh.com.au)

Re: [Dave] Website Membership 1.06 Released!

Thanks Dave,

No, that's the only reason.
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Website Membership 1.06 Released!

By Dave - November 22, 2011

Hi Tim,

Ok, I've got another report in on the importer issue so I'll try to find a solution to that as a first priority. That sounds like it would be the simplest resolution.

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