Jump to content

modifiedcontent

Members
  • Posts

    279
  • Joined

  • Last visited

Everything posted by modifiedcontent

  1. @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.
  2. 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.
  3. 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.
  4. 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?
  5. 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?
  6. @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.
  7. 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?
  8. @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.
  9. 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.
  10. @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.
  11. @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.
  12. @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?
  13. There is another members register/login module here? http://modules.processwire.com/modules/subscribers/ https://github.com/benbyford/subscribers
  14. 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.?
  15. 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:
  16. 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.
  17. 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.
  18. 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.
  19. Thanks justb3a. I will use the module as is. 1. To change the subject line of the emails sent to the user I had to edit the the module file. Is that correct or did I miss an edit option in the admin area somewhere? 2. There are ways to turn labels into placeholders via CSS... https://css-tricks.com/float-labels-css/ ...but they require <label> to come after <input> or/and have 'required' in the input tag. This would also require editing the module - and I can't figure out where/how.
  20. You're right matjazp, missed one more <? in the footer. Apparently you can also enable short tags support by adding this line to .htaccess: php_value short_open_tag 1
  21. After fixing what I could, I still get this bit at the bottom of each page with front-end editing enabled: editable()) { echo "EDIT"; } ?> So I guess there is even a bad php tag in that module somewhere.
  22. Thanks! Is there a way to enable short_tags via command line, 'sudo something'? I'd still prefer to use <? ?> instead of <?= ?> To be clear, I should search/replace as follows? <? echo becomes <?= <? becomes <?php
  23. Not consciously... ;-| Could bad syntax in a template really bring down the entire front-end? I have this in my home page template: <div class=left><? echo "<p>{$page->body}</p>" ?></div> That is wrong on many levels... Not sure how that got there.
  24. PHP should be installed properly. The installation procedure gave no signs of problems and the admin area works as normal.
  25. It works with that directive added. Thanks flydev! So the formula to install Processwire on Ubuntu on Amazon EC2: sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install apache2 sudo apt-get install lamp-server^ sudo apt-get install php7.0-zip sudo a2enmod rewrite sudo apt-get install phpmyadmin sudo ln -s /usr/share/phpmyadmin /var/www/html/ sudo adduser ubuntu www-data sudo chown ubuntu:www-data -R /var/www sudo chmod 2775 -R /var/www sudo find /var/www -type d -exec chmod 2775 {} + sudo find /var/www -type f -exec chmod 0664 {} + sudo service apache2 restart Then add this directive to your VirtualHost in /etc/apache2/sites-available/000-default.conf : <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> And then it should all work. ...still have to see it working with my custom exported profile, but that is my problem. (Edit: that was caused by syntax errors in my custom templates, unsupported use of short_tags.)
×
×
  • Create New...