Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by adrian

  1. Sounds like what you are looking for doesn't really fit with this way this module is designed to work. You might be better off with https://github.com/matjazpotocnik/DynamicRoles although I do find the approach used in that module a bit weird and maybe not very efficient with a lot of pages.
  2. New child pages of a protected parent will be protected by default if you have the protect child pages option checked.
  3. @PWaddict - not sure when that started happening, but should be fixed now.
  4. Not sure why you are seeing that. What are the settings for your images field?
  5. Probably, but the approach will need to be different and I should also add vimeo support for this as well, so it's a bit of work. I won't have any time for this for a while - any chance you'd be willing to tackle it and submit a PR?
  6. Done, but I modified to allow all fields that extend the Text field type.
  7. @szabesz has to be the most generous here on the forums. Look at the given count, and that is since the end of 2015!
  8. This works: $this->addHookAfter('Pages::cloned', function(HookEvent $event) { $p = $event->arguments(1); $p->created = time(); $p->save(array('quiet' => true)); }); This doesn't handle "modified", but for my needs I don't need that because publishing the newly cloned page will adjust that automatically then. But, if you do, you could add this to the hook: $sql = "UPDATE `pages` SET `modified` = NOW() WHERE `id` = '".$p->id."';"; $this->wire('db')->query($sql);
  9. Thanks for your thoughts @wbmnfktr - it's actually weird to me that the core module is called "Clone" but the page list action button is called "Copy". I kind of agree with clone having the same dates because a clone should be identical, but I also don't think that in reality anyone actually wants a clone in the end - usually it's just a quick way to start a new page from existing content and modifying it to your needs after that. An option for changing the behavior might be a decent approach to the problem. Anyone else have any thoughts? I think in reality I'll probably end up hooking into ___clone or ___cloned and adjust "created" via SQL (or the quite save option) because I don't honestly see that Ryan will want to change the current behavior.
  10. The current behavior is that the created and modified dates are brought across to the new page, but I wonder if this is expected / desired behavior. For my current use, I'd prefer they weren't but before submitting an issue I'd like to know what others think. Thanks!
  11. @BitPoet - enjoy the PCT - I have only done Tuolumne to Sonora Pass, but it was incredible. I am sure the entire thing will be an amazing experience!
  12. Yeah, but html5.validator.nu is down and validator.w3.org/nu doesn't work with the panel for some reason, so there is really only the checker.html5.org option anyways
  13. With the way the panel sends the HTML and parses the returned result, it needs to use a https://validator.github.io/validator/ based service. There are a few, but you can't use all validators that are online, because they aren't all based on nu validator.
  14. Thanks @szabesz and @bernhard - I decided to just switch the service to https://checker.html5.org/ - I don't think an option to specify any service will be very useful because I parse the returned response before displaying it in the panel, so the service must return the expected html. Anyway, hopefully this will keep us going for a while - let me know if you notice any problems with this option.
  15. I you sure the keywords are being generated by this module? As you can see, I removed all references to them: https://github.com/adrianbj/MarkupSEO/commit/d6d65af93127b88f63d328d61c55fa2544133342 Are you definitely using that branch of my fork? I guess I should probably merge that branch into my master now.
  16. adrian

    Module logs

    $log->save('modulename', 'message to log'); will take care of it for you, putting it in /site/assets/logs/modulename.txt
  17. This is worth a read: https://stackoverflow.com/questions/930900/how-do-i-set-the-time-zone-of-mysql Remember that you are better off using timezone names than hours because of daylight saving / summer time changes.
  18. @Mikie - I completely agree - the PW admin interface is full of these jarring FOUCs (it's not just the UiKit theme either). I hope Ryan will give this some serious consideration going forward.
  19. Does Tracy > PW Info Panel > Clear Session & Cookies take care of this? I agree it shouldn't be needed, but I use this all the time for the menu bug that Robin linked to.
  20. @spiroue - did you try the new version? Any remaining problems?
  21. adrian


    @ryan and @Pete - the developer directory is currently returning "directory.processwire.com redirected you too many times."
  22. adrian


    @ryan - not sure if you'll see this, but I still don't understand why the "More Topics" sidebar is on the right on these pages: https://processwire.com/docs/more/multi-site-support/ https://processwire.com/docs/more/lazy-cron/ but on the left on this page: https://processwire.com/docs/more/coding-style-guide/ There is also an additional link at the bottom of the left sidebar to "More topics" which I don't really understand.
  23. @tthom_pw - thanks for the updates. Looks like this is going to be an ongoing problem, so I have separated it out into its own module: http://modules.processwire.com/modules/process-terminal/ It can be run standalone, or via the Terminal panel in Tracy. Hopefully this will help to make it available if you run your own server / VPS, but not cause problems for those Tracy users on shared hosting.
  24. A terminal for running server commands: http://modules.processwire.com/modules/process-terminal/ https://github.com/adrianbj/ProcessTerminal NOTE: It does not support interactive commands like vi, nano, apt, etc. DO NOT attempt to use these as they may result in you needing to restart apache. This is a bash terminal that lets you quickly execute commands on a server. In addition to normal commands like: ls, cd, cat, mkdir, rm, chmod, chown, etc, you can also do mysql command line calls which is very handy if you need to add a new user, create a mysqldump etc. Note that for mysql commands you need to issue them individually - you can't simply start "mysql" and issue commands from there - each call needs to include your username and password and the command to be run, eg: mysql -u root -p mypassword -e "CREATE DATABASE newtablename"; There is also an upload and download command, eg "upload test.txt" which will spawn a file selector dialog on your machine to upload that file to your server with the given name. It also has arrow up and down for command history as well as tab autocompletion of commands and file names. This module was separated from Tracy because some shared hosts were flagging it as spam. This is because it uses system_exec to run server commands. This can certainly be dangerous, but in my opinion it is no more dangerous than the HannaCode module or the Tracy Console panel which both allow you to run system_exec. The key thing is that ProcessWire's htaccess rules prevent the shell.php file from being run directly and because this is a process module it uses PW's permissions to restrict usage to superusers.
  • Create New...