Jump to content

adrian

PW-Moderators
  • Posts

    11,167
  • Joined

  • Last visited

  • Days Won

    370

Everything posted by adrian

  1. Hi everyone, Here's a little module that allows you to force users to change their password on their first login, or at any time if you manually force it. http://modules.processwire.com/modules/password-force-change/ https://github.com/adrianbj/PasswordForceChange Key Features During install it creates a new checkbox field in the user template, "force_passwd_change". Automatic checking of this checkbox when creating a new user is determined by the "Automatic Force Change" module config setting. When a user logs in for the first time (or if you have manually checked that field for an existing user), they will be warned that they have to change their password and they'll be automatically redirected to their profile page. They must change their password to something new - they are not allowed to re-enter their existing password. Bulk "Set All Users" option to at any time, force all users (by selected roles) to change their password. Hopefully some of you will find it useful and please let me know if you have any suggested changes/enhancements. PS I used the new info.json way of defining the module details, so it requires PW 2.4.3+
  2. It already strips out all html tags except <br><br /><p><strong><b><a><img> Although looking at this, it should probably be expanded to include <em> and maybe even <b> and <i> Does this take care of your request, or is it something else I am not understanding? Or is the stripping of tags not working for you?
  3. @mr-fan - thanks for testing. I am not sure this module is getting a lot of use, so I am not expecting many others to test so maybe I'll just submit a PR to Pete to get this new version committed to Github and available from the modules directory.
  4. Or you can use SQL directly as per Ryan's suggestion to a similar question I had: https://processwire.com/talk/topic/3053-possible-to-select-modifiedcreated/?p=30093 It always feels dirty to me to query and then truncate
  5. There is this mention: https://processwire.com/talk/topic/5281-paypal-payment-method-for-processwire-shop/?p=67668 So long as whatever payment system you are using (Paypal in the example mentioned above) has some way of securely confirming that the user's payment has been received, you can easily make the download available based on whether a "paid" flag has been set for their order.
  6. Glad you worked it out. Just a small note on PHP syntax: date(Y) will work, but will throw a: Notice: Use of undefined constant Y - assumed 'Y' error It should be: date("Y")
  7. Ok, here is my forked version that lets you choose the images and body fields for each email category: https://github.com/adrianbj/ProcessEmailToPage Please let me know how it goes for you.
  8. @mr-fan, It looks like you are using my latest version of this module - I was playing around with attachments and embedding them into RTE fields. I think the error is coming from the images field. Does your page have an images field? Is it named "images"?
  9. Just to explain the difference between what diogo and I wrote. His is simpler, but mine is more descriptive. child on it's own will always be the first child. With children, you can further select last(), or use eq(n) to choose the exact one in the list of children by its numerical order index. Hope that helps.
  10. Hi Tramvai and welcome to PW. This can be accomplished easily with a redirect. Place this in the template file that is connected to your Cars page: $session->redirect($page->children->first()->url); Of course you could also be more specific about the page that it redirects to, but in this example it will always go to the first child of the parent page.
  11. I am not sure where $name is initially defined, but your: $name = $event->arguments('$name'); doesn't look right. If you are wanting to get an event argument by name, you need something like: $event->argumentsByName("page"); Also, this: $person = $this->wire('users')->get("name=$name"); can be simplified to: $person = wire('users')->get($name);
  12. If you're putting that in a module you need to either use: $this->user or wire('user') $user is not available from modules (inside the module class) or inside functions due to variable scope
  13. This is how I have done it in the past: https://processwire.com/talk/topic/5534-new-articles-to-users-with-cookie/?p=53935 Ignore the title of the first post - this option does not use cookies. Note that this is not just about storing the last login, but rather the datetime of the last page they viewed, which may or may not be what you are looking for
  14. I think you should take a look at PayPal's IPN (https://developer.paypal.com/webapps/developer/docs/classic/products/instant-payment-notification/) Setting this up will allow you to set a field in PW to confirm that the user has definitely paid, then you could safely make use of their order-id by sending them an email with the order-id as a get variable in the URL. Your download script would then check the order-id and make sure the paid flag was set before initiating the download. I use this script as a starting point for my ipn.php file https://github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php Just add: include("./index.php"); at the top to bootstrap in PW and then inside: if (strcmp ($res, "VERIFIED") == 0) { you can use the PW API to set the paid flag to true etc.
  15. Absolutely possible and no problems! One thing you might want to check out is Soma's Soft Lock: http://modules.processwire.com/modules/page-edit-soft-lock/ This warns (or optionally prevents) users from editing the same page at the same time which could otherwise result in data loss. EDIT: You might have issues with multiple superusers changing field/template config settings.
  16. Hi Ioquan and welcome to PW! I am really surprised to see those failures as they should both be on by default in your version of PHP. Is it a default MAMP installation? Can you perhaps check your phpinfo results to figure out if it is in fact not available, or if it is a detection problem with PW. Let us know if you need help getting that info.
  17. Maybe I shouldn't be stealing your thunder Ryan, but just in case someone finds this post and is wondering the status of your module: https://processwire.com/talk/store/product/11-likes-fieldtype/
  18. I am no multilanguage expert, but perhaps this helps: https://processwire.com/talk/topic/1228-search-in-multilanguage-site-with-multilang-fields/ If not, at least this post will bump your question and someone more knowledgable will chime in.
  19. No offense intended to Khan, but in its current state, that module has several bugs. It also has a lot more than most people/sites need. I would recommend building your own using these posts as help: http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/ http://processwire.com/talk/topic/107-custom-login/ http://processwire.com/talk/topic/2937-creating-a-front-end-admin/
  20. kongondo's approach looks to be right to me, but remember that if your file field can handle more than one file, you'll need to specify which file, eg: $mp3->file->first->description or instead of first you can use: last, or eq(n) Or you could set the file field max files to "1" in the field's config settings.
  21. Sounds like a great module - it has been talked about here a few times: https://processwire.com/talk/topic/2700-new-pw-project-notification-and-approving-page-changes/ I think what you are looking for is: $this->message("Revision saved. Waiting for publisher confirmation."); There is also ->error and maybe ->warning (not sure on this last one)
  22. I just updated an install to 2.4.7 and the field links are still working here.
  23. Great to hear Now I just need to hear from @tobaco that everything is working for him with him and I'll be a happy camper - literally - I am heading camping for the rest of the week, but I'll follow up with any other issues here when I get back.
  24. Nice! How about an option for tabs vs accordion, and maybe the ability to switch from tabs to accordion automatically on phone sized devices?
  25. Sorry Ronnie, I have tested more thoroughly this time and the latest version of Migrator should fix the issue. Thanks again for letting me know how it goes.
×
×
  • Create New...