Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by adrian

  1. 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?
  2. 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; });
  3. Thanks @Robin S - very timely - I am making use of this in a custom frontend form today!
  4. 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.
  5. Have you looked at how it's done in AOS? https://github.com/rolandtoth/AdminOnSteroids/blob/2e8f9c56dbc0d05edcb203d7dcf9af31eb862b02/AdminOnSteroids.module#L1159
  6. 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; } }
  7. 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.
  8. For further clarification, compare: to: Surely that indicates a bug?
  9. Hi all, Is anyone else having issues with findJoin? Is 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!
  10. 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.
  11. 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?
  12. @ryan - all the assets for Tailwinds are 404'ing for me
  13. 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!
  14. I don't believe the order will matter, but having the fclose before the unlink makes more sense to me.
  15. 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?
  16. 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.
  17. 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 :)
  18. 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.
  19. @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.
  20. @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
  21. 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; } }
  22. @tires - the Flourish library is no longer maintained, so this module really needs to be rebuilt so that it doesn't rely on it. It's quite easy with imap_open https://www.php.net/manual/en/function.imap-open.php but I'm afraid I really can't contribute more time to this module - I've never actually used it myself and I don't think it has a huge user base, but I am sure Pete would accept a PR if you'd be willing to implement imap_open.
  23. @androbey - I've just committed a new version which adds Slack support. It's not super well tested, but so far it's working here nicely. You will need to edit the config settings to set the name of the slack channel and the Slack App Oauth Token of your Slack App that has permission to post to the specified channel. Not sure if you have ever set up a Slack app (bot) before, but this should get you going: https://api.slack.com/bot-users Let me know if you have any suggestions or find any bugs.
  24. @androbey - adding the Slack logging option is definitely on my list. However, keep in the mind that I think a throttle is still probably important - I can see a situation where your Slack board is flooded with a lot of errors very quickly.
  • Create New...