Jump to content

Pete

Administrators
  • Posts

    4,032
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by Pete

  1. Pete

    2048 anyone?

    I've managed 1024 once I think, certainly 512. I had managed to forget about it until you reminded me just now
  2. Nico - that'll be the age old problem with not being able to moderate these without knowing the language. Perhaps there should be a simple way to suggest language changes if you're using anything but the default? Not sure how you'd do it though (if everyone on the planet had a Github account you could click a button somewhere in the admin and open an issue on Github for that language pack right there) but I guess there should be some text along the lines of "this language pack was created by a third party author. If you have any change requests you can contact them <here>". Assuming it doesn't already say something like that of course - I've not needed to install one myself
  3. In your other related topic I've suggested making them log in first (extra security, and if they've just registered you can log them in automatically and just restrict what they can do until they activate the account). However, all you need to do if the activation code is truly unique and the user isn't logged in is something like $u = $users->get($input->get->activation_code); If that $u has an ID then the system found a user with that code and you can activate the account. The problem is if the user isn't logged in you don't want to activate and automatically log them in using this alone - what if I hacked someone's email account and found this email? I would then be able to click the link myself and activate the account and be automatically logged in myself. Better to force them to be logged in before the link will work for added security.
  4. A normal registration process is similar to how you signed up on these forums, so let's start there You registered, and after registering you were immediately logged in, yet couldn't post anything until you clicked the activation link in your registration email. Because you were already logged in, when you clicked that link it was easier to check the code and activate the account (in your case set the field to 0). So the answer is to have them logged in after registering and restrict their options until they activate their account, displaying a clear message that until the account is activated they can't do anything. That way if they accidentally log out (close the browser for example) and come back to your site then they'll know where they were up to. Hope that helps!
  5. Ditto to what diogo said - spot on with the rest.
  6. You tend to run into these requirements with government sector/healthcare etc because they are often tied into legacy applications that they have spent tend/hundreds of thousands on and can't justify upgrading. Seriously, that's the reason most of the time, sad as it sounds. The problem is that whilst they would often be better off using newer technologies in a lot of cases and getting rid of some of the legacy systems, but whilst the money is from taxpayers they're stuck really. If you saw in the news that a database cost tens/hundreds of thousands that's all you generally focus on - it's hard to sell the benefits of a newer system for performance gains because newspapers tend to focus on the negatives. That's just been my experience anyway having worked "on the inside" in the past
  7. Feel free to clarify I'd prefer to pay ryan for some of these modules rather than give him a $50 token "Happy Christmas" present (Yes, now I'm making fun, sorry). I don't think it will turn into a modules supermarket. Certainly there's not a facility to upload paid moduled by other developers to the PW store yet, so if there were a lot of paid modules they would have to be on the developers' own sites, but I'm sure as more commercial modules are released it will be done so in a cautious and sensible manner.
  8. Yes, a site profile will require a clean installation since you effectively add these folders before installing it.
  9. Plus the prices that ryan is charging are so low for what they are I really don't have a problem paying them personally. I wouldn't mind it if he increased the prices actually - the benefits are that great.
  10. Processwire will always be free, but commercial modules have a place where a lot of work has gone into something. For example, ryan currently has two commercial modules that add great benefit to a Processwire installation. He has put in many thousands of hours into this free platform. Are you going to begrudge him making money out of some very useful modules that you have no obligation to use? I also want to make some commercial modules eventually too and see no problem with it as long as developers don't start charging for teeny tiny things.
  11. Cheers Soma, I was looking at Nik's AdminSaveActions module and coming up with something similar as well but yours is neater than mine
  12. There will be a guide, but we'll have to do some checks too to make sure. Major in this case is a change to one of the steps in an article that basically alters the workflow. Minor is spelling corrections or rewording something.
  13. Oh yes, that should work nicely - thanks Craig
  14. Teppo - just saw this somewhere on the ADLDAP site: $adldap->user()->usernameToGuid(); I hadn't realised but most of the ADLDAP functions for users seem to be able to substitute the username for the GUID, so that helps avoid issues with changing usernames!
  15. The issue with redactor is covered on this page here: https://processwire.com/talk/topic/1964-redactor-wysiwyg-editor/page-3
  16. It would be helpful if we could see the full code of what you have so far in order to help debug it.
  17. Can't write a guide for a module that has the word "Simple" in the title @kongondo - you'll need a bigger hat if these guys carry on much longer
  18. But the major and minor fields on the page would already have the last major or minor version numbers in them so I guess I'd just have to do a quick AJAX query to see if the values had been changed at all. Or actually I could just grab the initial values with JS on page load and see if either has changed on page save. I could also use some more JS to make sure they only increment the minor version by 1 and if the major version is incremented the minor versions is set to 0, but then if they mess it up you need an "undo" button. My head hurts. Maybe I should just give them the ability to type whatever number in the boxes and urge them to just do it correctly
  19. The main reason for the modal is we want to make it something that people HAVE to do before the page will save (otherwise they might not) but we want it to increment by one on the major or minor field depending on what they click. I figured making it a modal would give more scope to expand it if we needed to. Basically I'm trying to make version numbers idiot-proof so that one or the other always increments on save, but it's down to the user whether it was major or minor edit. I try not to do anything particularly straightforward I guess an easy first step in the meantime is to have both fields be visible in the editor and just have a confirmation box popup asking the user if they updated the version number so they remember to check it. It's not as foolproof, but it would be a start.
  20. I'm building a ProcessModule to handle pages that store a version number. Everything is pretty straightforward apart from the last part. What I want to happen is that when the Save button is clicked instead of saving straight away a modal window pops up asking if the changes made were minor or major, and depending on which button is clicked (minor or major) the minor or major version number is incremented. Since the minor and major version fields are hidden in the editor, I'm not even sure how to save those (making them hidden doesn't make them a hidden field - they simply don't get rendered) but I suspect some AJAX to append them to the end of the form might work. My bigger problem is I've no idea how to launch and interact with this modal on page save. My brain seems to be drawing a blank on every aspect of this one, but I suspect there would be other uses for such modals on page save. Any suggestions would be greatly appreciated
  21. People get married - that's the only time they would change aside from typos (both of which I've had to deal with).
  22. @teppo - I've got a marginally modified version of the AD module working, but to be honest AD is a pig to work with unless you know it inside out. I know it just well enough to get it to authenticate and that's about it - taking it further than that is hard work as it's hard to work with. Something like ADLDAP would be the way to take it further I think: http://adldap.sourceforge.net/wiki/doku.php?id=documentation_user_functions But even then, look at the docs - there doesn't seem to be something as sensible as a unique user ID in Active Directory so if you rely on the username from AD and someone changes the username on the AD server then your matching PW user account won't work. Of course if you only need it for a bit of frontend authentication then it's not a problem, but if you want to match up an AD user with a PW user like I do on an intranet system I use then you have to be vigilant when changing usernames in AD. I think I've thrown myself into a recursive loop and repeated myself a bit there, but that's the kind of headache it gives you It would be great if there was a really good PHP API for AD that dealt with basic things like user authentication and reading/writing to user accounts (the basics in my opinion) but every one I've looked at gives me a headache. But then I am spoiled by PW's API
  23. $selector .= ", branche=$branche"; Note I moved the comma before the branche= and contract= when I did my examples a few posts up
  24. Erm... that doesn't make sense. If the $selector variable is empty (as in neither branche or contract are being searched for), it translates to this when the variables are parsed as text (note the blank space after the comma as $selector contains nothing): $selects = $pages->find( "template=child-template, " ) ); My way would work and you wouldn't end up with a trailing comma.
×
×
  • Create New...