Jump to content

adrian

PW-Moderators
  • Posts

    11,097
  • Joined

  • Last visited

  • Days Won

    365

Everything posted by adrian

  1. Hi Jonathan, Would this just be for users that are already logged in, but are prohibited by the Allowed Roles setting, or do you actually want guest users to be redirected when they visit a protected page? Of course this would mean that an authorized user would need to make their own way to a login page. Or are you planning on redirecting them to a custom login page? Then of course you'd want to redirect them back to the page they first visited. Does the Login Template option work for your needs by chance? It would be helpful to understand your use case a little better and why the existing Message or Prohibited Message fields don't suit your needs. I am happy to help accommodate what you want, but a little context would help please ?
  2. Some more keyboard shortcuts for the Console panel: CTRL + SHFT + PageUp | One less line in code pane CTRL + SHFT + PageDown | One more line in code pane Unlike the other pane resizing shortcuts, these two save the position of the divider so that it will restore to this position after a page reload. This matches the behavior when you drag the divider with the mouse.
  3. Hey @bernhard - glad you're enjoying it. Clearing of Tracy cookie settings (like sticky selected panels) when saving the module settings is intentional: https://github.com/adrianbj/TracyDebugger/commit/f26a46724f8d36b33a637835581128875b756e1e The trouble is that I am not sure why I did it ? I'll have to have a think about why I did this - I distinctly remember doing it for some reason but maybe that reason is no longer relevant due to other changes. I'll get back to you on this. Of course you can enable the panel permanently in the config settings, but I am pretty sure that's not what you mean.
  4. Sure. I have just made the change and spent some time refactoring the generation of the panel footer area to make future changes much easier.
  5. Latest version adds a new Inputfield Settings section to the RequestInfo panel when viewing a field in the admin. This is not turned on by default, so visit the module settings if you want to take it for a spin. Speaking of the module settings, all relevant panels now have direct links to their section in the module config settings, eg: The cog/gear icon at the bottom right will take you directly to this, which will hopefully make changes to panel settings much easier/quicker. Thanks to @bernhard for this suggestion.
  6. It's been there for about a week - pretty much just after all the new fullscreen and pane sizing shortcuts were added.
  7. I guess that is a way around needing to make $pages available. I just haven't got into using it yet - maybe I should?
  8. Glad you like it ? I don't see any reason not to. Would you mind submitting a PR? Please bump the version number as well so I can just accept and it's done. Thanks!
  9. You could also use the Field Code section (created by @bernhard) which lets you copy / paste the API code need to create the field. Be sure to grab the very latest version of Tracy because I just committed a fix to this feature. It was previously missing certain properties. Note that this option is not enabled in Tracy by default so you need to go to the module settings and enable:
  10. Go to the field edit page in the PW admin and then in TracyDebugger open the RequestInfo panel. This shows you all the properties currently set for a field. Just use these in the API as needed.
  11. Try @Mike Rockett's sitemap module: http://modules.processwire.com/modules/markup-sitemap/
  12. I just posted a new version of Tracy that may also help a little with this sort of thing: https://processwire.com/talk/topic/12208-tracy-debugger/?do=findComment&comment=173674 by highlighting invisible characters (as well as the non-printable ones in the above screenshot).
  13. New version adds some configurable settings for the ACE code editor used in the Console panel and the File Editor panel: I went with the defaults I like, but adjust to suit your preferences - don't judge my use of spaces over tabs - it's mostly about consistency when pasting into web forums and other places, but if you need another reason: Developers Who Use Spaces Make More Money Than Those Who Use Tabs ? I am also a big fan of 4 character indentation but I do know that some people prefer 2, so take your pick. The one thing that is new is the intro of Show Invisibles being set to true. That results in the following which I find quite useful at times. Note the highlighted (in pink) character at the end. That actually isn't due to the Show Invisibles setting, but I thought I'd include in this screenshot to bring attention to this thread: https://processwire.com/talk/topic/19995-changing-structure-of-pages/?do=findComment&comment=173671 and how the Console panel can be a useful tool in finding non-printable characters that are causing syntax errors in your code.
  14. You can also paste the code in question into Tracy's Console panel. Note the highlighted non-printable character at the end and also if you try to run the code, you'll get a syntax error.
  15. On the Advanced tab: Also, in case it's useful, there is this module for restricting by page / branch: https://processwire.com/talk/topic/14891-restrict-multi-language-branch/
  16. Well I do sometimes have an unpublished page as a parent for published and viewable children. Is there any reason to exclude unpublished - so long as they are not being added to the sitemap themselves, I am not sure why it matters. What's your reasoning for not wanting to include them?
  17. I'm afraid I don't understand this - how are you setting them to false? Are you saving pages via the API, rather than the admin backend?
  18. @Mike Rockett - I'll admit I haven't investigated things properly at all, but I guess I don't understand why you can't use include=all and then have $page->viewable check to see if the page should be included in the sitemap or not. I don't really understand why this option needs to be configurable. I am not talking about having actual hidden or unpublished pages in the sitemap, just allowing for published/ not hidden children of unpublished/hidden pages to be included. That is what is currently missing. Does that make sense, or am I missing your point completely ?
  19. Awesome work Robin - I can see this being my goto approach for quickly getting new site structures up and running!
  20. One more thing - the new version of Admin Actions now automatically "installs" new actions for superusers without needing to first visit the module settings page. Of course you can still go there to adjust the authorized roles and checking "In menu" if you want. Thanks to Robin for pushing me to make this happen ?
  21. Just a quick note to say that AdminActions now supports installable custom actions like @Robin S suggested above. He has posted his new Unordered List to Pages action over here: If you have any ideas for custom actions, please take a look at Robin's example, but the key things to note is that you need to include a .module file named like: There are two requirements: The classname must start with "AdminActions" It must have 'requires' => 'ProcessAdminActions' This is the entire contents needed in a file named AdminActionsMySharedAction.module class AdminActionsMySharedAction extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Admin Actions My Shared Action', 'summary' => 'My new action does really cool stuff', 'version' => '0.1.0', 'author' => 'John Doe', 'href' => 'https://github.com/JohnDoe/AdminActionsMySharedAction', 'requires' => 'ProcessAdminActions' ); } } Once the module is installed on a site, AdminActions will detect it and allow users to configure and use it like any other action. A big thanks to Robin for his ideas and significant feedback on getting this implemented!
  22. I know this is ancient, but: $session->errors('clear');
  23. Try this out https://github.com/mr-fan/AutoImagePages/blob/master/AutoImagePages.module
  24. It might be a module load order issue. Please try grabbing the latest dev version of PW and the latest Tracy and see if that helps. Tracy is now the first module loaded so that should hopefully solve things for you.
  25. Yeah, you might be right about the XML sitemap idea. I think for some sites it could be ok to convert slugs to titles etc, but obviously some would be less useful. I might still have a play on a rainy day though ? I really love the idea of using the PW modules directory as a way to install these action pseudo modules. I'll make the adjustments to AdminActions to support this. Thanks for a great idea!
×
×
  • Create New...