Jump to content

adrian

PW-Moderators
  • Posts

    11,174
  • Joined

  • Last visited

  • Days Won

    371

Everything posted by adrian

  1. Thanks for the report @LAPS - it should be fixed in the latest version. Please let me know.
  2. The difference with Admin Actions is that it's always going to be PHP code and also it's not being used to edit code, just view it. I did look at Monaco when I was initially developing the Console panel and came across some issues I couldn't resolve (although I don't remember what they were now). I could probably get away with only packaging one theme and remove the config options, but because I think so many of use the Console panel so much, I think giving users the ability to match the styling to their preferences is a pretty nice bonus. As for language syntax highlighting / linting etc - there are certainly options that could be removed like elixir, csharp, and lots of others, but I wouldn't want to limit to just PHP, HTML, CSS, JS. What if someone is working in latte or twig or coding JS in CoffeeScript or they are connecting to a separate Postgres DB and could make use of (mode-pgsql), or editing some SVG code (I sometimes use the Console panel for this). Keep in mind that the entire Tracy module zip file is only 3.5MB (https://github.com/adrianbj/TracyDebugger/archive/refs/heads/master.zip) so even if I removed all the extra Ace files, it might get down to ~1MB. I am just not certain I want to remove functionality that someone might use for the sake of a couple of MB. Note that I used to do exactly what you are asking for: https://github.com/adrianbj/TracyDebugger/tree/3181668f6841ae9f75a9fe49e6e8331ab0c69fc4/scripts/ace-editor but as I mentioned, each time I update it, I have to manually copy across the new files rather than the entire set.
  3. Hey @bernhard - any particular reason you want it disabled? That said, you can do what you want very easily by adding this in your URL hook. \Tracy\Debugger::$showBar = false;
  4. Hi @szabesz - probably not, but I didn't want to limit users to specific themes and I also didn't want to remove syntax highlighting and linting for languages just because I don't think they will be needed. I guess my main reason though is that it's much easier for me to just update the entire set without needing to limit updates each time and in the scheme of things, I don't see 11MB as an issue given that one high resolution image upload might easily equal this. Keep in mind that none of these are loaded except those that are needed. Do you have a specific need to reduce it?
  5. It's essential to my PW work as well so would definitely love to see it maintained, or at least some of its key features incorporated into the PW core which is probably the better approach. Maybe we should start a list of the features we all need and put together PRs for Ryan to get them into the core?
  6. I use this to allow the use of include=all in the default selector in the config $this->wire()->addHookBefore('ProcessPageLister::getSelector', function($event) { $event->object->allowIncludeAll = true; });
  7. Thanks @Robin S - very timely - I am making use of this in a custom frontend form today!
  8. Absolutely - I was just thinking that the code for this feature that is in AOS might be useful in preparing the PR for the core.
  9. Have you looked at how it's done in AOS? https://github.com/rolandtoth/AdminOnSteroids/blob/2e8f9c56dbc0d05edcb203d7dcf9af31eb862b02/AdminOnSteroids.module#L1159
  10. Really rough, but gets the job done. You could easily put this into a function. This builds up the name of variation (assuming you want 330x330), checks to see if it exists and if it doesn't then we need to go old school and get the page object and image and generate the variation. Then next time the page is loaded, the variation will exist and we can display it with $imageUrl as the image src directly from the data returned by findRaw. if(count($p->image) > 0) { $imageOrigUrl = $config->urls->files. $p->id . '/' . $p->image[0]['data']; $path_parts = pathinfo($imageOrigUrl); $imageVarFilename = $path_parts['filename'] . '.330x330.' . $path_parts['extension']; $imageUrl = $config->urls->files . $p->id . '/' . $imageVarFilename; if(!file_exists($config->paths->files. $p->id . '/' . $imageVarFilename)) { $image = $pages->get($p->id)->image->size(330, 330); $imageUrl = $image->url; } }
  11. I ended up doing a file_exists() on the image variation I am wanting to call (built from the returned filename) and if it doesn't exist, then get the full page and call the size on the image. This should only happen once until the reduced size is created and then we're back to being able to load directly from the raw data.
  12. For further clarification, compare: to: Surely that indicates a bug?
  13. Hi all, Is anyone else having issues with findJoin? If I try to join a checkbox it doesn't work at all and if I try to join a page reference field foreach($pages->findJoin('template=date', 'relationships') as $date) { d($date); } I end up with this which appears to be unusable: But if I do the old school auto-join (the checkbox in the field settings), then I get the expected: Can anyone confirm this behavior in the latest dev version? Or do you know what I am doing wrong? Thanks for any input!
  14. Hi @Martinus - I am not sure what scenario would result in that but it might help if you can provide a screenshot to show this so I can see what options for Child Template are available. The error suggest that there are none, but not really sure how that would happen unless you have the page locked down so that there are no allowed child templates. Actually, you should check the family settings for the template of the parent page to confirm that as well.
  15. Hi @Robin S - sounds interesting. A couple of possible options: 1) Have you ever opened up any of the exception-*-.html files that get stored in /assets/logs/tracy ? These include the required JS for making the toggling etc work, so I guess I could take a similar approach for dumps. 2) What about a Dumps Archive panel - something like the Dumps Recorder, but it would be populated with only the entries you wanted and you could also delete items when you no longer need them. I think I could do this by having an "archive" icon shown next to each item in the Dumps panel - click that and it would be copied to the Archive Panel, and then in the Archive Panel there'd be a delete icon for each item. Would you prefer the ability to save individual items, or just the entire current contents of the Dumps panel? I think I like #2 better because it keeps access to everything within Tracy. Any thoughts?
  16. @ryan - all the assets for Tailwinds are 404'ing for me
  17. Looks like you might not have installed the MigratorWordpress plugin. Also, please note that it really only works on WP blog posts and it's also not being maintained anymore. Good luck!
  18. I don't believe the order will matter, but having the fclose before the unlink makes more sense to me.
  19. Did you check the file permissions and ownership? What happens if you make the unlink call directly (maybe from Tracy Console) - do you get a permissions error?
  20. Hey @bernhard - Tracy doesn't need sessions these days unless you have the "Use Native PHP Session" option checked, so it seems like a strange reason to disable it. I wonder if something here: https://github.com/nette/tracy#ajax-and-redirected-requests could be of help? Maybe I need a minimal test case to see the exact problem.
  21. This is a double full circle for me. I started using TinyMCE, then migrated my custom stuff to FCKEditor (when that's what it was called). Then when I came to PW Tiny was still the default, then it moved to CKEditor and now we're going back to Tiny :)
  22. I think the easiest way is the AddNewChildFirst option in AdminOnSteroids. If you don't want to use that entire module, can you can grab the hook it uses: https://github.com/rolandtoth/AdminOnSteroids/blob/2e8f9c56dbc0d05edcb203d7dcf9af31eb862b02/AdminOnSteroids.module#L786-L795 Basically you're just setting the sort value of the new page to 0.
  23. @androbey - I've committed a new version that doesn't prevent the email and logging to Tracy log files, but it does prevent logging to Slack until the email flag is cleared. I know this isn't ideal / complete, but it's all I have time for right now as I am finding it quite confusing to figure out how we're supposed to implement custom loggers without overriding the default ones and the logging to file is really important so I wanted to make sure that is fixed. Hopefully I'll tackle this better in the future, including your request for a hook. Feel free to send me a PR though if you've got the time to figure this out.
  24. @bernhard - that check seems like it should be fine, but I am wondering if we should perhaps also add an early exit for RockFrontend - something like these: https://github.com/adrianbj/TracyDebugger/blob/17dbc10717bdda826660166477abb04c192eaf3e/TracyDebugger.module.php#L430-L442
  25. In case someone feels like contributing by replacing Flourish with imap_open, this code should get you started: $inbox = imap_open('{imap.gmail.com:993/imap/ssl/novalidate-cert}', 'address@domain.com', 'password'); $msgnos = imap_search($inbox, 'UNSEEN'); if($msgnos) { foreach($msgnos as $msgno) { imap_setflag_full($inbox, $msgno, "\\Seen \\Flagged", ST_UID); $header = imap_headerinfo($inbox, $msgno); $bodyText = imap_fetchbody($inbox, $msgno, 1.2); if(!strlen($bodyText) > 0) { $bodyText = imap_fetchbody($inbox, $msgno, 1); } $timestamp = strtotime($header->date); $toObj = $header->to[0]; $fromObj = $header->from[0]; $to = $toObj->mailbox.'@'.$toObj->host; $from = $fromObj->mailbox.'@'.$fromObj->host; } }
×
×
  • Create New...