Website Membership v1.01 Released

By Dave - January 6, 2010

We've just released Website Membership v1.01 with the following changes:

- User Signup: user is now emailed a random password to confirm their email address (they can't login without receiving password)
- Edit your Profile: added new form to allow user to update their profile details and change their password
- Docs: Added section to readme.txt on how to use email as the username (if you don't want users making us their own usernames)

These were all requests by Website Memebership users. See the changelog and readme for more details or post if you have any questions.

For a full description of this plugin and to download the latest version:
http://www.interactivetools.com/add-ons/detail.php?Website-Membership-1012

Please feel free to post your feedback and questions! We're always happy to get your feature requests and bug reports. Post in the forum or email me at dave@interactivetools.com.
Dave Edis - Senior Developer

interactivetools.com

Re: [Dave] Website Membership v1.01 Released

By (Deleted User) - January 7, 2010

Sounds awesome!

How configurable is the "Edit your profile" function?

What I have in mind is building a database of dietary preferences for users. Can I add these kind of profiling fields to your software?

Re: [cohagan] Website Membership v1.01 Released

By Dave - January 7, 2010

Hi cohagan,

Yes, it's a bit more advanced but very possible. The plugins give you the raw code to work with. So you can see everything that is going on and copy and paste the PHP and MySQL to add fields.

This can look a little complex on first glance but in our experience it's the fastest way to build things because you can see everything that is going on and quickly build on it.

Here's how you'd add a field:

- Add a field in the CMS field editor under the User Accounts (I'll assume it's called 'city')

- Edit sample_profile.php and copy and paste an error checking line:
if (!@$_REQUEST['city']) { $errorsAndAlerts .= "You must enter your city!<br/>\n"; }

- Edit sample_profile.php and copy and paste a mysql update line:
city = '".mysql_escape( $_REQUEST['city'] )."',

- Edit sample_profile.php and copy and paste an input field for the user:
<tr>
<td>City</td>
<td><input type="text" name="City" value="<?php echo htmlspecialchars(@$_REQUEST['city']); ?>" size="50" /></td>
</tr>


I've attached a copy of the readme.txt and sample_profile.php so you can see what you'd be working with.

If anyone wants to add any other field types besides text fields let me know and I'll post some instructions (and update the readme for the next version).
Dave Edis - Senior Developer

interactivetools.com
Attachments:

readme.txt 10K

sample_profile.php 6K

Re: [Dave] Website Membership v1.01 Released

By (Deleted User) - January 7, 2010

[:)]

Awesome and complete answer. Once again excellent service. Thanks Dave.

I would be interested in seeing examples of how to incorporate other field types into the software. I suspect others would to.

Re: [cohagan] Website Membership v1.01 Released

By Dave - January 7, 2010

cohagen,

We just chatted about this, but for anyone following, let's just do these on a case by case basis. So let us know when you need a pulldown field or checkboxes, etc and what you want to the values to be.

We'll use this process to add to docs for future versions.

Hope that helps!
Dave Edis - Senior Developer

interactivetools.com

Re: [Dave] Website Membership v1.01 Released

By Toledoh - January 25, 2010

Hi Dave,

I've got an Update Profile form that I'm trying to get the list options (radio buttons) to display in the form.

ie. Is your interest;
a: Consumer
b: Developer
c: RE Agent

How do I get the form to display the set of radio boxes from the options available? And show "selected" the option they current have selected?

Attached is my profile page... the field "location" and "interest" have options.

You can see the site functioning here http://www.fractionfacts.com.au/index.php

So you don't need to create users - I've got the test acount as
email: test
password: test

Appreciate your help (yet again...)

Cheers
Cheers,

Tim (toledoh.com.au)
Attachments:

profile.php 9K

Re: [Toledoh] Website Membership v1.01 Released

By Dave - January 25, 2010

Hi Tim,

The quickest way for me to do this would be for you to send me CMS & FTP login details for the site, for my to update the form for you, and then post instructions here for others.

If that works can you email me the details? Note, email, don't post login details to the forum.

And I assume you have those files setup in the CMS already with options? And do you want radios or another field type? (pulldown)?

Let me know, thanks!
Dave Edis - Senior Developer

interactivetools.com

Re: [Dave] Website Membership v1.01 Released

By Toledoh - January 25, 2010

Email coming through now thanks Dave!
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Website Membership v1.01 Released

By Dave - January 26, 2010

Hi Tim,

I've updated your profile.php form. Can you test it out and let me know if works the way you want?

Also, note that the way it's setup, if you save an account through profile.php it will replace the username with the email. This isn't a problem, just surprising if you're not expecting it! :)

Here's my instructions I wrote for the next release of the plugin readme:

HOW TO ADD RADIO FIELDS WITH VALUES LOADED FROM THE CMS
-------------------------------------------------------------------------------
Follow these steps:

- Add a field in the CMS field editor under the User Accounts (For this example
we'll pretend your field is called 'interest')

- Edit your php form (signup.php or profile.php) and copy and paste an error
checking line:

if (!@$_REQUEST['interest']) { $errorsAndAlerts .= "You must select your interest!<br/>\n"; }

- Edit your php form and copy and paste a mysql update line:

interest = '".mysql_escape( $_REQUEST['interest'] )."',

- Edit your form and copy and paste an input field for the user:

<tr>
<td valign="top">Interest</td>
<td>
<?php $fieldname = 'interest'; ?>
<?php $idCounter = 0; ?>
<?php foreach (getListOptions('accounts', $fieldname) as $value => $label): ?>
<?php $id = "$fieldname." . ++$idCounter; ?>
<input type="radio" name="<?php echo $fieldname ?>" id="<?php echo $id ?>"
value="<?php echo htmlspecialchars($value) ?>" <?php checkedIf(@$_REQUEST[$fieldname], $value) ?> />
<label for="<?php echo $id ?>"><?php echo htmlspecialchars($value) ?></label><br/>

<?php endforeach ?>
</td>
</tr>


- Test that the form lets you save each possible value, displays the last saved
value, and that saved values are also displayed correctly in the CMS under:
User Accounts.

Hope that helps!
Dave Edis - Senior Developer

interactivetools.com

Re: [Dave] Website Membership v1.01 Released

By Toledoh - January 26, 2010

Dave,

Unbelievable customer service!

Looks great at a glance - will test thoroughly and try to break it!

Then try to replicate it.

Thanks for the username / email tip :)

Cheers,
Tim
Cheers,

Tim (toledoh.com.au)