Plugin Updates: Website Membership, Facebook Login, Twitter Login (Updated Feb 7)

By Dave - January 28, 2013 - edited: February 7, 2013

Hi All, 

UPDATE (FEB 7): These plugins have all been released out of beta

We've just release 3 minor plugin updates in beta.  If you've previously got these plugins you can download the betas here: 
http://www.interactivetools.com/add-ons/my_purchases.php

Note that these all require CMSB 2.51 and Website Membership 1.09 (both currently in beta).  Also note that updating Website Membership is a bit of work as you need to check all the pages, so unless you're curious or need the new features, save it until you have a new project that requires membership.  

Website Membership v1.09

  • Users can login with either username or email (if you support usernames)
  • Username support can now be disabled with a single setting in login and profile)
  • All email templates are now stored and modified under: Admin > Email Templates
  • All example forms are now generated under: Admin > Code Generator
  • If you switch the account table to another name that doesn't already exist, it now creates that table for you automatically
  • The plugin is now set as a "Required System Plugin" so it can't be accidentally disabled which might break a site

Facebook Login v1.02

  • Facebook login window is now a popup instead of redirecting you to facebook and back
  • The plugin is now set as a "Required System Plugin" so it can't be accidentally disabled which might break a site
  • We're using this on our site here: http://www.interactivetools.com/add-ons/login.php

Twitter Login v1.01

  • Twitter login window is now a popup instead of redirecting you to Twitter and back
  • Twitter connect form is now generated under: Admin > Code Generator
  • The plugin is now set as a "Required System Plugin" so it can't be accidentally disabled which might break a site
  • We're using this on our site here: http://www.interactivetools.com/add-ons/login.php

Let me know any questions, comments, or feedback.

Dave Edis - Senior Developer
interactivetools.com

Plugin Betas: Website Membership, Facebook Login, Twitter Login

By Toledoh - January 29, 2013

I'm getting the following error on the user-login.php page:

setPrefixedCookie: Can't set cookie, headers already sent! Output started in /home/qaa/public_html_staging/user-login.php line 4.

It probably has somthing to do with the fact that I have a php insert for all the sites standard viewers?

Cheers,

Tim (toledoh.com.au)

Plugin Betas: Website Membership, Facebook Login, Twitter Login

By Dave - January 30, 2013

Hi Tim, 

Cookies and session data need to be sent before any content.  

The usual cause of the "headers already sent" error is extra whitespace before, after, or between tags.  Check on line 4 of /user-login.php for anything like that and remove it if possible.

Then check your include files before whitespace before the first <?php, after the last ?> or between tags, like this: 

?>
<?php

Replace with: ?><?php

Let me know if that fixes it.  Thanks!

Dave Edis - Senior Developer
interactivetools.com

Plugin Betas: Website Membership, Facebook Login, Twitter Login

By Toledoh - January 30, 2013

That's done it - thanks Dave!

Cheers,

Tim (toledoh.com.au)

Plugin Betas: Website Membership, Facebook Login, Twitter Login

By Toledoh - January 30, 2013

Hi Dave,

I've installed the latest beta CMSB, membership, facebook, twitter...  I've then duplicated the accounts.ini.php, removed the "accessList" section and saved as members.ini.php

I've then updated the websitemembership.php : $GLOBALS['WSM_ACCOUNTS_TABLE']            = 'members';

It goes fine until I add an email address at the twitter-connect.php and I get the error: MySQL Error: Unknown column 'disabled' in 'field list' (at outgoingMailer.php line 47 in function mysql_insert)

Any thoughts?

Cheers,

Tim (toledoh.com.au)

Plugin Betas: Website Membership, Facebook Login, Twitter Login

By Dave - January 30, 2013

Tim, 

Thanks for your message.

 I've then duplicated the accounts.ini.php, removed the "accessList" section and saved as members.ini.php

Try skipping that step next time, the plugin should automatically create a members table for you if you change $GLOBALS['WSM_ACCOUNTS_TABLE'].

I get the error: MySQL Error: Unknown column 'disabled' in 'field list' (at outgoingMailer.php line 47 in function mysql_insert)

Can you see if you have a legacy plugin called "Outgoing Mailer" and remove it?  That functionality is now built right into CMSB.

Let me know if that's it or if you still have any problems. Thanks!

Dave Edis - Senior Developer
interactivetools.com

Plugin Betas: Website Membership, Facebook Login, Twitter Login

By Toledoh - January 30, 2013

That fixed it!

Thanks!

Cheers,

Tim (toledoh.com.au)

Plugin Betas: Website Membership, Facebook Login, Twitter Login

By Dave - February 7, 2013

Hi Djulia, 

I wanted to get back to you about the Twitter Login session issue.  What I've done for now is add some code so the plugin won't start a session if a session is already active.  I checked session_id() for that like this:

// make sure session is started (for storing twitter data)
if (!session_id() && !defined('START_SESSION')) { define('START_SESSION', true); }

That will work in this case because Twitter Login only stores it's own information in the session, not anything from CMSB.

When you use two php applications that use sessions there is a problem because each application might be setting up sessions differently.  If this comes up more often maybe what I could do is add some functions that would allow you to save and restore CMSB sessions.  So if you need to use another application that also uses PHP sessions they wouldn't conflict.  Or we could always just write out own session handler and emulate what php does.  So we'd use $CMS_SESSION or something different.

It's a bit tricky, but I'll give it some more thought.  Let me know if you run into any more issues with sessions, and thanks for you ongoing feedback and support.

Thanks! :)

Dave Edis - Senior Developer
interactivetools.com

Plugin Betas: Website Membership, Facebook Login, Twitter Login

By Dave - February 7, 2013

Thanks everybody for your feedback, we've released all of these plugins out of beta.  Cheers!

Dave Edis - Senior Developer
interactivetools.com