modifiedcontent

Members
  • Content count

    114
  • Joined

  • Last visited

Community Reputation

19 Good

About modifiedcontent

  • Rank
    Sr. Member

Recent Profile Visitors

921 profile views
  1. I am trying to install Processwire + an exported custom profile and keep getting this error: Does anyone recognize this? What could cause this? I have installed Processwire + exported profiles many times before, never had problems. I have reuploaded fresh downloads for this, both regular master and dev, but keep getting the same thing. I am probably doing something dumb. Probably not a structural PW issue. I am out of ideas, so any feedback appreciated. Edit: Finally got something to install using the standard blank profile, instead of an exported profile. I am now manually reconstructing my custom site, using the new import/export functions - hit or miss so far. Did those break the ProcessProfileExport module?
  2. rick, yeah, well, you know, that's just, like, your opinion, man. Leaving out quotes where they are not necessary is following the html specs by the letter and makes the html a lot cleaner and easier to read than the common quotes within double-quotes within single quotes mess - my text editor gives the classes and ids their own fun colors. So I guess something in PW somehow interpreted 'new password (confirm)' as code that it has to do something with, instead of plain placeholder text? That bit was inside quotes btw.
  3. fbg13, nothing wrong with the missing quotes. That is valid html and does not explain where the "/processwire/" insert comes from.
  4. I have a simple front-end password update form like this: In the browser the label of the second field shows up as follows: WTH?! I can't figure out what is changing the label, what is inserting /processwire/ and reformatting the thing. Is this something in PW? A "helpful" thing that browsers do? Edit: The problem disappears if I simply rename the second field to 'Confirm Password'. So my problem is solved, but I'll leave this here in case this is some kind of bug.
  5. Thanks Alxndre' This seems to work: If anyone can spot mistakes or knows a better way, let me know.
  6. I am trying to rewrite Soma's suggestion here to export fields from the users database to a cvs file, with variations like this: $array = $users->explode(function($item){ ...etc. And $array = $users->find('start=0')->explode(function($item){ ... But keep getting 'Call to a member function ... on a non-object' errors. I guess $users is the non-object? I am trying to use this within a function, that is called with a button click. Is $users not available within a function? I see there are new export/import features coming up - great! - but it is all about $pages. Should $users work the exact same way? This works as demo starting point. Now I just have to replace the $list with something from $users:
  7. How do you get the same 'set password' form/input fields on the front-end as in the admin area? I have a working front-end version, but the admin version has some nifty stuff around it. Should be easy to get the same on the front-end, right?
  8. I am not 100% sure if or to what degree my issue is related. Apologies if this turns out to be thread hijacking: I get logged out constantly at certain wifi locations; '_The Cloud' wifi point that many pubs in London have and, I think, all similar public wifi systems that open a browser where you have to leave your email or click on a connect button if you are a returning customer. Does that sound familiar to anyone? Is there a way to make my PW sites work at these locations? Is the solution somewhere in the previous posts here? I have trouble following the thread. 'Enabling SessionHandlerDatabase should instantly get rid of the problem'? How would I do that? 'session fingerprint config setting'?
  9. I had to add this... && $_FILES['headshot']['name'][0] != '' ...to this bit... if($input->post->img_upload && $_FILES['headshot']['name'][0] != '' ) { That was the only way I could find to prevent Internal Server Error if someone clicks submit without selecting a file. Is there a better, more Processwire way to do this? $input->post->headshot etc. doesn't work.
  10. ankh2054, we can't get this code to work here. What are we doing wrong? Shouldn't it be possible/easy to get the same image upload UI as in the admin area? Or some other cropping or centering tool? Any jquery script would work or mess up the system?
  11. Edit: I had posted here because I thought this didn't work: But it does work. The images just don't end up where I expected them - the 'headshots_uploads' directory is supposed to stay empty? You can see the result of the upload with: There should be a headshot/avatar field in the user template. It can get confusing if you have some kind of custom user profile page; you have to make sure you get the avatar of the relevant user instead of the logged-in user. And the upload is saved to $user, not the $page the form is on. There is no way to get the nifty image upload from the admin area on the front end? Edit: I have added $user->headshot->removeAll(); because I kept seeing old avatars. This way you can only have one image in the field/array, so you can't have a feature where the user can swith between uploaded avatars. Is there a more elegant way to "refresh" or make sure that only the latest modified profile picture is shown? Edit2: If you click Submit without selecting an image, you get an Internal Server Error. So I guess you need a check if the input field is empty or not. How do you do that in Processwire? What I have tried so far - adding && $input->post->headshot to the first if statement etc. - didn't work.
  12. Nevermind. Long post deleted here. Sorted it out here.
  13. I am trying to do the same thing as adrianmak - had you figured out how to do this? Do you need the 'current password' field? I think 'new password' and 'confirm new pass' should be enough if the user has access to this form. Or am I missing something? You can use $user->pass->matches($inputPass) to check the input, but, to be clear, there is no PW function or similar that adds the same 'change password' thing that is in the admin profile edit? Password is the same as any other input field? You can save a password from a form input simply with this? ... $user->pass = $sanitizer->text($input->post->pass); $user->save(); And then PW takes care of the hash stuff? The hash stuff is confusing... Or are there specific password checks or processes to take care of? Edit: I see there is an InputfieldPassword.module, probably part of the forms API that I still can't wrap my head around. I guess you should use that somehow? Adding this, as a quick test, produces a server error:
  14. I keep running into $p = new Page(); and $u = new (); , but how do you update an existing page or user? 'current Page()'? Do you have to define $p = current page? What is the proper process? Edit: Nevermind. I guess this is the basic process to update an existing user?
  15. Thanks Zeka! This works: function qa_get_public_from_userids($userids) { global $users; $useridtopublic = $users->find('id=' . join('|', $userids))->explode('fullname', ["key" => "id"]); return $useridtopublic; }