Jump to content

adrian

PW-Moderators
  • Posts

    10,896
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. Done, but I modified to allow all fields that extend the Text field type.
  2. @szabesz has to be the most generous here on the forums. Look at the given count, and that is since the end of 2015!
  3. 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);
  4. 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.
  5. 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!
  6. @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!
  7. 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 ?
  8. 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.
  9. 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.
  10. 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.
  11. $log->save('modulename', 'message to log'); will take care of it for you, putting it in /site/assets/logs/modulename.txt
  12. 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.
  13. @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.
  14. 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.
  15. @spiroue - did you try the new version? Any remaining problems?
  16. @ryan and @Pete - the developer directory is currently returning "directory.processwire.com redirected you too many times."
  17. @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.
  18. @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.
  19. 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.
  20. Manuel, I'd love it if you could add your experience to that issue: https://github.com/processwire/processwire-issues/issues/572 These problems have been going on for so long and really need to be fixed - I think Ryan needs a nudge to move this to the top of his TODO list. Thanks!
  21. @szabesz - I haven't actually used it in a long time. I thought the idea seemed cool, but I don't think the implementation is very efficient and I found another option for my needs - honestly right now I don't even remember the project I used it on. I trust @matjazp's work though and his fork fixes the main problems I was having with it (which is that new pages are not automatically added), so I think it's probably ok to use.
  22. Actually @Peter Knight - you might try installing that version from scratch - I made several changes to fields and field types, so it might no longer be possible to simply upgrade from the old version.
  23. No need - that's just an error because PW doesn't like that I have added a .php extension to the module file when there is already a plain .module one installed. Just do a Modules > Refresh and you should be good.
  24. Try this: https://github.com/adrianbj/MarkupSEO/tree/various-fixes-enhancements
×
×
  • Create New...