Jump to content

adrian

PW-Moderators
  • Posts

    10,912
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Sure, but he asked for when the site is "updated" - surely a change to a page is an update Just noticed that he wrote: "just send an email with the link to the new page" - so yes, Pages::added would be much better
  2. I would do it on a page save hook. You might find some useful code to "borrow" from this module: http://modules.processwire.com/modules/process-field-change-notifier/
  3. Does the Errors panel on the Tracy Debugbar show any warnings/notices? Because of the way Tracy intercepts notices/warnings, sometimes it can cause code to work that would have otherwise failed. As far as I can tell this only happens with AJAX events where the notice would break the script because of header issues or just polluting of a JSON response. The key thing though is that with recent versions of Tracy, the notice/warning will always appear in the Errors panel so you are notified that something needs fixing.
  4. Just send through whenever you are happy with things - definitely looks like a great improvement - much appreciated!
  5. That is looking really nice - I agree, the default styles from the Tracy core are ugly as - really looking forward to your final version - thanks! BTW - nice seeing that you are making good use of the console Snippets While you're in the mode for tackling this stuff, if you feel like it, it would be incredible if you'd be willing to take a look at this: https://github.com/nette/tracy/pull/241 As it mentions, that PR is a work in progress, but it looks like it's going to do more harm than good in my opinion. From my initial experiments, it's going to make it very difficult to get the ACE editor styles into the Console panel. In particular, have a read of my comment here: https://github.com/nette/tracy/pull/241#issuecomment-273268211 - most importantly, note that I always hack the Tracy core's /tracy-master/src/Tracy/assets/Bar/bar.css to change line #23 from #tracy-debug * { to #tracy-debug-bar * { Perhaps we should talk about this more via PM if you are interested in helping to get everything working with that new approach that is in the works. PS - no pressure - I am sure you have lots of other things to do. I have been putting it off for the moment myself
  6. Yep, of() is just a shortcut for the full setOutputFormatting() method.
  7. Yeah, you will need something like this: $u = $users->get($sanitizer->username('username')); $u->of(false); $u->addRole("moderator"); $u->save(); You should have received an error that mentions specifically that you need to turn of output formatting. Do you have debugmode on and/or TracyDebugger installed?
  8. Sounds like a good idea to me. @bernhard actually mentioned here as well many pages back, but I never got around to it. @bernhard - do you have the latest version of the code available somewhere?
  9. Another update! There is now a "Toggle All" button which may come in handy if you want to search for a method (CTRL/CMD + F) to see the classes it exists in. Tip: search for "___save", rather than "save" so it doesn't find it twice on each row. Another update, unrelated to Captain Hook - now each panel in the Selector Panel has an info iconℹlinked to the relevant section in the "Introducing Tracy Debugger" blog post so you can get quick information about what each panel does.
  10. Hi @cybromancy - welcome to the forums! You are assigning the user's ID to the $changeRole variable. You need to keep the full user object assigned to it so that addRole() can do its thing! Let us know if you have anymore troubles.
  11. New Captain Hook version just posted! Changes: I have rewritten the file parser so that it uses token_get_all, rather than a regex. This makes it much faster and it also makes it easier to exclude functions that are commented out. Please let me know if you notice any files/hookable methods that aren't listed. Added a new column which has the className::hookName formatted and ready to copy/paste. Hooks for site modules will be automatically added when a new module is installed. Cached version is now stored in the DB cache table, rather than on the filesystem.
  12. Great - thanks! I agree and have been contemplating it, but not sure the best approach. Do we need to filter just the filenames, or do we need to filter to the method name? If it's the former, then CTRL/CMD + F is possibly just as easy as a filter. If we also want method names then things will obviously get a bit trickier - do we need to add the name of each method to a data attribute for each file so it can be filtered? Do we want to automatically expand filtered files? Any thoughts?
  13. You can (I believe should in most cases) store the child pages for a PageTable in an external branch of the page tree - perhaps: Admin > PageTableBlocks You should also take a look at the RepeaterMatrix pro field (https://processwire.com/api/modules/profields/repeater-matrix/). If you decide to go with the PageTable field, also take a look at the PageTableExtended (http://modules.processwire.com/modules/fieldtype-page-table-extended/)
  14. Thanks @tpr - that helps. Could you please try the latest version. Hopefully I have fixed that and the problem @Robin S was having. I have also added /site/modules/ so it is also scanned for hookable methods. This means the list of files/hooks will now also include all your installed 3rd party modules.
  15. I can't see why it's there either. I have removed here and it's still working fine (although it was working fine for me with it also). Does it fix the problem at your end? Do you have anymore details on this error. There isn't actually an is_file() call in that CaptainHookSearch.php file. Maybe if you sent me your open_basedir restrictions it would help me to reproduce.
  16. New Captain Hook panel just added! Features: The hooks are parsed directly from the files in your PW installation, so they will always be up to date. They are cached, but will be updated whenever you upgrade your PW version. If you have your Editor Protocol Handler properly configured for Tracy, clicking on the Line Number will open to the method in your code editor. This panel uses @owzim's Captain Hook generator: https://github.com/owzim/PWCaptainHookCLI Please let me know if you have any problems or suggestions.
  17. That's a relative thing - we could all say that relative to someone like Linus Torvalds. The key thing is that you are trying Can you confirm that podcast_shows is in fact a Page field? Is it set to multiple or single? Did you try my suggestion of ->first()->title?
  18. Not meaning to be too critical here, but it would be really helpful if you could start providing a little more info. Just telling us it didn't work makes it a lot more difficult to help. It would be great if you could do a little debugging first. Do you have debug mode turned on? What about TracyDebugger - do you have that installed and the debug bar turned on? Those will both help you get more info on why something isn't working. I seem to recall in another one of your recent posts you had an issue with a multi vs single page field. Remember that you can't get the title from a multi page field like that - you need to specify which one of the selected pages. It might be as simple as $p->podcast_shows->first()->title but without more info, it's hard for us to know.
  19. If you're taking this approach, you'll either need to add the title to the $groups array, or get the page from its ID before trying to echo the title.
  20. Depending on your needs, you could set margin:0 for the p tag in the required div, which would make it look like a normal line break. But again, this may not be appropriate, but it is another potential option. You might also try CKEditor settings for that particular field to not add p tags in the first place: http://stackoverflow.com/questions/3339710/how-to-configure-ckeditor-to-not-wrap-content-in-p-block
  21. With the latest dev version, you can also now do: $urls->httpRoot
  22. I haven't tried it, but check out this module that allows you to customize the embedded video's settings: And regarding this: " It doesn't work in combination with HTML Entity Encoder" - try changing the order of the text formatters.
  23. Thanks for the update @flydev - I am definitely very excited to try this - thanks for the hard work!
×
×
  • Create New...