Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#337 2009-09-15 21:10:54

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: mem_self_register

BTW, thanks Jakob for the idea. Maybe you have some ideas about my thoughts from my last post?

Last edited by whaleen (2009-09-15 21:12:03)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#338 2009-09-15 21:29:56

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_self_register

mem_form v0.6 supports multiselect and having the value stored as a delimited string, instead of being treated as an array of selected values.

Offline

#339 2009-09-15 21:48:32

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: mem_self_register

Manfre wrote:

mem_form v0.6 supports multiselect and having the value stored as a delimited string, instead of being treated as an array of selected values.

Egad! Thanks Michael.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#340 2009-09-15 22:42:35

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: mem_self_register

mem_form v0.6 supports multiselect and having the value stored as a delimited string, instead of being treated as an array of selected values.

Very nice, Michael. Thanks from me too! I made my own multiple-select function so I’d like to see how that works.

I’m assuming a can use this method to Update a table field. The trick then when a user is editing their existing user detail(s) is to have the edit form draw from their existing details…

Josh, the short answer is yes this works, but it is involved. I’ll write you a mail but I’m just back from 10 days of being away and have to deal with my overflowing inbox first. If you want to experiment yourself, I used smd_query and mem_simple_form in combination together with an url variable with the article id (smd_query can use this directly and validate that it is an integer). It works very well but there are a couple of problems along the way: firstly, dealing with data from the table that happens to contain special characters such as apostrophes etc. (they cause the txp-tag to exit prematurely). Both Stef/Bloke and Michael have added some attributes to escape/disable double-escaping special chars but I’m not sure if both new plugin versions are officially online yet. The second is dealing with textilised content if you’re using textpattern’s body and excerpt fields (you want to edit the Body field in textile notation but write both the Body and Body_html fields back to the database). For the latter I have used a similar jquery approach to the one outlined above. Michael has since also added a new option to mem_form/mem_simple_form to make this easier (again thanks Michael!) but I’ve not managed to make head or tail of his instructions, so I’ve not been able to try it yet.

and for example: present a number of checkboxes, some of which are selected from a previous choice they made. They could then choose more boxes or uncheck some…

I haven’t tried with Manfre’s mem_form_checkbox but I know from past experience with a non-txp project that updating checkboxes can be a bit tricky as only those boxes that have been checked are sent by the form. Checkboxes that have been switched off are not so you need to work out a way of sending ‘off’ states…

Last edited by jakob (2009-09-15 22:51:46)


TXP Builders – finely-crafted code, design and txp

Offline

#341 2009-09-16 07:47:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: mem_self_register

Michael pulled mem_public_article out of his back pocket since my post. Maybe that does what you want? I’d love to hear how you get on with it if you do try it.


TXP Builders – finely-crafted code, design and txp

Offline

#342 2009-11-30 22:39:47

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: mem_self_register

Sorry if I’ve come along late to this thread, but I’ve used the code suggested by renobird (#297) to create a self edit form for users.

The form itself displays nicely, with the form showing the current user’s details as the default. My problem is the submission of the form. When I try to submit, I get an error saying “You must provide a table name as an attribute to mem_simple_form on line 101”.

Now, if I look at renobird’s coding then mem_simple_form is not actually being called – is it being called in the background somehow? Otherwise, what do I need to add to this code to make the submit function work properly?

Nice plugin and I like the way it plays well with ign_password_protect too.

Offline

#343 2010-02-01 22:06:14

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: mem_self_register

Finally got all of this working except for one issue.

I am developing a site on my laptop, using XAMPP with localhost email addresses.

However, the self edit form (<txp:mem_self_user_edit_form>) fails if I use a localhost email address (eg. “frank@localhost”). I know that it make sense to check for a valid email address for a live site, but is it possible to disable this checking for local development? This makes it hard to test the full functionality of changing addresses.

Also, I have enabled the plugin to accept a phone number, but the self edit form makes it mandatory ie. won’t accept the form without it. Is there some way of changing this so that it is not mandatory?

Thanks. Great plugin, works so well with ign_password_protect that I can’t believe it!

Offline

#344 2010-03-22 19:28:15

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: mem_self_register

When register a new account this error message always appears above the form on the thankyou page. Even if the registration was successful and the new account is created.

Username already exists. Please try another name

My form looks like this…

<h2>Register</h2>
<txp:mem_self_register_form label="" login_url="http://www.gudrunpelham.com/textpattern/" thanks="You have successfully registered for an account. Your password has been mailed to you, please check your spam folder if it hasn't arrived.">
  <div class="input">Real Name<br>
  <txp:mem_form_text name="RealName" label="" break="" /></div>
  <div class="input">Username<br>
  <txp:mem_form_text name="name" label="" break="" /></div>
  <div class="input">Email<br>
  <txp:mem_form_email name="email" label="" break="" /></div>
  <txp:mem_form_submit label="Register" button="1">Register</txp:mem_form_submit>
</txp:mem_self_register_form>

Last edited by FireFusion (2010-03-22 19:28:49)

Offline

#345 2010-04-15 21:53:25

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: mem_self_register

Hi Manfre,
Is it possible to create a non required field in the form generated by this plugin?
Thanks

Nicolas


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#346 2010-04-16 00:10:00

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_self_register

The mem_form field tags support required=“0”. Some fields may be required for registration to actually work.

Offline

#347 2010-04-16 07:56:24

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: mem_self_register

Perfect!

Is there a simple way to display author’s profile with <txp:author link=“1”>?

Thanks

Nicolas

Last edited by NicolasGraph (2010-04-17 21:49:32)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#348 2010-05-06 00:25:44

jeroenvg
Member
From: netherlands
Registered: 2010-04-21
Posts: 34

Re: mem_self_register

mem_self_register has a preference ‘mem_self_admin_bcc’ to send a copy of a new user’s confirmation email to the site administrator.

this pref is missing however from the installation wizard and Preferences: Advanced: self_reg settings. it’s also not possible to set its attribute to true in the tag:

<txp:mem_self_register_form ... admin_bcc="1" ... />

is this intentional, or maybe a bug? i’ve found a good use for this functionality.

Offline

Board footer

Powered by FluxBB