Jump to content

modifiedcontent

Members
  • Posts

    286
  • Joined

  • Last visited

Everything posted by modifiedcontent

  1. Whatever field settings I used - with/without HTML Entity Encoder, CKEDitor/Textarea, txt/markup - I kept getting '&lt;p&gt;' or '<p>' in my emails. I finally got it working by using no Text Formatters + CKEditor + Markup and then put strip_tags() around the field in the template. Not sure what that means and I may have missed a correct way to do it. I ran out of time/patience. This works for now.
  2. /n/r? /n/n/r? /r/n/r? Either way, I use an obscure email client - Claws Mail - that often produces odd results. It is supposed to be a text-based client though. Thanks for the wirePopulateStringTags() suggestion! Looking into that one now... Edit: wirePopulateStringTags() works painless, perfect for this purpose. If you put something like this in any regular field...: ...and this in your template...: $fullname = 'Hannah'; echo wirePopulateStringTags($page->body,['tagname' => $fullname, 'anothertag' => 'more inserted content']); ...it just works.
  3. How should messages for Wire or $mail->send() be formatted? There is some information here; you can send text and html versions, but there are no examples how to format those. /n or /r/n etc. is ignored for the text version. What syntax should be used to get line breaks in the email? For the html version, it would be nice if you could pull that from a field. For most emails you would need to be able to insert the recipient's name and other data. PHP variables don't work in field content. Are there other ways to achieve this; replace a tag in the field body with data from php script in the template? Maybe with Hanna Code? Or is that what RuntimeMarkupField is for?
  4. @Robin S's comments were off topic, unhelpful and plainly insulting. My post was a quick report of my quick test of that module. I was not asking for @Robin S's pearls of wisdom. Test @benbyf 's module. Let us know if it has anything to offer to @pwFoo's module. Edit: here is what I have so far as a module alternative - there are probably better built-in PW methods to generate password and username: This solution needs fields 'activation' and 'fullname' added to the user (system) template.
  5. Yes. My post here was only meant as a quick report of my test of that module, that I thought would be more similar to pwFoo's module. pwFoo's module does look like a more developed starting point.
  6. it failed with a browser-stored password. I am testing/building sites at the moment, using the same easy passwords. Resetting the password via 'lost password' didn't work either. Not sure what happened. Maybe I am an idiot. Maybe you should try the module yourself before lecturing me.
  7. No, @Robin S of course I did not put an email address in the username field. But I think @benbyf's module doesn't check if an email address is already used in the system. I tried the module with a Test User, but used the same email address as my main admin account - dumb move. Login with my admin username + browser stored password then failed for some reason. Resetting the password with the 'lost password' feature also failed. Removing the Test User via PHPMyAdmin did not fix the problem either. btw, @benbyf's module does seem to use email address as the username in an odd way. The confirmation email after registering said 'Your username is: myfirstname-mydomain.com'; the email address with only @ replpaced by -
  8. @Robin S, I did log out, but wasn't able to log in again with my main admin account, because the test account had hijacked that email address.
  9. Yes I got that, @fbg13. Thanks again. I am now working on putting it all together, but also with confirmation emails and field validation and error handling and generating the username from the fullname and integrating with other scripts and maliing systems etc. My point to @jmartsch was that I've kinda given up on the idea that there is going to be one module that will take care of the whole process - although @pwFoo's module is a great starting point. I guess it is the Wordpress attitude to look for a plugin that does what you need. in Processwire it is probably better to spend the time to learn to understand the basics and put your own custom solution together.
  10. Thanks for the suggestion @jmartsch. I am trying to understand how forms, registration, etc. works in PW, not so much looking for an out-of-the-box solution. I want to be able to customize and add/expand. I have used OAuth in Wordpress projects, will add that when I have the PW basics figured out.
  11. Could you set user active/not active by user role instead of having a 0 in a custom field? Maybe initially leave role empty - addRole('') - and then after validation add a role like 'subscriber' or 'member'? Then you won't need the if($user->user_activation != 0) check. Edit: I tried this and it seems to work fine. Or am I missing something? I generate password and username with custom functions; isn't there a built-in PW function to generate a password? I saw 'new Password()' in Ryan's post, but couldn't get that to work. And I guess the PW way to do usernamer() is $sanitizer->pageName()? You have to add custom fields 'fullname' and 'activation' to the user template for this to work. Anything wrong with this approach? Any dumb mistakes?
  12. OK, I didn't get you can sort by column headers. And what about separating roles? Is it possible to get a list of only 'members', without admins, guests and editors mixed in?
  13. @LostKobrakai, apologies, but I had never seen those answers - wasn't signed up for alerts I guess - and forgot I had posted that question before.
  14. I wondered about this and had almost decided to store 'members' in my site under a page instead of as users. I will now store members as regular users, but am still worried about user management if you have potentially hundreds or thousands of members in the system. The Access > Users area doesn't look like it could handle that; no way to sort alphabetically or by signup date, no users search box, no way to separate users lists by roles, etc. Or are those all hidden, built-in features? Or are there effective 'user management' modules to cover bigger user databases?
  15. @justb3a, following up on my previous question, I see Ryan explained here that, yes, users should be stored as users, not a good idea to store them as a page.
  16. Is there a built-in way in PW to do email confirmation/validation? Someone signs up or does something with an email address; the system sends an email with a confirmation link to make sure the user actually owns the address. pwFoo and justb3a both use a double opt-in (?) confirmation link in their modules, but I think they use different methods? I can't figure out how they do it. Is there a recommended way? A quick, easy way? I am looking into how to put this together. I would need tables in the database for a validation code, generated at signup, and a true/false for account activation. Those would be two fields in the signup template/page, correct? But they would have to be added to the "user template"? Confused... I thnk this post explains it. Ryan in that thread also points to a built-in PW way to generate a validation code.
  17. @benbyf, I just installed/tried your module. It doesn't have account validation/email confirmation etc.? After adding test info on the register form, I was immediately logged in, but apparently with no permissions to do anything in the admin area. I was unable to log in again with my administrator account. I am now locked out of my own site. Edit: I used the same email address for the test as I have in my main admin account, so the subscriber with no permissions hijacked my main administrator account - how is that even possible? Going into the database now to try to restore my site... Edit: Unable to restore the site via database. Completely fucked. Now reinstalling everything from scratch.
  18. @justb3a, I have started researching how to build forms - with generous help from fbg13 - because my employer/client wants more fields in the newsletter signup. Wouldn't it be better to store newsletter subscribers under a new page instead of in users/access management? I guess roles etc. would not be available if you have a custom members/subscribers table as a page? That could be a problem if the signup is for a community/social network, but not so much for a basic newsletter. Btw, I used a SuperLabels jquery plugin to turn your labels into pseudo-placeholders. It's actually a nice-looking solution.
  19. @pwFoo, I haven't tried that module. Not sure if it is maintained. Haven't had time to seriously look into it. Is the approach similar to yours? Are there usable bits you could steal and integrate into yours? Or contact that developer and join forces?
  20. There is another members register/login module here? http://modules.processwire.com/modules/subscribers/ https://github.com/benbyford/subscribers
  21. Is Admin > Access > Users really able to handle potentially hundreds of users? It seems designed for a small number of site admins and editors - you can't sort them by name or last registered etc. Is there a way to separate members/newsletter subscribers from the small team of site admin/editor users? Store members under a separate page maybe? But how would you then manage roles and access etc.?
  22. Perfect! This outline makes sense to me. This is just what I needed. Thank you so much fbg13! I created one template 'form', with a few test fields. Then created one page called 'survey', put this in: That works as basic demo. Here is a version with a success message and confirmation email:
  23. Does Soma's original November 2012 example still work in PW3? I get nothing when I dump it into a template file. Probably just doing something wrong.
  24. I have tried it in PW3 just now. When I put this in a template with the module installed: $fh = $modules->get('FormHelper'); $form = $fh->create(); echo $form; It only echoes the word 'InputfieldForm' in the page. Any ideas what that could mean? I am trying to get started with PW form building here.
  25. I am trying to wrap my head around how to store data from a form into the database in Processwire - late Tuesday afternoon, groggy... I know there are lots of examples of 'simple forms using the API' and ' simple contact forms' and front-end edit forms 'with file upload' etc. Soma's original post from 2012 goes on with a nine page thread. It is hard to trace back what basic steps I should follow for PW3 in 2017. Let's say I want to collect the following data from visitors to my site: favorite color: ... spirit animal: ... submit button How would that work in Processwire? What are the basic steps? No mailing, no file upload, just storing data in a database. What is the PW way to do that? Minimal example? I have installed the FormHelper module. When I try to use that with $fh->create(); it echoes the word 'InputfieldForm' in the page. Is that another module? I'll report back with the solution when I figure it out.
×
×
  • Create New...